Skip to content
This repository was archived by the owner on Jan 18, 2025. It is now read-only.

Filter to the host platform when running the default command #313

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

alex-pinkus
Copy link
Contributor

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 alex-pinkus force-pushed the filter-host-platform branch from c309f27 to e808d77 Compare July 20, 2024 20:49
@alex-pinkus alex-pinkus force-pushed the filter-host-platform branch from e808d77 to 7e3ec3c Compare July 20, 2024 21:31
@passcod
Copy link
Member

passcod commented Jul 22, 2024

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.

@alex-pinkus
Copy link
Contributor Author

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.

@passcod passcod merged commit b689701 into watchexec:8.x Oct 2, 2024
5 of 12 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

find_local_deps should filter to the host platform when calling cargo metadata
2 participants