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

Allow setting edition = "2018" in a workspace #5784

Closed
Centril opened this issue Jul 24, 2018 · 7 comments
Closed

Allow setting edition = "2018" in a workspace #5784

Centril opened this issue Jul 24, 2018 · 7 comments
Labels
A-editions Area: edition-specific issues A-workspaces Area: workspaces

Comments

@Centril
Copy link

Centril commented Jul 24, 2018

For larger projects, it could be useful to set the edition once instead of in each project's Cargo.toml file. This would then be equivalent to setting the edition key in every member project in the workspace.

Currently, the edition key is ignored instead: #5726

See also: rust-lang/edition-guide#45

@dwijnand
Copy link
Member

Like #5661, but less granular 🙂.

(I mention it also because one might want to tackle these in one swing.)

@lucksus
Copy link

lucksus commented Nov 23, 2018

Especially since cargo fix --edition updates every crate in the whole workspace.

@pksunkara
Copy link

With the new edition coming next year, we should look into implementing this. @ehuss Are there any blockers for this?

@ehuss
Copy link
Contributor

ehuss commented Sep 5, 2020

I believe it is being implemented as part of #8664.

@futile
Copy link

futile commented Aug 15, 2021

#9684 seems to be the relevant PR now. Also bump, since the 2021 edition is coming up, and this could be relevant for migration.

@epage
Copy link
Contributor

epage commented Apr 20, 2022

Would #8415 be a viable solution for this?

You would set workspace.edition = "2018" and then in each crate you say package.edition.workspace = true.

@ehuss
Copy link
Contributor

ehuss commented Apr 20, 2022

Yea, I think RFC 2906 is the solution to this. There was a lot of discussion in RFC 2906 about whether or not workspace fields should be implicitly inherited, and it was decided that it is best to not make anything implicit, edition in particular. It looks like the edition field is already supported, so closing in favor of #8415.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-editions Area: edition-specific issues A-workspaces Area: workspaces
Projects
None yet
Development

No branches or pull requests

7 participants