feat: add manifest options support for cargo build invocations#656
Open
svasista-ms wants to merge 5 commits into
Open
feat: add manifest options support for cargo build invocations#656svasista-ms wants to merge 5 commits into
svasista-ms wants to merge 5 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for forwarding Cargo “manifest options” (--locked, --offline, --frozen) from cargo wdk build down to the underlying Cargo build invocations, improving reproducibility/offline support.
Changes:
- Introduces a
ManifestOptionsclap args struct and exposes it on thebuildCLI via#[command(flatten)]. - Threads
ManifestOptionsthroughBuildAction/BuildTaskand forwards flags tocargo buildandcargo rustc. - Adds/updates unit tests to validate the forwarding behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| crates/cargo-wdk/src/cli.rs | Adds flattened manifest-related CLI flags to the build subcommand and passes them into the build action. |
| crates/cargo-wdk/src/actions/mod.rs | Defines ManifestOptions and a helper to convert the selected options into Cargo CLI args. |
| crates/cargo-wdk/src/actions/build/mod.rs | Stores/propagates ManifestOptions within BuildAction and forwards them to cargo rustc target-probing. |
| crates/cargo-wdk/src/actions/build/build_task.rs | Forwards ManifestOptions into the cargo build command args; adds focused tests for forwarding. |
| crates/cargo-wdk/src/actions/build/tests.rs | Extends build action tests to cover manifest option forwarding in higher-level orchestration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #656 +/- ##
==========================================
+ Coverage 79.45% 79.85% +0.40%
==========================================
Files 26 26
Lines 5500 5610 +110
Branches 5500 5610 +110
==========================================
+ Hits 4370 4480 +110
Misses 1001 1001
Partials 129 129 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for forwarding Cargo “manifest options” (--locked, --offline, --frozen) from
cargo wdk builddown to the underlying Cargo build invocations, improving reproducibility/offline support.Resolves #648
Changes
ManifestOptionsclapargsstruct and exposes it on the build CLI via #[command(flatten)] [1]cargo metadata,cargo buildandcargo rustcinvocations in the build action. [2] [3] [4]Screenshots
cargo wdk build --helpshowing Manifest Options:cargo wdk build --locked --sampleon the/examplesemulated workspace: