CLI: xcl <command> --help prints the usage #1458

Open
Royalflamejlh wants to merge 1 commit from upstream-pr/1468 into main
Royalflamejlh commented 2026-11-24 16:34:06 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-11-24T16:34:06Z.


xcl shaders --help answered xcl 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 only xcl --help reached the usage. --help or -h right 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 for run, inspect, disasm, shaders and rpf with --help and with -h, and expects exit 0 and the usage on stdout. Before the change it failed on xcl run --help (exit 2, xcl: --help: File not found. (os error 2)).

Tested

  • Linux through Wine and vkd3d-proton. NVIDIA GeForce RTX 4070 12 GB for the test suite and RTX 4060 Ti 16 GB for the regression runs (driver 615.71.09), Ryzen 9 9950X3D, Fedora 44, Wine 11.21 Staging, vkd3d-proton v3.1-90-g30b0eb9b, rustc 1.98.0, release, x86_64-pc-windows-gnu.
  • cargo test --workspace --release --target x86_64-pc-windows-gnu -- --test-threads=4 on bcb28d2: 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).
  • The 4 failures are the same on main b7aa9f3 in 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.
  • Two lib tests hang in a full lib run under Wine, on main as well, and are not in the counts (--skip): d32s8_targets_take_their_own_size_of_video_memory and reservable_agrees_with_the_driver. Each passes when run alone on main.
  • The new test: 1 failed before the change, 1 passed after it.
  • Native Windows 11, 2 machines, cargo test --workspace --release --no-fail-fast -j 8 -- --test-threads=4 on bcb28d2, 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, and help_after_a_command_prints_the_usage passed. The one failure is test_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 --release on bcb28d2 gave 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 after cargo 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).)
  • The same command on bcb28d2 on 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, and help_after_a_command_prints_the_usage passed. 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 with xcl.exe started through Wine, on a retail title, with XCL_PSO_PRELOAD=0. Under Wine "peak commit" reads 0 MB, and exit: 0x89 is the wrapper ending Wine after XCL's own process ends, not XCL's exit code. The blocks say RTX 4060 Ti 8GB because that is the name vkd3d-proton gives this 16 GB card.

main:

xcl-smoke v1
commit: b7aa9f3bd212088e0d927439284dc5ed325ce3c7
gpu: NVIDIA GeForce RTX 4060 Ti 8GB
title: 7952987A
seconds: 60
exit: 0x89
frames shown: 1553 (PresentX 1553)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 0 MB

PR:

xcl-smoke v1
commit: bcb28d2ae1f2bab1c6bfa22e3e08287923e9627c
gpu: NVIDIA GeForce RTX 4060 Ti 8GB
title: 7952987A
seconds: 60
exit: 0x89
frames shown: 1593 (PresentX 1593)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 0 MB

Not tested

  • The title run does not reach the changed code, which is the command line's argument handling; the new test does.

AI use

  • Claude Code (Claude Fable 5.2) found this while running the offline shader pass, wrote the change and the test, ran the suite and the regression runs on this machine, ran the suite on two Windows machines over SSH, and wrote this description.
<!-- greyfinch-sync:ivall/xcl:issue:5476264898 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1468). Originally posted by [Royalflamejlh](https://github.com/Royalflamejlh) on 2026-11-24T16:34:06Z. --- `xcl shaders --help` answered `xcl 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 only `xcl --help` reached the usage. `--help` or `-h` right 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 for `run`, `inspect`, `disasm`, `shaders` and `rpf` with `--help` and with `-h`, and expects exit 0 and the usage on stdout. Before the change it failed on `xcl run --help` (exit 2, `xcl: --help: File not found. (os error 2)`). **Tested** - Linux through Wine and vkd3d-proton. NVIDIA GeForce RTX 4070 12 GB for the test suite and RTX 4060 Ti 16 GB for the regression runs (driver 615.71.09), Ryzen 9 9950X3D, Fedora 44, Wine 11.21 Staging, vkd3d-proton v3.1-90-g30b0eb9b, rustc 1.98.0, release, `x86_64-pc-windows-gnu`. - `cargo test --workspace --release --target x86_64-pc-windows-gnu -- --test-threads=4` on `bcb28d2`: 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). - The 4 failures are the same on `main` `b7aa9f3` in 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`. - Two lib tests hang in a full lib run under Wine, on `main` as well, and are not in the counts (`--skip`): `d32s8_targets_take_their_own_size_of_video_memory` and `reservable_agrees_with_the_driver`. Each passes when run alone on `main`. - The new test: 1 failed before the change, 1 passed after it. - Native Windows 11, 2 machines, `cargo test --workspace --release --no-fail-fast -j 8 -- --test-threads=4` on `bcb28d2`, 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, and `help_after_a_command_prints_the_usage` passed. The one failure is `test_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 --release` on `bcb28d2` gave 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 after `cargo 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).) - The same command on `bcb28d2` on 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, and `help_after_a_command_prints_the_usage` passed. 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 with `xcl.exe` started through Wine, on a retail title, with `XCL_PSO_PRELOAD=0`. Under Wine "peak commit" reads 0 MB, and `exit: 0x89` is the wrapper ending Wine after XCL's own `process ends`, not XCL's exit code. The blocks say `RTX 4060 Ti 8GB` because that is the name vkd3d-proton gives this 16 GB card. main: ``` xcl-smoke v1 commit: b7aa9f3bd212088e0d927439284dc5ed325ce3c7 gpu: NVIDIA GeForce RTX 4060 Ti 8GB title: 7952987A seconds: 60 exit: 0x89 frames shown: 1553 (PresentX 1553) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 0 MB ``` PR: ``` xcl-smoke v1 commit: bcb28d2ae1f2bab1c6bfa22e3e08287923e9627c gpu: NVIDIA GeForce RTX 4060 Ti 8GB title: 7952987A seconds: 60 exit: 0x89 frames shown: 1593 (PresentX 1593) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 0 MB ``` **Not tested** - The title run does not reach the changed code, which is the command line's argument handling; the new test does. **AI use** - Claude Code (Claude Fable 5.2) found this while running the offline shader pass, wrote the change and the test, ran the suite and the regression runs on this machine, ran the suite on two Windows machines over SSH, and wrote this description.
nnonno91 commented 2026-11-24 17:06:48 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by nnonno91 on 2026-11-24T17:05:21Z.


Independent native Windows test of bcb28d2ae1f2bab1c6bfa22e3e08287923e9627c.

Tested

  • Windows 11 25H2 (26200.9974), Ryzen 7 9800X3D, AMD Radeon(TM) Graphics (32.0.21042.62), Rust 1.100.0 MSVC, DXC 1.8.2502.11, debug.
  • cargo build --workspace --locked passed. cargo test --locked -p xcl --test cli_help -- --nocapture passed. cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --show-output finished with 771 passed, 0 failed, 41 ignored, and no SKIPPED GPU lines. The bundled title test passed.
  • I also built b7aa9f3bd212088e0d927439284dc5ed325ce3c7 with cargo build --locked -p xcl --bin xcl and called each build directly. All ten combinations of run, inspect, disasm, shaders, or rpf with --help or -h gave 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.
  • Control cases matched on both builds. shaders with a genuinely missing file returned the same error and exit 2. inspect <same locally built xcl.exe> --json returned 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.

<!-- greyfinch-sync:ivall/xcl:comment:7138666536 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1468#issuecomment-7138666536). Originally posted by [nnonno91](https://github.com/nnonno91) on 2026-11-24T17:05:21Z. --- Independent native Windows test of `bcb28d2ae1f2bab1c6bfa22e3e08287923e9627c`. **Tested** - Windows 11 25H2 (26200.9974), Ryzen 7 9800X3D, AMD Radeon(TM) Graphics (32.0.21042.62), Rust 1.100.0 MSVC, DXC 1.8.2502.11, debug. - `cargo build --workspace --locked` passed. `cargo test --locked -p xcl --test cli_help -- --nocapture` passed. `cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --show-output` finished with 771 passed, 0 failed, 41 ignored, and no `SKIPPED` GPU lines. The bundled title test passed. - I also built `b7aa9f3bd212088e0d927439284dc5ed325ce3c7` with `cargo build --locked -p xcl --bin xcl` and called each build directly. All ten combinations of `run`, `inspect`, `disasm`, `shaders`, or `rpf` with `--help` or `-h` gave 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. - Control cases matched on both builds. `shaders` with a genuinely missing file returned the same error and exit 2. `inspect <same locally built xcl.exe> --json` returned 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.
DavidM1911 commented 2026-11-24 19:07:44 +00:00 (Migrated from github.com)

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 unmodified main.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7141287432 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1468#issuecomment-7141287432). Originally posted by [DavidM1911](https://github.com/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 unmodified `main`.) Thanks!
S1m0ne1997 commented 2026-11-25 16:12:09 +00:00 (Migrated from github.com)

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

  • NVIDIA GeForce RTX 4090 24 GB (driver 621.40), AMD Ryzen 9 9950X3D, 47 GB RAM, Windows 11 Home 10.0.26300, rustc 1.100.0 (0ef1bc386 2026-11-09) x86_64-pc-windows-msvc, debug.
  • cargo build --workspace, then cargo test --workspace -- --test-threads=4 at the head: 771 passed, 0 failed, 41 ignored.
  • SKIPPED (2): 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; main built from the commit in its block, this PR from its head with no changes to crates/, both run with the scripts/smoke.ps1 of main, which hashes the name of the game folder)

main:

xcl-smoke v1
commit: 06c9f5505f63f10c5ec49ef932d75b2c28177324
gpu: NVIDIA GeForce RTX 4090
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1599 (PresentX 1599)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16384 MB

this PR:

xcl-smoke v1
commit: bcb28d2ae1f2bab1c6bfa22e3e08287923e9627c
gpu: NVIDIA GeForce RTX 4090
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1666 (PresentX 1666)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 21203 MB

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 on b7aa9f3, 440 commits older than the main commit (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 current main, would separate the two.

Not tested

  • AMD, other NVIDIA cards and drivers, Linux. I did not review the diff; this report is the build, the suite and the regression run only.

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.

<!-- greyfinch-sync:ivall/xcl:comment:7166698161 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1468#issuecomment-7166698161). Originally posted by [S1m0ne1997](https://github.com/S1m0ne1997) on 2026-11-25T15:20:50Z. --- Test report for `bcb28d2ae1f2bab1c6bfa22e3e08287923e9627c` (this PR's head), for #1607. **Tested** - NVIDIA GeForce RTX 4090 24 GB (driver 621.40), AMD Ryzen 9 9950X3D, 47 GB RAM, Windows 11 Home 10.0.26300, `rustc 1.100.0 (0ef1bc386 2026-11-09)` `x86_64-pc-windows-msvc`, debug. - `cargo build --workspace`, then `cargo test --workspace -- --test-threads=4` at the head: **771 passed, 0 failed, 41 ignored**. - SKIPPED (2): `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; `main` built from the commit in its block, this PR from its head with no changes to `crates/`, both run with the `scripts/smoke.ps1` of `main`, which hashes the name of the game folder) main: ``` xcl-smoke v1 commit: 06c9f5505f63f10c5ec49ef932d75b2c28177324 gpu: NVIDIA GeForce RTX 4090 title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1599 (PresentX 1599) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16384 MB ``` this PR: ``` xcl-smoke v1 commit: bcb28d2ae1f2bab1c6bfa22e3e08287923e9627c gpu: NVIDIA GeForce RTX 4090 title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1666 (PresentX 1666) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 21203 MB ``` **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 on `b7aa9f3`, 440 commits older than the `main` commit (`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 current `main`, would separate the two. **Not tested** - AMD, other NVIDIA cards and drivers, Linux. I did not review the diff; this report is the build, the suite and the regression run only. *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.*
luckyteagirl commented 2026-11-26 09:30:00 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T09:30:00Z.

Review: COMMENTED


On bcb28d2, the new second-argument help arm matches Some(_) 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 as xcl --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, and rpf? A cli_help control with an unknown command followed by --help should 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.

<!-- greyfinch-sync:ivall/xcl:review:6071570865 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1468#pullrequestreview-6071570865). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-26T09:30:00Z. **Review:** COMMENTED --- On `bcb28d2`, the new second-argument help arm matches `Some(_)` 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 as `xcl --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`, and `rpf`? A `cli_help` control with an unknown command followed by `--help` should 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.
github-actions[bot] commented 2026-12-01 02:33:30 +00:00 (Migrated from github.com)

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 stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7298744897 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1468#issuecomment-7298744897). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-12-01T02:33:30Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Royalflamejlh commented 2026-12-01 02:51:01 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-12-01T02:51:01Z.


Still current: it merges into main d0832e61 without conflicts (checked with git merge-tree today). It waits for a maintainer.

Edited: the first version also said the behaviour on main is 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.

<!-- greyfinch-sync:ivall/xcl:comment:7299059261 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1468#issuecomment-7299059261). Originally posted by [Royalflamejlh](https://github.com/Royalflamejlh) on 2026-12-01T02:51:01Z. --- Still current: it merges into `main` `d0832e61` without conflicts (checked with `git merge-tree` today). It waits for a maintainer. Edited: the first version also said the behaviour on `main` is 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.
Foniass commented 2026-12-01 05:52:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:52:14Z.


Triage (#1607) – head bcb28d2

No open or merged PR makes the same change. On main, xcl run --help treats --help as the game path. The new arm in main.rs catches --help/-h as the second argument for any command before the command arms run, and tests/cli_help.rs checks the exit code and output. The test does not cover pso-precompile or cache, 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.

<!-- greyfinch-sync:ivall/xcl:comment:7302225832 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1468#issuecomment-7302225832). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T05:52:14Z. --- **Triage (#1607)** – head bcb28d2 No open or merged PR makes the same change. On main, `xcl run --help` treats `--help` as the game path. The new arm in `main.rs` catches `--help`/`-h` as the second argument for any command before the command arms run, and `tests/cli_help.rs` checks the exit code and output. The test does not cover `pso-precompile` or `cache`, 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.
Foniass commented 2026-12-02 21:07:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-02T21:07:43Z.


Follow-up review of c7137023, since bcb28d2 (code reading only, not a merge-check; PR description red) · 1 nit

In 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

  1. xcl cache --help still exits 2. cache is not in the new arm (main.rs ~75), and its own arm needs status plus a path (~95). So xcl cache --help falls through to _, which prints the usage and exits 2 (~103-109). Add cache to the list if --help after it should succeed like the others.
Checked and fine
  • Earlier triage note: the guard was generic and also caught pso-precompile. It is now limited to the five commands, so pso-precompile --help keeps its own usage and --version --help still prints the version.
  • help_after_an_unknown_command_still_fails checks that xcl shdaers --help exits 2.
  • The existing test still runs the binary for the five commands with both flags.

Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7358830393 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1468#issuecomment-7358830393). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-02T21:07:43Z. --- **Follow-up review** of `c7137023`, since `bcb28d2` (code reading only, not a merge-check; `PR description` red) · 1 nit **In 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 1. **`xcl cache --help` still exits 2.** `cache` is not in the new arm (`main.rs` ~75), and its own arm needs `status` plus a path (~95). So `xcl cache --help` falls through to `_`, which prints the usage and exits 2 (~103-109). Add `cache` to the list if `--help` after it should succeed like the others. <details><summary>Checked and fine</summary> - Earlier triage note: the guard was generic and also caught `pso-precompile`. It is now limited to the five commands, so `pso-precompile --help` keeps its own usage and `--version --help` still prints the version. - `help_after_an_unknown_command_still_fails` checks that `xcl shdaers --help` exits 2. - The existing test still runs the binary for the five commands with both flags. </details> <sub>Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point.</sub>
Foniass commented 2026-12-02 21:27:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-02T21:27:41Z.


Follow-up review of b4d11cd0, since c7137023 (code reading only, not a merge-check; PR description red) · no new findings

In short: This push adds cache to the commands whose --help / -h prints the usage and exits 0, so xcl cache --help no 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
  • Earlier finding fixed: xcl cache --help exited 2. cache is now in the arm at main.rs ~75, ahead of its own status arm.
  • help_after_a_command_prints_the_usage runs the binary for the six commands with both flags.
  • A misspelled command still exits 2, pso-precompile --help keeps its own usage, and --version --help still prints the version.

Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7359312697 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1468#issuecomment-7359312697). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-02T21:27:41Z. --- **Follow-up review** of `b4d11cd0`, since `c7137023` (code reading only, not a merge-check; `PR description` red) · no new findings **In short:** This push adds `cache` to the commands whose `--help` / `-h` prints the usage and exits 0, so `xcl cache --help` no 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. <details><summary>Checked and fine</summary> - Earlier finding fixed: `xcl cache --help` exited 2. `cache` is now in the arm at `main.rs` ~75, ahead of its own `status` arm. - `help_after_a_command_prints_the_usage` runs the binary for the six commands with both flags. - A misspelled command still exits 2, `pso-precompile --help` keeps its own usage, and `--version --help` still prints the version. </details> <sub>Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point.</sub>
Royalflamejlh commented 2026-12-02 22:02:09 +00:00 (Migrated from github.com)

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 --help exited 0. It also took pso-precompile --help away from that command's own usage, which main added since. Fixed at b4d11cd08, rebased onto main 5ad98adb: the arm now matches only run, inspect, disasm, shaders, rpf and cache. help_after_an_unknown_command_still_fails expects exit 2 for xcl shdaers --help and fails against bcb28d2.

@Foniass cache is 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.

<!-- greyfinch-sync:ivall/xcl:comment:7360132271 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1468#issuecomment-7360132271). Originally posted by [Royalflamejlh](https://github.com/Royalflamejlh) on 2026-12-02T22:02:09Z. --- @luckyteagirl you were right, and thank you: the arm caught any first word, so `xcl shdaers --help` exited 0. It also took `pso-precompile --help` away from that command's own usage, which `main` added since. Fixed at `b4d11cd08`, rebased onto `main` `5ad98adb`: the arm now matches only `run`, `inspect`, `disasm`, `shaders`, `rpf` and `cache`. `help_after_an_unknown_command_still_fails` expects exit 2 for `xcl shdaers --help` and fails against `bcb28d2`. @Foniass `cache` is 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.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1468:upstream-pr/1468'
git switch 'upstream-pr/1468'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/1468'
git switch 'upstream-pr/1468'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1468'
git switch 'upstream-pr/1468'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1468'
git switch 'main'
git merge --squash 'upstream-pr/1468'
git switch 'main'
git merge --ff-only 'upstream-pr/1468'
git switch 'main'
git merge 'upstream-pr/1468'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!1458
No description provided.