Skip to content

[nextest-runner] for user config platform overrides, always use build platform#3285

Merged
sunshowers merged 2 commits into
mainfrom
user-config-build
Apr 16, 2026
Merged

[nextest-runner] for user config platform overrides, always use build platform#3285
sunshowers merged 2 commits into
mainfrom
user-config-build

Conversation

@sunshowers

Copy link
Copy Markdown
Member

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.

… 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

codecov Bot commented Apr 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.63107% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.52%. Comparing base (e0b7fbf) to head (93b0f2a).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
nextest-runner/src/user_config/early.rs 82.14% 5 Missing ⚠️
cargo-nextest/src/dispatch/clap_error.rs 92.30% 4 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@trunk-io

trunk-io Bot commented Apr 16, 2026

Copy link
Copy Markdown

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-nextest to use the new UserConfig::load / EarlyUserConfig::load APIs 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.

Comment thread nextest-runner/src/user_config/imp.rs
Comment thread nextest-runner/src/user_config/early.rs
Comment thread site/src/docs/user-config/index.md Outdated
Comment thread nextest-runner/src/user_config/imp.rs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@sunshowers sunshowers merged commit b66bdc5 into main Apr 16, 2026
24 checks passed
@sunshowers sunshowers deleted the user-config-build branch April 16, 2026 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants