[nextest-runner] for user config platform overrides, always use build platform#3285
Conversation
… platform We currently use the build target platform in some cases and the host platform in others. This is pretty janky. Always use the build target platform. For user config that makes a lot of sense.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3285 +/- ##
==========================================
+ Coverage 85.51% 85.52% +0.01%
==========================================
Files 160 160
Lines 47835 47827 -8
==========================================
- Hits 40905 40904 -1
+ Misses 6930 6923 -7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR standardizes how user config platform overrides are evaluated by always matching [[overrides]].platform against the nextest binary’s build target (what it was compiled for), instead of sometimes using runtime host detection. This aligns behavior across normal runs, archive replay, and early help/pager paths, and updates documentation accordingly.
Changes:
- Switch user-config override resolution to consistently use
Platform::build_target()instead of host platform detection. - Refactor call sites in
cargo-nextestto use the newUserConfig::load/EarlyUserConfig::loadAPIs and simplify early CLI handling. - Update docs to describe build-target matching and distinguish it from per-test override platform matching.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| site/src/docs/user-config/reference.md | Updates reference text to state overrides match the nextest build target. |
| site/src/docs/user-config/index.md | Updates user-config guide with build-target semantics and adds clarifying note vs per-test overrides. |
| nextest-runner/src/user_config/imp.rs | Introduces UserConfig::load using build target for override evaluation. |
| nextest-runner/src/user_config/helpers.rs | Renames host platform parameter to build target and uses it for matching. |
| nextest-runner/src/user_config/elements/ui.rs | Uses build target for UI override matching and updates tests accordingly. |
| nextest-runner/src/user_config/elements/record.rs | Uses build target for record override matching and updates tests accordingly. |
| nextest-runner/src/user_config/early.rs | Switches early pager config loading to build-target-based override evaluation. |
| nextest-runner/src/platform.rs | Removes test-only host platform detection helper no longer used by updated tests. |
| cargo-nextest/src/dispatch/imp.rs | Switches early CLI setup to EarlyArgs::extract and updates clap error handling path. |
| cargo-nextest/src/dispatch/helpers.rs | Updates resolve_user_config to call UserConfig::load (no host platform arg). |
| cargo-nextest/src/dispatch/core/run.rs | Updates run/bench paths to resolve user config without passing host platform. |
| cargo-nextest/src/dispatch/core/replay.rs | Uses shared resolve_user_config helper for replay’s early user-config loading. |
| cargo-nextest/src/dispatch/core/list.rs | Updates list paths to resolve user config without passing host platform. |
| cargo-nextest/src/dispatch/clap_error.rs | Removes EarlySetup, moves early arg extraction into EarlyArgs::extract, and uses EarlyUserConfig::load. |
| cargo-nextest/src/dispatch/app.rs | Uses shared resolve_user_config helper for the store command path. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
We currently use the build target platform in some cases and the host platform in others. This is pretty janky.
Always use the build target platform. For user config that makes the most sense.