-
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
feat(toml): Add support for setting the default package version (#6583) #14919
Conversation
…-lang#6583) Allow changing the default package version by setting the `CARGO_SUGGESTED_PKG_VERSION` environment variable.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @weihanglo (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
@@ -566,7 +567,16 @@ fn normalize_package_toml<'a>( | |||
.clone() | |||
.map(|value| field_inherit_with(value, "version", || inherit()?.version())) | |||
.transpose()? | |||
.map(manifest::InheritableField::Value), | |||
.map(manifest::InheritableField::Value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution, though this PR seems incomplete. How does this one play well with SemVer? How does the env affect the entire dependency graph?
Note that there are a couple of different use cases in #6583. The design of it is not yet settled, so I am going to mark this as draft. In Cargo we encourage discussions before implementations. See https://doc.crates.io/contrib/process/working-on-cargo.html#before-hacking-on-cargo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that its not just S-needs-design
or S-needs-team-input
but its S-propose-close
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Going to close this as it is incomplete and unlikely to merge. Feel free to put your use cases in #6583 and we may consider changing its label status.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It plays as well as current practices with SemVer. When building multiple packages in a call of cargo
, all unversioned packages will be affected -- as many similar tools for other languages. I'll post more details on #6583.
Allow changing the default package version by setting the
CARGO_SUGGESTED_PKG_VERSION
environment variable.