-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Improve workspace resolver error message when root edition is missing #13579
Comments
@rimutaka would like to take on this tassk |
@rohansx, the same, this is not triaged yet. (Sorry I have been consumed by day job these days) If you wanna help out, you can look at how the issue tracker works in this repository. Specifically, issues with Whenever you made up your mind picking up an issue, you could optionally add a comment |
I suspect it is pretty rare, as newer package will by default get
Which example is it? Maybe we can fix that example instead. |
TLDR; After writing all this I realise I was looking for an example how to create a workspace, found none, tried to piece together bits and pieces, failed. I'm not the brightest spark out there, so not sure how many others walk the same path :) There is probably a dozen ways how it may happen, but here is my sequence of events:
I think what tripped me up was the expectation that I do not have to have the root package table at all.
I didn't want to use There is a lot of info to take in on that page. All of it is well explained. Maybe an example of how to create a WS using cargo commands would help. Relates to #11234 . |
I see. This is more like a documentation issue than the resolver error message issue. There are a couple of area to improve,
Alternatively, doing researches into #8365 or #5151 would also improve the current situation. |
I think the original problem of this issue is resolved via #13505. We could keep this as a workspace doc enhancement request. Could you update the issue title and content? |
In general, we need to improve our "best practice" documentation though that is covered with issues like #11234. |
@weihanglo , I reposted it as #13580. Feel free to close this one. |
Thanks. Closing. |
Problem
Running
cargo new
orcargo init
within a workspace that has noedition
tag in Cargo.toml works just fine, but returns a confusing error message about resolvers:It took me some time to realise that the real problem was that I didn't have
edition
tag in the root manifest and it defaulted to2015
whilecargo new
created a manifest with2021
.This is not a biggie, but will probably trip up someone new to workspaces.
Proposed Solution
Add a note to suggest adding the missing
edition
tag to the root manifest. E.g.:Notes
Not sure how easy or practical this is or how often this situation occurs.
I ran into it by following instructions from an example in the Cargo book.
Feel free to close.
Relates to #10587
The text was updated successfully, but these errors were encountered: