-
Notifications
You must be signed in to change notification settings - Fork 8
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
Use Cargo 1.64 features for workspace metadata #500
Merged
Malax
merged 5 commits into
main
from
malax/workspace-package-metadata-and-dependencies
Sep 23, 2022
Merged
Use Cargo 1.64 features for workspace metadata #500
Malax
merged 5 commits into
main
from
malax/workspace-package-metadata-and-dependencies
Sep 23, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Malax
force-pushed
the
malax/workspace-package-metadata-and-dependencies
branch
from
September 23, 2022 07:51
e47ced0
to
718fd9d
Compare
edmorley
approved these changes
Sep 23, 2022
Malax
force-pushed
the
malax/workspace-package-metadata-and-dependencies
branch
from
September 23, 2022 10:11
e78acf3
to
8b53a91
Compare
edmorley
added a commit
that referenced
this pull request
Oct 3, 2022
The check was added in #492 as part of the switch to always releasing all libcnb-related crates with identical version numbers. At that point, crate versioning was controlled by each crate's `Cargo.toml`, so it would be easy to forget to update some of the crates for each release (particularly given anyone familiar with the previous process would be used to only updating the version of the single crate being released). However as of #500, the new Cargo workspace shared metadata feature is being used, such that the single version number in the repo root `Cargo.toml` is now inherited by any crate using `version.workspace = true`. This means there is no risk of crate versions getting out of sync, unless we happen to add a new crate (infrequent occurrence), don't base it on the template from an existing crate (unlikely, since that's what we've done every time before), and then also miss the difference during code review (unlikely, since comparing a new thing to an existing thing is the first step I take when reviewing such changes, and I'm sure others do too). As such, this check is not adding enough value to be worth cluttering up the CI results overview with yet another check.
edmorley
added a commit
that referenced
this pull request
Oct 3, 2022
The check was added in #492 as part of the switch to always releasing all libcnb-related crates with identical version numbers. At that point, crate versioning was controlled by each crate's `Cargo.toml`, so it would be easy to forget to update some of the crates for each release (particularly given anyone familiar with the previous process would be used to only updating the version of the single crate being released). However as of #500, the new Cargo workspace shared metadata feature is being used, such that the single version number in the repo root `Cargo.toml` is now inherited by any crate using `version.workspace = true`. This means there is no risk of crate versions getting out of sync, unless we happen to add a new crate (infrequent occurrence), don't base it on the template from an existing crate (unlikely, since that's what we've done every time before), and then also miss the difference during code review (unlikely, since comparing a new thing to an existing thing is the first step I take when reviewing such changes, and I'm sure others do too). As such, this check is not adding enough value to be worth cluttering up the CI results overview with yet another check.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Cargo
1.64
allows to specify some package metadata at workspace level (https://blog.rust-lang.org/2022/09/22/Rust-1.64.0.html#cargo-improvements-workspace-inheritance-and-multi-target-builds). This is something we wanted for some time now, especially when #492 was implemented.The new Cargo version also allows to specify dependencies at workspace level that packages can inherit. This is quite useful for repository-local dependencies that are now only specified once and not across all packages in the repository. This makes cutting a release even easier.
Downsides are that Rust 1.64 is a very new release at the time of writing and people using libcnb might need to bump their Rust version in both CI and locally to use it. However, it will only affect users that bump their libcnb version.
Closes GUS-W-11800636