-
Notifications
You must be signed in to change notification settings - Fork 110
fix: move cargo-wdk output to stderr #599
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
Conversation
to make it consistent with cargo's behaviour
There was a problem hiding this 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 moves cargo-wdk's human-readable output from stdout to stderr to align with standard conventions used by cargo, rustc, and other build tools. This change enables stdout to be reserved for machine-readable output in the future and prevents output from being split across streams when redirected.
- Configured the tracing subscriber to write to stderr instead of stdout
- Updated all test assertions to verify output on stderr instead of stdout
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| crates/cargo-wdk/src/trace.rs | Added .with_writer(std::io::stderr) to the tracing subscriber configuration to redirect all cargo-wdk output to stderr |
| crates/cargo-wdk/tests/build_command_test.rs | Updated test assertions to check stderr instead of stdout for cargo-wdk build output messages |
| crates/cargo-wdk/tests/new_command_test.rs | Updated test assertions to check stderr instead of stdout for cargo-wdk new command output messages |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #599 +/- ##
=======================================
Coverage 82.67% 82.67%
=======================================
Files 25 25
Lines 7135 7136 +1
Branches 7135 7136 +1
=======================================
+ Hits 5899 5900 +1
Misses 1107 1107
Partials 129 129 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
krishnakumar4a4
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Makes it consistent with cargo and rustc. Fixes #526