Use workspace.package inheritance for most package fields#804
Merged
fw-immunant merged 1 commit intomasterfrom Jan 30, 2023
Merged
Use workspace.package inheritance for most package fields#804fw-immunant merged 1 commit intomasterfrom
workspace.package inheritance for most package fields#804fw-immunant merged 1 commit intomasterfrom
Conversation
49894c9 to
1e07be8
Compare
…rdize and sync fields.
1e07be8 to
565d7b9
Compare
fw-immunant
approved these changes
Jan 30, 2023
Contributor
fw-immunant
left a comment
There was a problem hiding this comment.
Individual changes look OK; this should simplify future version bumps, which is good.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This uses
workspace.packageinheritance for most package fields to standardize and sync fields.Most packages repeat a lot of the package fields with minor variations, or omit them entirely (including ones like
licensethat are mandatory for publishing). This usescargo's workspace inheritance to set defaults in the workspace root'sCargo.toml, which are then either explicitly inherited in eachCargo.tomlor overrided.The defaults used here are:
which are taken mostly from
c2rust/Cargo.toml.description(a required field for publishing) is omitted as that should be unique for each package.The major benefit of this is that we standardize the fields and have a single source of truth, which is especially useful for something like
version, which we want to update in sync.The changes caused by this "standardization" are:
0.16.0, the current version.authorsare standardized on["The C2Rust Project Developers <[email protected]>"]. Previously, they would sometimes include specific developers, but it was somewhat haphazard and not updated when new people worked on them. I think it's much simpler to standardize on this general author.c2rust-ast-printer/Cargo.toml, which is forked fromlibsyntaxand thus also credits "The Rust Project Developers".homepage,repository,readme,categories,keywordsare all set the same for each package, with the exception ofreadme, which is set toreadme = "README.md"(the local one) if it exists.Note that
c2rust-macrosandc2rust-refactorare not updated at all, as they are no longer part of the workspace.This greatly simplifies things for the upcoming
0.17release, as itlicenseandhomepage/repositoryfields for all new packages, which are required to publish them (descriptionis also needed, but I don't think that it good to inherit; we should fix that in a separate PR)