windows-drivers-rs
windows-drivers-rs copied to clipboard
Move `cargo-wdk` output to stderr
cargo build, rustc and other build tools like gcc emit their human readable output to to stderr instead of stdout. This allows stdout to be available for machine readable output (e.g. cargo build --message-format=json). I believe we should move cargo wdk output to stderr as well.
The rationale is:
- Using stderr is consistent with the aforementioned convention for build tools
- Without it you could end up "splitting" the output when stdout or stderr is redirected to a file. E.g. if you run
cargo wdk build > output.logthen all the cargo wdk lines will go to the file and all theCompiling ...lines fromcargo buildwill appear on the console and not go into the file. We need to use the same stream ascargoto avoid this. - It leaves the door open for supporting machine-readable output in the future
Working on this!
PR submitted for this issue.