Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass in --filter-platform to cargo metadata #1461

Merged
merged 4 commits into from
Apr 24, 2024
Merged

Conversation

sunshowers
Copy link
Member

@sunshowers sunshowers commented Apr 23, 2024

This required a surprising amount of rejiggering, but ended up paying off a lot of tech debt. I realized that now that we're passing in frozen/locked/offline, we'd better not cause excessive downloads due to platforms.

However, extra downloads compared to cargo test can still happen because nextest currently asks for data about all features. I think changing this may not be possible due to #1402. We're likely going to need graph metadata about all features in #1402, in order to make decisions about what to really build.

TODO:

  • Add a test to ensure a custom platform can be built against, and extracted with metadata.

Fixes #1298.

Copy link

codecov bot commented Apr 23, 2024

Codecov Report

Attention: Patch coverage is 79.32203% with 61 lines in your changes are missing coverage. Please review.

Project coverage is 78.47%. Comparing base (e2b3cfb) to head (1439087).

Files Patch % Lines
nextest-runner/src/cargo_config/custom_platform.rs 71.91% 25 Missing ⚠️
nextest-runner/src/reuse_build/mod.rs 60.00% 16 Missing ⚠️
cargo-nextest/src/errors.rs 0.00% 10 Missing ⚠️
nextest-runner/src/cargo_config/target_triple.rs 86.36% 9 Missing ⚠️
nextest-runner/src/errors.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1461      +/-   ##
==========================================
+ Coverage   78.37%   78.47%   +0.10%     
==========================================
  Files          74       75       +1     
  Lines       17934    18076     +142     
==========================================
+ Hits        14056    14186     +130     
- Misses       3878     3890      +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

There's no real point delaying these -- turns out we need them at the start of
the program anyway.
We're basically always going to need the build platforms anyway, so just
construct it immediately at startup.
@sunshowers sunshowers force-pushed the cargo-metadata-filter branch from df0dc20 to f6e1021 Compare April 23, 2024 08:46
@sunshowers sunshowers force-pushed the cargo-metadata-filter branch from f6e1021 to 1439087 Compare April 24, 2024 01:26
@sunshowers sunshowers merged commit 2405e81 into main Apr 24, 2024
13 checks passed
@sunshowers sunshowers deleted the cargo-metadata-filter branch April 24, 2024 01:34
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.

nextest downloads unused dependencies
1 participant