rust-osdev / cargo-xbuild

Automatically cross-compiles the sysroot crates core, compiler_builtins, and alloc.
Apache License 2.0
258 stars 25 forks source link

Add `--quiet` flag that suppresses "waiting for file lock" message #43

Closed Nils-TUD closed 4 years ago

Nils-TUD commented 5 years ago

I think the "waiting for file lock" message shouldn't be printed unconditionally. In this PR, I've chosen to use the existing verbose flag to turn it on. An alternative would be to use a quiet flag, just as cargo does, to turn it off. I'm not sure what's better.

The reason I ran into this is that I'm using the ninja build system which updates a single line on the console to show the executing commands. That is, only errors create newlines and stay visible. Therefore, I'm passing "-q" to cargo, but unfortunately this get's ignored by cargo-xbuild.

Edit(phil-opp): We decided to add a --quiet flag instead of using the existing --verbose flag.

phil-opp commented 5 years ago

Thanks for the pull request and sorry for the late reply!

I think the "waiting for file lock" message can be quite useful. Without it, it is not clear why the command hangs. For this reason I would prefer to keep it enabled by default. So I think adding support for the quiet flag makes more sense than coupling it with the verbose flag.

phil-opp commented 4 years ago

@Nils-TUD Sorry for the late reply! I missed that you pushed new commits.

I'm not sure about the status of this. In https://github.com/rust-osdev/cargo-xbuild/commit/4cacb5457549480d513a2964cda2451906f07079 you changed the code to use a --quiet flag, but in the current https://github.com/rust-osdev/cargo-xbuild/commit/6dcc9e95445a967ea98d32c74470fdf7c5834d52 you switched it back to using the --verbose flag. Was this intended?

Nils-TUD commented 4 years ago

No, that was not intended. Not sure what happened there.

But I've just pushed the old commit again.

phil-opp commented 4 years ago

Published as version 0.5.19