-
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
Add warning for using pre-release version in Cargo.toml
#14876
Comments
contrary to you i am new rust comer :) i am confused that it uses a different version as specified in toml. instead of printing a warning for a surprising behavior i would expect a viable fix is to use the version in the toml as every other build tool does, and offer a command to write newer version into toml. or do like javascript guys. package.json and package-lock.json. |
Our general policy towards warnings is to only emit them if there is a reasonable way to silence them. For everything else, we are waiting on cargo lints. For the unstable cargo lints, I see this being more clippy-like which we haven't figured out how we want to handle those. For myself, I'm concerned with maintainers having to toggle operators back and forth as that can be error prone. |
For more context, this effort is part of #2222 (and the issue was requested on zulip). To be more precise on what the suggested lint is:
The remaining action items would be:
I don't understand to what this refers. Do you mean silencing the warning (i.e. prefixing |
Problem
As rust-lang/rfcs#3263 mentions and the cargo book says:
It is necessary to notice user (especially new rust comer) that
Cargo
will upgrade the pre-release version, which is may be a breaking change.Proposed Solution
When resolving the
Cargo.toml
, if there is any pre-release version present, warnning people that pre-release will automatically upgrade to new version, which may be a breaking change.It's prefer to choose lint to generate the warning message.
Notes
originated from rust-lang/rfcs#3263 (comment)
The text was updated successfully, but these errors were encountered: