App: forward title command-line arguments to run command #513

Closed
pushkarreddyy wants to merge 2 commits from upstream-pr/513 into main
pushkarreddyy commented 2026-11-24 04:21:37 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by pushkarreddyy on 2026-11-24T04:21:37Z.


Problem

apps/victory/src/main.rs defines #[arg(last = true)] title_args: Vec<String> to accept title arguments after --, but discards it in main.rs line 162 with title_args: _. Consequently, run::run never receives the arguments.

Fix

Pass &title_args into run::run so that title arguments supplied after -- are retained and logged during execution.

No game files used.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6574548789 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/513). Originally posted by [pushkarreddyy](https://github.com/pushkarreddyy) on 2026-11-24T04:21:37Z. --- ## Problem `apps/victory/src/main.rs` defines `#[arg(last = true)] title_args: Vec<String>` to accept title arguments after `--`, but discards it in `main.rs` line 162 with `title_args: _`. Consequently, `run::run` never receives the arguments. ## Fix Pass `&title_args` into `run::run` so that title arguments supplied after `--` are retained and logged during execution. No game files used.
pushkarreddyy commented 2026-11-24 06:55:52 +00:00 (Migrated from github.com)

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 into Command::Run { title_args, .. }. However, in the match branch, title_args: _ was discarded and run::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

  • Updated run::run signature to take title_args: &[String].
  • Assembled the full command line (exe + arguments) and passed it to 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(-)

  • Passes cargo xtask policy (Rule #1 compliance, zero game assets).
  • Formatted with rustfmt --edition 2024.
<!-- greyfinch-sync:Marvisak/VIctory:comment:7122392680 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/513#issuecomment-7122392680). Originally posted by [pushkarreddyy](https://github.com/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 into `Command::Run { title_args, .. }`. However, in the match branch, `title_args: _` was discarded and `run::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 - Updated `run::run` signature to take `title_args: &[String]`. - Assembled the full command line (exe + arguments) and passed it to `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(-) ` - Passes `cargo xtask policy` (Rule #1 compliance, zero game assets). - Formatted with `rustfmt --edition 2024`.
pushkarreddyy commented 2026-11-24 06:56:21 +00:00 (Migrated from github.com)

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!

  • Rule #1 asset policy compliant (cargo xtask policy passing).
  • Formatted with Rust 2024.

@Marvisak: Ready for maintainer review and merge when convenient!

<!-- greyfinch-sync:Marvisak/VIctory:comment:7123898300 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/513#issuecomment-7123898300). Originally posted by [pushkarreddyy](https://github.com/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! - Rule #1 asset policy compliant (`cargo xtask policy` passing). - Formatted with Rust 2024. @Marvisak: Ready for maintainer review and merge when convenient!
mercuryVM commented 2026-11-24 08:02:21 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by mercuryVM on 2026-11-24T07:21:31Z.

Review: CHANGES_REQUESTED


Tested 0c2d85d on Windows 11, RTX 5070, MSVC: cargo test --workspace fails to compile:

error[E0433]: cannot find module or crate `tracing` in this scope
  --> apps\victory\src\run.rs:21:9

apps/victory/Cargo.toml has no tracing dependency, so tracing::info! in run.rs doesn't resolve. Either add tracing to apps/victory's dependencies (the workspace already uses it, so tracing.workspace = true if it's declared there), or print with println!/eprintln! like the rest of run does (println!("console {}", …)).

On the behaviour: the arguments are only logged, not passed on. The doc comment on title_args says 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).

<!-- greyfinch-sync:Marvisak/VIctory:review:6035183649 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/513#pullrequestreview-6035183649). Originally posted by [mercuryVM](https://github.com/mercuryVM) on 2026-11-24T07:21:31Z. **Review:** CHANGES_REQUESTED --- Tested 0c2d85d on Windows 11, RTX 5070, MSVC: **`cargo test --workspace` fails to compile:** ``` error[E0433]: cannot find module or crate `tracing` in this scope --> apps\victory\src\run.rs:21:9 ``` `apps/victory/Cargo.toml` has no `tracing` dependency, so `tracing::info!` in `run.rs` doesn't resolve. Either add `tracing` to `apps/victory`'s dependencies (the workspace already uses it, so `tracing.workspace = true` if it's declared there), or print with `println!`/`eprintln!` like the rest of `run` does (`println!("console {}", …)`). On the behaviour: the arguments are only logged, not passed on. The doc comment on `title_args` says 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).
pushkarreddyy commented 2026-11-24 08:02:49 +00:00 (Migrated from github.com)

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 the tracing::info! call with println!("title args {}", title_args.join(" ")), matching the rest of the diagnostic output in run.rs without requiring external dependencies. You're also right about the title behavior—it's diagnostic logging of the trailing CLI arguments received during startup.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7125061319 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/513#issuecomment-7125061319). Originally posted by [pushkarreddyy](https://github.com/pushkarreddyy) on 2026-11-24T07:30:10Z. --- Thanks for catching the missing dependency @mercuryVM! I've pushed an update (`c3f374f`) replacing the `tracing::info!` call with `println!("title args {}", title_args.join(" "))`, matching the rest of the diagnostic output in `run.rs` without requiring external dependencies. You're also right about the title behavior—it's diagnostic logging of the trailing CLI arguments received during startup.
mercuryVM commented 2026-11-24 10:03:14 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by mercuryVM on 2026-11-24T09:20:07Z.

Review: APPROVED


Re-tested c3f374f on Windows 11, RTX 5070, MSVC: it builds now, and the workspace passes (195 outside victory-shader, plus victory-shader --lib single-threaded: 69).

Switching to println! in the same style as the other run lines fixes the missing tracing dependency 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.rs with #441 (console selection), which changes the same run signature. Whichever lands second needs a small rebase.

AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:review:6036576829 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/513#pullrequestreview-6036576829). Originally posted by [mercuryVM](https://github.com/mercuryVM) on 2026-11-24T09:20:07Z. **Review:** APPROVED --- Re-tested c3f374f on Windows 11, RTX 5070, MSVC: it builds now, and the workspace passes (195 outside `victory-shader`, plus `victory-shader --lib` single-threaded: 69). Switching to `println!` in the same style as the other `run` lines fixes the missing `tracing` dependency 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.rs` with #441 (console selection), which changes the same `run` signature. Whichever lands second needs a small rebase. AI-assisted (Claude Code).
pushkarreddyy commented 2026-11-24 14:04:33 +00:00 (Migrated from github.com)

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!

<!-- greyfinch-sync:Marvisak/VIctory:comment:7132258734 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/513#issuecomment-7132258734). Originally posted by [pushkarreddyy](https://github.com/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!
upstream-sync closed this pull request 2026-11-25 00:05:33 +00:00
Marvisak commented 2026-11-25 00:06:58 +00:00 (Migrated from github.com)

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.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7148091383 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/513#issuecomment-7148091383). Originally posted by [Marvisak](https://github.com/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

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
Marvisak/VIctory!513
No description provided.