Loader: VICTORY_HLE_PROBE names a prebuilt hle-probe fixture #3268

Open
neonbyte1 wants to merge 2 commits from upstream-pr/3270 into main
neonbyte1 commented 2026-11-26 15:14:35 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by neonbyte1 on 2026-11-26T15:14:35Z.


Split out of #1218, as the maintainer triage asked, so that PR stays about the Wine test runner.

crates/victory-loader/tests/load_probe.rs builds the tests/fixtures/hle-probe fixture by running cargo from inside the test. Under Wine, the test process can't start the host's cargo, which isn't a Windows executable. With this change, VICTORY_HLE_PROBE, when set, names an already-built hle_probe.dll, and the test uses it directly. When it's unset, nothing changes.

One commit, one file; no fixture, runner or docs changes.

Tested under Wine (vkd3d-proton, Linux, RTX 5090) with the fixture cross-built on the host: loads_binds_and_calls_probe and maps_a_title_dll_the_title_loads_itself pass. Windows-target clippy (with and without --all-features) and cargo xtask policy pass. Not run on native Windows, where the variable is unset and the test path is the one on main.

AI-assisted (Claude); measured on my machine, no game data shared.

<!-- greyfinch-sync:Marvisak/VIctory:issue:5512585923 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3270). Originally posted by [neonbyte1](https://github.com/neonbyte1) on 2026-11-26T15:14:35Z. --- Split out of #1218, as the maintainer triage asked, so that PR stays about the Wine test runner. `crates/victory-loader/tests/load_probe.rs` builds the `tests/fixtures/hle-probe` fixture by running `cargo` from inside the test. Under Wine, the test process can't start the host's `cargo`, which isn't a Windows executable. With this change, `VICTORY_HLE_PROBE`, when set, names an already-built `hle_probe.dll`, and the test uses it directly. When it's unset, nothing changes. One commit, one file; no fixture, runner or docs changes. **Tested** under Wine (vkd3d-proton, Linux, RTX 5090) with the fixture cross-built on the host: `loads_binds_and_calls_probe` and `maps_a_title_dll_the_title_loads_itself` pass. Windows-target clippy (with and without `--all-features`) and `cargo xtask policy` pass. Not run on native Windows, where the variable is unset and the test path is the one on `main`. _AI-assisted (Claude); measured on my machine, no game data shared._
Dukestar69 commented 2026-11-26 15:28:15 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Dukestar69 on 2026-11-26T15:28:15Z.

Review: APPROVED


Reviewed the diff and verified locally on Windows 11 x64:

  • Allowing VICTORY_HLE_PROBE to point to a prebuilt hle-probe fixture cleanly avoids nested cargo invocations in environments like Wine while keeping the default build path unchanged.
  • cargo test -p victory-loader --test load_probe -- --test-threads=1: 2 passed, 0 failed.
  • cargo clippy -p victory-loader --all-targets -- -D warnings: clean.
  • cargo xtask policy: 191 files ok.

Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).

<!-- greyfinch-sync:Marvisak/VIctory:review:6076759157 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3270#pullrequestreview-6076759157). Originally posted by [Dukestar69](https://github.com/Dukestar69) on 2026-11-26T15:28:15Z. **Review:** APPROVED --- Reviewed the diff and verified locally on Windows 11 x64: - Allowing `VICTORY_HLE_PROBE` to point to a prebuilt `hle-probe` fixture cleanly avoids nested `cargo` invocations in environments like Wine while keeping the default build path unchanged. - `cargo test -p victory-loader --test load_probe -- --test-threads=1`: 2 passed, 0 failed. - `cargo clippy -p victory-loader --all-targets -- -D warnings`: clean. - `cargo xtask policy`: 191 files ok. Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
Jackster commented 2026-11-26 22:55:30 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Jackster on 2026-11-26T22:55:30Z.


Windows 11, 63bcca4 + this PR:

  • cargo test -p victory-loader --test load_probe: 2 passed (0.31 s), which is the default path (the test builds the fixture itself).
  • Then I removed the fixture's build tree (target/tmp/hle-probe), kept a copy of the built hle_probe.dll, set VICTORY_HLE_PROBE to it and re-ran: 2 passed in 0.09 s and the fixture build tree was not recreated. So the override really does skip the inner cargo, which is the case this adds for Wine runners.
  • cargo clippy -p victory-loader --all-targets -- -D warnings: clean.

Synthetic only. AI-assisted.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7205102715 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3270#issuecomment-7205102715). Originally posted by [Jackster](https://github.com/Jackster) on 2026-11-26T22:55:30Z. --- Windows 11, `63bcca4` + this PR: - `cargo test -p victory-loader --test load_probe`: 2 passed (0.31 s), which is the default path (the test builds the fixture itself). - Then I removed the fixture's build tree (`target/tmp/hle-probe`), kept a copy of the built `hle_probe.dll`, set `VICTORY_HLE_PROBE` to it and re-ran: **2 passed in 0.09 s and the fixture build tree was not recreated**. So the override really does skip the inner `cargo`, which is the case this adds for Wine runners. - `cargo clippy -p victory-loader --all-targets -- -D warnings`: clean. Synthetic only. AI-assisted.
neonbyte1 commented 2026-11-26 23:00:52 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by neonbyte1 on 2026-11-26T23:00:52Z.


@Jackster thanks for checking both paths. Removing the fixture's build tree and confirming it isn't recreated with VICTORY_HLE_PROBE set is exactly the case this is for.

AI-assisted (Claude); no game data shared.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7205178875 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3270#issuecomment-7205178875). Originally posted by [neonbyte1](https://github.com/neonbyte1) on 2026-11-26T23:00:52Z. --- @Jackster thanks for checking both paths. Removing the fixture's build tree and confirming it isn't recreated with `VICTORY_HLE_PROBE` set is exactly the case this is for. _AI-assisted (Claude); no game data shared._
fuzeofficlal commented 2026-11-27 01:11:10 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-27T01:11:10Z.

Review: APPROVED


Looks good. Clean and minimal way to reuse a prebuilt hle_probe.dll in environments where running nested cargo isn't possible.

Verified:

  • cargo xtask policy and cargo clippy --tests -p victory-loader -- -D warnings pass cleanly.
  • cargo test --locked -p victory-loader --test load_probe passes (2/2) both with VICTORY_HLE_PROBE unset (builds fixture) and with VICTORY_HLE_PROBE pointing to the prebuilt hle_probe.dll (skips nested cargo build).

(Minor optional note): on Unix/Wine runners where an empty env var (VICTORY_HLE_PROBE=) can exist, .filter(|p| !p.is_empty()) would fall back to building rather than returning an empty PathBuf.

<!-- greyfinch-sync:Marvisak/VIctory:review:6082188838 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3270#pullrequestreview-6082188838). Originally posted by [fuzeofficlal](https://github.com/fuzeofficlal) on 2026-11-27T01:11:10Z. **Review:** APPROVED --- Looks good. Clean and minimal way to reuse a prebuilt `hle_probe.dll` in environments where running nested `cargo` isn't possible. Verified: - `cargo xtask policy` and `cargo clippy --tests -p victory-loader -- -D warnings` pass cleanly. - `cargo test --locked -p victory-loader --test load_probe` passes (2/2) both with `VICTORY_HLE_PROBE` unset (builds fixture) and with `VICTORY_HLE_PROBE` pointing to the prebuilt `hle_probe.dll` (skips nested cargo build). *(Minor optional note)*: on Unix/Wine runners where an empty env var (`VICTORY_HLE_PROBE=`) can exist, `.filter(|p| !p.is_empty())` would fall back to building rather than returning an empty `PathBuf`.
neonbyte1 commented 2026-11-27 01:17:18 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by neonbyte1 on 2026-11-27T01:17:18Z.


@fuzeofficlal thanks for the review. Took the optional note in 711b2d5c: VICTORY_HLE_PROBE set but empty now falls back to building the fixture (.filter(|p| !p.is_empty())), and the doc comment says so. Clippy (--tests, Windows target, -D warnings) and rustfmt are clean. The tests are Windows-only, so on Linux this is compile-checked; the empty-variable path itself is the usual nested-cargo build, which only a native Windows run exercises.

AI-assisted (Claude); no game data shared.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7207167501 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3270#issuecomment-7207167501). Originally posted by [neonbyte1](https://github.com/neonbyte1) on 2026-11-27T01:17:18Z. --- @fuzeofficlal thanks for the review. Took the optional note in `711b2d5c`: `VICTORY_HLE_PROBE` set but empty now falls back to building the fixture (`.filter(|p| !p.is_empty())`), and the doc comment says so. Clippy (`--tests`, Windows target, `-D warnings`) and rustfmt are clean. The tests are Windows-only, so on Linux this is compile-checked; the empty-variable path itself is the usual nested-cargo build, which only a native Windows run exercises. _AI-assisted (Claude); no game data shared._
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/3270:upstream-pr/3270'
git switch 'upstream-pr/3270'

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/3270'
git switch 'upstream-pr/3270'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3270'
git switch 'upstream-pr/3270'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3270'
git switch 'main'
git merge --squash 'upstream-pr/3270'
git switch 'main'
git merge --ff-only 'upstream-pr/3270'
git switch 'main'
git merge 'upstream-pr/3270'
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
Marvisak/VIctory!3268
No description provided.