cargo-watch icon indicating copy to clipboard operation
cargo-watch copied to clipboard

Filter to the host platform when running the default command

Open alex-pinkus opened this issue 1 year ago • 2 comments

Fixes #312.

This uses the same logic that cargo does to identify the host platform, which unfortunately requires a call to rustc.

We invoke this logic if the user did not provide any of their own commands in the invocation to cargo watch -- this is probably more conservative than it strictly needs to be. If the user invokes a cargo subcommand, for instance, we may know enough about the subcommand and its arguments to know that it's still possible to filter to the host platform. I avoided adding that additional complexity for now but it could easily be added in the future.

alex-pinkus avatar Jul 20 '24 19:07 alex-pinkus

I'll be a bit slow releasing this because I injured my wrist and am currently wearing a cast so typing is a whole production, nevermind coding or terminaling.

passcod avatar Jul 22 '24 04:07 passcod

No problem -- appreciate the ack given your current condition! That must be frustrating.

Whenever you get to it (and no rush, this isn't blocking anything for me), it would be good if you could take a look at those CI failures. They don't look to me like anything that my changes could have caused (e.g., package `zvariant_derive v4.1.0` cannot be built because it requires rustc 1.75 or newer, while the currently active rustc version is 1.70.0), but if there's something I'm missing then I'm happy to make changes.

alex-pinkus avatar Jul 22 '24 05:07 alex-pinkus