Repository navigation
Config: warn about xcl.toml keys and tables XCL does not know - #1171
emirduran707 wants to merge 1 commit into
Conversation
|
Independent Windows launcher check on I built with Synthetic title only. AI-assisted. Codex (GPT-6, exact variant unavailable) ran the comparison and drafted this report. |
b393f32 to
b07f906
Compare
|
Pushed b07f906: AI-assisted (Claude Code, Claude Opus 5.5). |
|
Full-suite run, since this PR has no test report yet. Tested exact head Tested
Not tested
AI use
|
Config is deserialized with serde's default behaviour, which skips keys it has no field for. A typo (`pls_md = 512`) or a setting written under a table of its own (`[d3d12]`) therefore did nothing, and the user was not told. unknown_keys() compares the file's top-level keys with the ones Config serializes, so the known-key list stays the struct itself; serde attributes on Config (and with them its error messages and boot.json) are unchanged. `xcl run` reads the file's keys with it and prints a WARNING line per key next to the other startup lines; load_or_create keeps its signature, which other callers use. Unknown keys stay non-fatal, so existing files keep working. Keys inside mounts, aliases and stub_returns are free-form and are not checked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
b07f906 to
a74e351
Compare
xcl.tomlis read with serde's defaults, which skip keysConfigdoes not have. A typo (pls_md = 512), or a setting put under a table of its own, had no effect, and nothing said so.config::unknown_keysreturns a file's top-level keys and tables thatConfigdoes not know. The known keys come from serializingConfig::default(), so the struct stays the only list of them.xcl runreads the file's keys with it and prints one warning per unknown key, after thedata:line.Config::load_or_createkeeps its signature, which other code calls (e.g. #759). Unknown keys are still not an error, so existing files keep working. The tablesmounts,aliasesandstub_returnstake any key and are not checked inside.What is in it
crates/xcl/src/config.rs:unknown_keys; testunknown_keys_and_tables_are_reported. It checks a typo and an unknown table, and that the file XCL writes itself and the keys the README and the file header name report nothing.crates/xcl/src/launcher.rs: the warning.README.md: one sentence in the "Title data" item.Tested
cargo build --workspace, thencargo test --workspace --no-fail-fast -- --test-threads=4on a74e351 (rebased ontomainde36462): 1003 passed, 2 failed, 45 ignored; 8 SKIPPED (6 inlower_dxil::tests::{f16,f32}_programs_on_the_gpu;heap_window_out_of_memory_falls_back_to_the_switch_form;pso_measurement_compiles_an_exact_synthetic_record)gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1,gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_3) fail identically on unmodifiedmainde36462on this GPU (seeds 722 and 1599).unknown_keysreturning nothing (what serde did before:left: [],right: ["d3d12", "pls_md"]); with the changecargo test -p xcl --lib configpasses, 16 passedRegression run
main:
this PR:
Not tested
xcl.tomlwith a typo: the smoke run's file has none.[mounts],[aliases]or[stub_returns]is still accepted without a warning.AI use
mainde36462(a conflict inconfig.rsandlauncher.rs; both additions kept) and reran the suite and smoke runs above.🤖 Generated with Claude Code