-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add a 'worskpace.default-packages' config to override implied --all? #4507
Comments
Previously Or has #4335 broke some workflow which used to work? |
This is #4463 |
Sounds reasonable to me! |
@matklad Correct, previously this would fail with that error message. Now it fails later in a build script or in rustc. This is a feature request to enable new workflows. @alexcrichton Cool, I’ll work on a PR later. |
Should the key name be |
FWIW, I don't especially like neither How should Let's cc @rust-lang/cargo to brainstorm the better name, and to look at this feature in general :) |
My work-in-progress patch does not change the behavior with non-virtual workspaces, but you’re right that using |
Let’s move discussion to #4743. |
Add a workspace.default-members config that overrides implied --all Fixes #4507.
Since #4335,
--all
is implied for virtual workspaces. This is not appropriate in some cases (like Servo) for two reasons:servo
andgeckolib
) both depend on the same library (style
) and each enable a corresponding Cargo feature. These features are mutually exclusive. (Compilingstyle
only works when exactly one of these two "modes" is enabled.)--all
includes all transitivepath
dependencies, even though one of those (task_info
) is normally only included through a[target.'cfg(target_os = "macos")'.dependencies]
section (and doesn’t compile on other platforms).Both of these are probably unusual, so #4335 is still a good default. But I’d like there to be a way to opt into a different behavior. It could be something like this:
Running e.g.
cargo build
at the top level without more arguments would behave likecargo build -p servo
instead ofcargo build --all
.The text was updated successfully, but these errors were encountered: