Skip to content
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

Target-specific workspace default-members (or excludes) #9650

Closed
ratijas opened this issue Jul 3, 2021 · 1 comment
Closed

Target-specific workspace default-members (or excludes) #9650

ratijas opened this issue Jul 3, 2021 · 1 comment
Labels
A-workspaces Area: workspaces C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

Comments

@ratijas
Copy link

ratijas commented Jul 3, 2021

Describe the problem you are trying to solve

I want to exclude (or rather, specify different subset of default members) for certain platforms in cargo toml/config.

Describe the solution you'd like

Just like there are triples-specific overrides in .cargo/config.toml, I'd like to see workspace-related keys there.

My primary use case is to disable certain example (implemented as a full-blown workspace member) when compiling on Windows + MinGW toolchain, because certain libraries (namely, QtWebEngine) are not easily available there. So, I'd expect something like this in my workspace root Cargo.toml:

[workspace]
members = [
    'qmetaobject',
    'examples/todos',
    'examples/webengine',
]

[target.i686-pc-windows-gnu]
default-members = [
    'qmetaobject',
    'examples/todos',
]

Notes

I tried tweaking in such way both Cargo.toml and .cargo/config.toml, and none of that currently works. The only workaround for now is manually commenting out or disabling a package via --workspace --exclude <SPEC>.

See woboq/qmetaobject-rs#167

@ratijas ratijas added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label Jul 3, 2021
@ehuss ehuss added the A-workspaces Area: workspaces label Aug 3, 2021
@epage
Copy link
Contributor

epage commented Nov 2, 2023

This looks to be another variant of #6179. Closing in favor of that so we keep the conversation in one place for how to solve the need, rather than focus on each individual idea separately. If there is a reason for us to reconsider that, let us know!

@epage epage closed this as not planned Won't fix, can't repro, duplicate, stale Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-workspaces Area: workspaces C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Projects
None yet
Development

No branches or pull requests

3 participants