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

Automatically register workspace members in workspace.dependencies in cargo new #15180

Open
epage opened this issue Feb 13, 2025 · 1 comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-new S-blocked-external Status: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fix

Comments

@epage
Copy link
Contributor

epage commented Feb 13, 2025

Problem

In using a workspace, I'd like it to be easy to setup workspace members to be used with workspace = true which includes reducing the number of places I need to update paths as I move packages in the workspace.

Proposed Solution

If you have the following workspace

[workspace]

and you run

$ cargo new foo

You should get

[workspace]
members = ["foo"]

[workspace.dependencies]
foo = { path = "foo", version = "0.1.0" }

Notes

RFC 2906 requested we implicitly add version when we see path which was rejected during stabilization.

#13453 requests we implicitly make workspace members available for workspace = true but this comes at many costs.

@epage epage added C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-new S-blocked-external Status: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fix labels Feb 13, 2025
@epage
Copy link
Contributor Author

epage commented Feb 13, 2025

I hesitate in us moving forward with this because I feel like inheriting dependencies is not mature enough

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-new S-blocked-external Status: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fix
Projects
None yet
Development

No branches or pull requests

1 participant