Skip to content

fix: remove --cwd arg from cargo-wdk - #437

Merged
Melvin Wang (wmmc88) merged 6 commits into
microsoft:mainfrom
gurry:remove-cwd-arg
Aug 11, 2025
Merged

fix: remove --cwd arg from cargo-wdk#437
Melvin Wang (wmmc88) merged 6 commits into
microsoft:mainfrom
gurry:remove-cwd-arg

Conversation

@gurry

Copy link
Copy Markdown
Contributor

--cwd is not an argument on cargo build which uses --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 all that commonly used.

Copilot AI review requested due to automatic review settings August 1, 2025 11:22

This comment was marked as outdated.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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 --cwd CLI argument definition and related code
  • Updates tests to use current_dir() method instead of --cwd flag
  • Updates documentation to remove --cwd usage 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

Comment thread crates/cargo-wdk/src/cli.rs
Comment thread crates/cargo-wdk/tests/new_command_test.rs
@gurry
Gurinder Singh (gurry) marked this pull request as draft August 1, 2025 11:33
@gurry
Gurinder Singh (gurry) force-pushed the remove-cwd-arg branch 2 times, most recently from 63a5cc0 to d4e8bd7 Compare August 1, 2025 11:42
`--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.
@gurry
Gurinder Singh (gurry) marked this pull request as ready for review August 2, 2025 04:22
auto-merge was automatically disabled August 2, 2025 09:53

Pull request was closed

@krishnakumar4a4

Copy link
Copy Markdown
Contributor

Gurinder Singh (@gurry) There is one left over mention of cwd inside NewAction::new function comment. Could you fix the comment as well.

@gurry

Copy link
Copy Markdown
Contributor Author

Gurinder Singh (@gurry) There is one left over mention of cwd inside NewAction::new function comment. Could you fix the comment as well.

Done

Comment thread crates/cargo-wdk/src/actions/new/mod.rs Outdated
@gurry
Gurinder Singh (gurry) requested review from a team and removed request for a team August 6, 2025 08:43

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@gurry
Gurinder Singh (gurry) requested a review from a team August 7, 2025 05:29
@wmmc88
Melvin Wang (wmmc88) added this pull request to the merge queue Aug 11, 2025
Merged via the queue into microsoft:main with commit c28ec88 Aug 11, 2025
118 checks passed
@gurry
Gurinder Singh (gurry) deleted the remove-cwd-arg branch August 12, 2025 01:45
Melvin Wang (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>
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.

5 participants