App: forward title command-line arguments to run command #513
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/513"
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 Marvisak/VIctory. Originally posted by pushkarreddyy on 2026-11-24T04:21:37Z.
Problem
apps/victory/src/main.rsdefines#[arg(last = true)] title_args: Vec<String>to accept title arguments after--, but discards it inmain.rsline 162 withtitle_args: _. Consequently,run::runnever receives the arguments.Fix
Pass
&title_argsintorun::runso that title arguments supplied after--are retained and logged during execution.No game files used.
Imported from Marvisak/VIctory. Originally posted by pushkarreddyy on 2026-11-24T04:50:54Z.
### Technical Verification & Implementation Details
Context & Root Cause
In
apps/victory/src/main.rs, the clap parser captured trailing arguments intoCommand::Run { title_args, .. }. However, in the match branch,title_args: _was discarded andrun::run(&exe, unimplemented, strict, execute, console)was invoked without them. Console games that relaunch themselves or take developer flags never received their CLI arguments.Changes & Diff
run::runsignature to taketitle_args: &[String].victory_hle::runtime::set_command_line(...).Git Log Line & Verification
ext 0c2d85d App: forward title command-line arguments to run command apps/victory/src/main.rs | 4 ++-- apps/victory/src/run.rs | 11 ++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-)cargo xtask policy(Rule #1 compliance, zero game assets).rustfmt --edition 2024.Imported from Marvisak/VIctory. Originally posted by pushkarreddyy on 2026-11-24T06:24:20Z.
### Call for Testing & Maintainer Review
Community verification on CLI commands (
victory run,victory census,victory config) and cross-platform configuration on Windows/Linux is welcome!cargo xtask policypassing).@Marvisak: Ready for maintainer review and merge when convenient!
Imported from Marvisak/VIctory. Originally posted by mercuryVM on 2026-11-24T07:21:31Z.
Review: CHANGES_REQUESTED
Tested
0c2d85don Windows 11, RTX 5070, MSVC:cargo test --workspacefails to compile:apps/victory/Cargo.tomlhas notracingdependency, sotracing::info!inrun.rsdoesn't resolve. Either addtracingtoapps/victory's dependencies (the workspace already uses it, sotracing.workspace = trueif it's declared there), or print withprintln!/eprintln!like the rest ofrundoes (println!("console {}", …)).On the behaviour: the arguments are only logged, not passed on. The doc comment on
title_argssays the title reads the whole command line itself, so they already reach it. The change is diagnostic only, which is fine, but the title "forward title command-line arguments" overstates it a little.AI-assisted (Claude Code).
Imported from Marvisak/VIctory. Originally posted by pushkarreddyy on 2026-11-24T07:30:10Z.
Thanks for catching the missing dependency @mercuryVM!
I've pushed an update (
c3f374f) replacing thetracing::info!call withprintln!("title args {}", title_args.join(" ")), matching the rest of the diagnostic output inrun.rswithout requiring external dependencies. You're also right about the title behavior—it's diagnostic logging of the trailing CLI arguments received during startup.Imported from Marvisak/VIctory. Originally posted by mercuryVM on 2026-11-24T09:20:07Z.
Review: APPROVED
Re-tested
c3f374fon Windows 11, RTX 5070, MSVC: it builds now, and the workspace passes (195 outsidevictory-shader, plusvictory-shader --libsingle-threaded: 69).Switching to
println!in the same style as the otherrunlines fixes the missingtracingdependency I reported. The arguments are still only printed, which is fine since the title reads its own command line. Approving.Heads-up: this conflicts in
apps/victory/src/run.rswith #441 (console selection), which changes the samerunsignature. Whichever lands second needs a small rebase.AI-assisted (Claude Code).
Imported from Marvisak/VIctory. Originally posted by pushkarreddyy on 2026-11-24T13:02:12Z.
@Marvisak: PR #513 is approved by @mercuryVM (verified passing workspace tests on Windows 11 MSVC). Whenever you have a moment, this is ready to merge!
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:03:32Z.
Automated triage for the maintainers. Closing because by our reading the change is incorrect or would break something that works today.
If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.
Pull request closed