Move project config to data/ and configure-clangd.ps1 to scripts/

This commit is contained in:
ragnarok-clanker 2026-10-27 14:43:03 +00:00
commit eb5456e7c1
7 changed files with 22 additions and 11 deletions

View file

@ -220,7 +220,7 @@ td batch <batchId>
Name the exact locally checked payload and include all dependencies. Maintenance batches are
maintainer-only; they run the source gates, compile affected units/includers and compare effective
code with a fresh main build. A changed function uses the normal revision/review path instead.
The server registers new source units in `compile.json` on merge. A queued batch is not a merge.
The server registers new source units in `data/compile.json` on merge. A queued batch is not a merge.
The linked-code check does not validate data contents or reconstruct initialization/teardown.
Prove those separately before submitting. An offset-asserted partial layout is not evidence of a
@ -241,7 +241,7 @@ annotation is removed from main. IDs remain reserved; unrelated symbols must not
## Ragnarok target
Use only this workspace’s configured server and clank-together MCP. The project is rodecomp, version 2026-02-19. Preserve existing stable IDs and permitted OFFSET/STATIC provenance comments, except OFFSET annotations attached to inline-only functions. Missing original evidence is a blocker to a verdict, not permission to invent behavior. The source contains subsystem libraries, not a completed standalone game. Clank compiles individual units from compile.json; it does not run CMake or CTest during checks.
Use only this workspace’s configured server and clank-together MCP. The project is rodecomp, version 2026-02-19. Preserve existing stable IDs and permitted OFFSET/STATIC provenance comments, except OFFSET annotations attached to inline-only functions. Missing original evidence is a blocker to a verdict, not permission to invent behavior. The source contains subsystem libraries, not a completed standalone game. Clank compiles individual units from data/compile.json; it does not run CMake or CTest during checks.
## td binary
> td --help

View file

@ -112,7 +112,7 @@ static void BuildFullKeyName(const char* keyname, char* buffer) {
- Read `td_disassemble` as ground truth and `td_decompile` as a starting point, not a specification.
- Run `td_check` on each changed translation unit independently while fixing compilation errors.
- After changing a header, check its includers before submitting. Compile using `compile.json`; Clank does
- After changing a header, check its includers before submitting. Compile using `data/compile.json`; Clank does
not run CMake, CTest or a complete application link during these checks.
- Validate the exact proposed payload against clean current server main, without unrelated working-tree
changes. Include the real prerequisite interfaces, implementations and affected callers, or land them first.
@ -201,7 +201,7 @@ the original instructions.
### Korean string literals
Sources are UTF-8; `compile.json` passes `/source-charset:utf-8 /execution-charset:.949`, so write Korean
Sources are UTF-8; `data/compile.json` passes `/source-charset:utf-8 /execution-charset:.949`, so write Korean
literals as Hangul (`"유저인터페이스\\item\\%s.bmp"`), not CP949 escapes. Keep `\x` escapes for bytes
that are not CP949 Hangul: other code pages (Shift-JIS, GBK, Big5 font names), byte-order marks and key codes.
Never use `/utf-8`, and never save sources as CP949/EUC-KR.
@ -211,7 +211,7 @@ Never use `/utf-8`, and never save sources as CP949/EUC-KR.
- This target is Windows x86. Keep code in its assigned existing translation unit and subsystem headers.
- Preserve fixed Win32, DirectDraw, Direct3D, Lua and codec boundary ABIs where evidenced; apply the
calling-convention rule below. Preserve ownership, field widths and failure behavior.
- Compile individual units with the configured Clank toolchain and `compile.json`, not a new build system.
- Compile individual units with the configured Clank toolchain and `data/compile.json`, not a new build system.
- Missing original instructions are a blocker, not permission to invent a fallback or partial implementation.
### Calling conventions: implicit by default

View file

@ -3,5 +3,5 @@
This tree is coordinated with Clank Together. Functions and data carry stable symbol IDs
instead of addresses (`// FUNCTION: fn_01234`, `// GLOBAL: gl_00042`); the coordinator's symbol database holds
their addresses in every client build, so a new client version needs new addresses, not a retagged tree.
`decomp.json` and `compile.json` pin the VS compiler and the exact command line of every source.
`data/decomp.json` and `data/compile.json` pin the VS compiler and the exact command line of every source.
See `AGENTS.md` for how to contribute.

10
data/toolchain.lock.json Normal file
View file

@ -0,0 +1,10 @@
{
"ragnarok": {
"family": "msvc",
"version": "19.29.30159",
"machine": "x86",
"image": "rodecomp/compiler:v142",
"clSha256": "73e2bb370bfc32c04df58752b00f97db388207f29f2b7d4f23f5273e9dbfb212",
"sdkVersion": "10.0.19041.0"
}
}

View file

@ -2,10 +2,11 @@
param()
$ErrorActionPreference = 'Stop'
$root = $PSScriptRoot.Replace('\', '/')
$project = Get-Content -LiteralPath "$PSScriptRoot/decomp.json" -Raw | ConvertFrom-Json
$compile = Get-Content -LiteralPath "$PSScriptRoot/$($project.compileCommands)" -Raw | ConvertFrom-Json
$workspace = Get-Content -LiteralPath "$PSScriptRoot/.td/config.json" -Raw | ConvertFrom-Json
$repoRoot = Split-Path -Parent $PSScriptRoot
$root = $repoRoot.Replace('\', '/')
$project = Get-Content -LiteralPath "$repoRoot/data/decomp.json" -Raw | ConvertFrom-Json
$compile = Get-Content -LiteralPath "$repoRoot/$($project.compileCommands)" -Raw | ConvertFrom-Json
$workspace = Get-Content -LiteralPath "$repoRoot/.td/config.json" -Raw | ConvertFrom-Json
$runner = $workspace.runners.PSObject.Properties[$project.toolchain].Value
if (-not $runner -or $runner.type -ne 'native' -or -not $runner.toolchainRoot) {
@ -50,7 +51,7 @@ $commands = @(
}
)
$outputDirectory = Join-Path $PSScriptRoot 'build/editor-x86'
$outputDirectory = Join-Path $repoRoot 'build/editor-x86'
[void](New-Item -ItemType Directory -Path $outputDirectory -Force)
$output = Join-Path $outputDirectory 'compile_commands.json'
$json = ConvertTo-Json -InputObject $commands -Depth 6