CLI: xcl <command> --help prints the usage #1458
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1468"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-11-24T16:34:06Z.
xcl shaders --helpansweredxcl shaders: --help: File not found. (os error 2)and exit 2. Every command reads its second argument as the file or folder to open, so onlyxcl --helpreached the usage.--helpor-hright after a command now prints the usage and exits 0.What is in it
crates/xcl/src/main.rs: one match arm ahead of the commands.crates/xcl/tests/cli_help.rs: runs the binary forrun,inspect,disasm,shadersandrpfwith--helpand with-h, and expects exit 0 and the usage on stdout. Before the change it failed onxcl run --help(exit 2,xcl: --help: File not found. (os error 2)).Tested
x86_64-pc-windows-gnu.cargo test --workspace --release --target x86_64-pc-windows-gnu -- --test-threads=4onbcb28d2: 765 passed, 4 failed, 41 ignored (lib 719 / 1 / 21, the other test binaries 46 / 3 / 20). SKIPPED:gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64).mainb7aa9f3in the same setup (764 passed, 4 failed, 41 ignored there):gpu_depth_buffer_created_for_unordered_access_is_placed(lib),test_title_runs_and_game_folder_is_untouched,disk_free_space_ex_reports_pls_quota,set_predication_buffer_state_and_kickoff.mainas well, and are not in the counts (--skip):d32s8_targets_take_their_own_size_of_video_memoryandreservable_agrees_with_the_driver. Each passes when run alone onmain.cargo test --workspace --release --no-fail-fast -j 8 -- --test-threads=4onbcb28d2, MSVC toolchain, 1 run each, started over SSH: RTX 5070 Ti 16 GB (driver 621.24, Ryzen 7 9800X3D, 26H2 build 26300.9974, rustc 1.99.1) and RTX 2070 SUPER 8 GB (driver 621.01, Ryzen 7 5700X3D, 25H2 build 26200.9711, rustc 1.100.0). On the first machine the processor's integrated AMD graphics (driver 32.0.21030.2001) is DXGI adapter 0 over SSH, so a test that takes adapter 0 ran on it and not on the RTX 5070 Ti. On each: 770 passed, 1 failed, 41 ignored (lib 722 / 0 / 21), SKIPPED the same two as above, andhelp_after_a_command_prints_the_usagepassed. The one failure istest_title_runs_and_game_folder_is_untouched, and it is the way the run was started: an SSH session has no desktop (session 0), and the test title's swap chain cannot be made (CreateSwapChainForHwnd…0x887A0022). Started in the logged-in desktop session on the RTX 2070 SUPER machine,cargo test -p xcl --test e2e --releaseonbcb28d2gave 3 passed, 0 failed (1 run). (On the RTX 5070 Ti machine the suite ran before the workspace was built, so there that test stopped at "build first"; rerun aftercargo build --workspace --release, still over SSH, it stopped at the swap chain as well. Started in the desktop session there too, the same command gave 3 passed, 0 failed, with the test title on the RTX 5070 Ti (1 run).)bcb28d2on the RTX 5070 Ti machine, started in the logged-in desktop session (1 run): 771 passed, 0 failed, 41 ignored (lib 722 / 0 / 21), SKIPPED the same two, andhelp_after_a_command_prints_the_usagepassed. There the test that takes adapter 0 ran on the RTX 5070 Ti (its targets had that card's sizes, 41,811,968 bytes each).Regression run
Both blocks are from
scripts/smoke.ps1, unchanged, run by PowerShell 7 on Linux withxcl.exestarted through Wine, on a retail title, withXCL_PSO_PRELOAD=0. Under Wine "peak commit" reads 0 MB, andexit: 0x89is the wrapper ending Wine after XCL's ownprocess ends, not XCL's exit code. The blocks sayRTX 4060 Ti 8GBbecause that is the name vkd3d-proton gives this 16 GB card.main:
PR:
Not tested
AI use
Imported from ivall/xcl. Originally posted by nnonno91 on 2026-11-24T17:05:21Z.
Independent native Windows test of
bcb28d2ae1f2bab1c6bfa22e3e08287923e9627c.Tested
cargo build --workspace --lockedpassed.cargo test --locked -p xcl --test cli_help -- --nocapturepassed.cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --show-outputfinished with 771 passed, 0 failed, 41 ignored, and noSKIPPEDGPU lines. The bundled title test passed.b7aa9f3bd212088e0d927439284dc5ed325ce3c7withcargo build --locked -p xcl --bin xcland called each build directly. All ten combinations ofrun,inspect,disasm,shaders, orrpfwith--helpor-hgave a file error and exit 2 on the base. On the PR they printed the same usage as top-level--help, with exit 0 and empty stderr.shaderswith a genuinely missing file returned the same error and exit 2.inspect <same locally built xcl.exe> --jsonreturned identical valid JSON and exit 0.Not tested
Retail-title smoke runs, release builds, and Wine. The base build was used for the CLI comparison.
AI use
OpenAI Codex (GPT-6 family, exact variant unavailable) ran the checks and drafted this report.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T18:53:06Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodifiedmain.)Thanks!
Imported from ivall/xcl. Originally posted by S1m0ne1997 on 2026-11-25T15:20:50Z.
Test report for
bcb28d2ae1f2bab1c6bfa22e3e08287923e9627c(this PR's head), for #1607.Tested
rustc 1.100.0 (0ef1bc386 2026-11-09)x86_64-pc-windows-msvc, debug.cargo build --workspace, thencargo test --workspace -- --test-threads=4at the head: 771 passed, 0 failed, 41 ignored.gpu_geometry_wave32_prefix_count_over_a_mask(no wave64),gpu_wave32_program_in_wave64_hardware(no wave64).Regression run (retail title,
scripts/smoke.ps1 -Seconds 60, release;mainbuilt from the commit in its block, this PR from its head with no changes tocrates/, both run with thescripts/smoke.ps1ofmain, which hashes the name of the game folder)main:
this PR:
Peak commit is over the 125 % rule: this PR's run peaked at 21203 MB, 129 % of
main's 16384 MB (frames: within 80 %). I can't tell from this whether the PR causes it: this branch is based onb7aa9f3, 440 commits older than themaincommit (06c9f55) its run is compared with, and each side was run once. A smoke run of the base itself, or of this PR rebased onto currentmain, would separate the two.Not tested
AI use: Claude Code with Claude Opus 5.5 ran the build, the suite and the regression run and wrote this report at my request.
Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T09:30:00Z.
Review: COMMENTED
On
bcb28d2, the new second-argument help arm matchesSome(_)before command dispatch.xcl shdaers --help(misspelled/unknown command) now prints global usage and exits 0, where the normal unknown-command path on main exits 2. It also preempts cases such asxcl --version --help, which previously reported the version. The added integration test exercises only the five known commands, so it misses this change in CLI error behavior.Could the guard match only
run,inspect,disasm,shaders, andrpf? Acli_helpcontrol with an unknown command followed by--helpshould retain the nonzero exit while the ten known command/flag pairs keep passing. This is exact-head source review only; I did not run the binary.Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-12-01T02:33:30Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-12-01T02:51:01Z.
Still current: it merges into
maind0832e61without conflicts (checked withgit merge-treetoday). It waits for a maintainer.Edited: the first version also said the behaviour on
mainis unchanged; that was not rechecked today, so it is taken out.AI use: Claude Code, Claude Fable 5.2 checked the merge and wrote this line.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:52:14Z.
Triage (#1607) – head
bcb28d2No open or merged PR makes the same change. On main,
xcl run --helptreats--helpas the game path. The new arm inmain.rscatches--help/-has the second argument for any command before the command arms run, andtests/cli_help.rschecks the exit code and output. The test does not coverpso-precompileorcache, which main added since; the guard is generic, so it covers them too. No problems found in the diff.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-02T21:07:43Z.
Follow-up review of
c7137023, sincebcb28d2(code reading only, not a merge-check;PR descriptionred) · 1 nitIn short: The PR makes
xcl <command> --help(and-h) print the usage and exit 0, instead of treating the flag as a file to open. This push narrows the new arm to five commands (run,inspect,disasm,shaders,rpf), so a misspelled command still exits 2. A second test checks that. Nothing blocks it.Nit
xcl cache --helpstill exits 2.cacheis not in the new arm (main.rs~75), and its own arm needsstatusplus a path (~95). Soxcl cache --helpfalls through to_, which prints the usage and exits 2 (~103-109). Addcacheto the list if--helpafter it should succeed like the others.Checked and fine
pso-precompile. It is now limited to the five commands, sopso-precompile --helpkeeps its own usage and--version --helpstill prints the version.help_after_an_unknown_command_still_failschecks thatxcl shdaers --helpexits 2.Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-02T21:27:41Z.
Follow-up review of
b4d11cd0, sincec7137023(code reading only, not a merge-check;PR descriptionred) · no new findingsIn short: This push adds
cacheto the commands whose--help/-hprints the usage and exits 0, soxcl cache --helpno longer exits 2. The test now loops over all six commands, and the commit message says so. That was the only open point; nothing blocks it.Checked and fine
xcl cache --helpexited 2.cacheis now in the arm atmain.rs~75, ahead of its ownstatusarm.help_after_a_command_prints_the_usageruns the binary for the six commands with both flags.pso-precompile --helpkeeps its own usage, and--version --helpstill prints the version.Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point.
Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-12-02T22:02:09Z.
@luckyteagirl you were right, and thank you: the arm caught any first word, so
xcl shdaers --helpexited 0. It also tookpso-precompile --helpaway from that command's own usage, whichmainadded since. Fixed atb4d11cd08, rebased ontomain5ad98adb: the arm now matches onlyrun,inspect,disasm,shaders,rpfandcache.help_after_an_unknown_command_still_failsexpects exit 2 forxcl shdaers --helpand fails againstbcb28d2.@Foniass
cacheis in the list now, and the test runs it with both flags.AI use: Claude Code (Claude Opus 5.5) made the change, ran the tests under Wine and wrote this reply.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.