fix: remove --cwd arg from cargo-wdk#437
Merged
wmmc88 merged 6 commits intomicrosoft:mainfrom Aug 11, 2025
Merged
Conversation
f85beda to
ef59e19
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR removes the --cwd argument from cargo-wdk to better align with standard cargo build UX, which uses --manifest-path instead of --cwd for specifying project paths.
- Removes
--cwdCLI argument definition and related code - Updates tests to use
current_dir()method instead of--cwdflag - Updates documentation to remove
--cwdusage examples
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| crates/cargo-wdk/src/cli.rs | Removes --cwd field from BuildArgs struct and hardcodes working directory to current path |
| crates/cargo-wdk/tests/build_command_test.rs | Updates test to use current_dir() instead of --cwd argument |
| crates/cargo-wdk/tests/new_command_test.rs | Updates test to use current_dir() instead of --cwd argument |
| crates/cargo-wdk/README.md | Removes documentation example showing --cwd usage |
63a5cc0 to
d4e8bd7
Compare
`--cwd` is not an argument on `cargo build`. It has `--manifest-path` instead. Since we are emulating `cargo build` we should expose the same UX. This PR only removes `--cwd`. Will add `--manifest-path` at some later point because it is not something very commonly used.
Contributor
|
@gurry There is one left over mention of |
Contributor
Author
Done |
gurry
commented
Aug 6, 2025
svasista-ms
approved these changes
Aug 7, 2025
wmmc88
added a commit
to wmmc88/windows-drivers-rs
that referenced
this pull request
Aug 12, 2025
* fix: remove `--cwd` arg from `cargo-wdk` (microsoft#437) * Initial plan * Switch GitHub Actions runner from windows-latest to windows-2025 - Update all runs-on declarations from windows-latest to windows-2025 across 8 workflow files - Update corresponding comments referencing windows-latest for consistency - Maintain x64 architecture assumption as windows-2025 is also x64-based This change provides access to Windows Server 2025 which includes winget pre-installed, improving the CI setup and build performance. Co-authored-by: wmmc88 <16629657+wmmc88@users.noreply.github.com> * Replace winget-install action with direct PowerShell module installation for windows-2025 Co-authored-by: wmmc88 <16629657+wmmc88@users.noreply.github.com> * improve install-wdk action to prevent header conflicts by cleaning existing WDK/SDK installations Co-authored-by: wmmc88 <16629657+wmmc88@users.noreply.github.com> * Fix WDK installation pipeline errors by importing PowerShell module and improving error handling Co-authored-by: wmmc88 <16629657+wmmc88@users.noreply.github.com> * Fix PowerShell syntax error in install-wdk action by properly escaping $_ variable references Co-authored-by: wmmc88 <16629657+wmmc88@users.noreply.github.com> --------- Co-authored-by: Gurinder Singh <gurisingh@microsoft.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: wmmc88 <16629657+wmmc88@users.noreply.github.com>
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.
--cwdis not an argument oncargo buildwhich uses--manifest-pathinstead. Since we are emulatingcargo buildwe should expose the same UX.This PR only removes
--cwd. Will add--manifest-pathat some later point because it is not something all that commonly used.