Skip to content

Conversation

@gurry
Copy link
Contributor

@gurry gurry commented Aug 1, 2025

--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.

@gurry gurry force-pushed the remove-cwd-arg branch 2 times, most recently from f85beda to ef59e19 Compare August 1, 2025 11:30
@gurry gurry requested review from a team, Copilot and krishnakumar4a4 August 1, 2025 11:30
Copy link
Contributor

Copilot AI left a comment

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

@gurry gurry marked this pull request as draft August 1, 2025 11:33
@gurry 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 gurry marked this pull request as ready for review August 2, 2025 04:22
@gurry gurry enabled auto-merge August 2, 2025 04:22
@gurry gurry closed this Aug 2, 2025
auto-merge was automatically disabled August 2, 2025 09:53

Pull request was closed

@gurry gurry reopened this Aug 2, 2025
@krishnakumar4a4
Copy link
Contributor

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

@gurry
Copy link
Contributor Author

gurry commented Aug 6, 2025

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

Done

@gurry gurry enabled auto-merge August 6, 2025 08:42
@gurry gurry requested review from a team and removed request for a team August 6, 2025 08:43
Copy link
Contributor

@krishnakumar4a4 krishnakumar4a4 left a comment

Choose a reason for hiding this comment

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

LGTM

@gurry gurry requested a review from a team August 7, 2025 05:29
@wmmc88 wmmc88 disabled auto-merge August 7, 2025 23:33
@wmmc88 wmmc88 enabled auto-merge August 7, 2025 23:34
@wmmc88 wmmc88 disabled auto-merge August 11, 2025 22:40
@wmmc88 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 gurry deleted the remove-cwd-arg branch August 12, 2025 01:45
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 <[email protected]>

* Replace winget-install action with direct PowerShell module installation for windows-2025

Co-authored-by: wmmc88 <[email protected]>

* improve install-wdk action to prevent header conflicts by cleaning existing WDK/SDK installations

Co-authored-by: wmmc88 <[email protected]>

* Fix WDK installation pipeline errors by importing PowerShell module and improving error handling

Co-authored-by: wmmc88 <[email protected]>

* Fix PowerShell syntax error in install-wdk action by properly escaping $_ variable references

Co-authored-by: wmmc88 <[email protected]>

---------

Co-authored-by: Gurinder Singh <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: wmmc88 <[email protected]>
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.

4 participants