Use workspace.package
inheritance for most package fields
#804
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.package
inheritance 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
license
that 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.toml
or 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.authors
are standardized on["The C2Rust Project Developers <c2rust@immunant.com>"]
. 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 fromlibsyntax
and thus also credits "The Rust Project Developers".homepage
,repository
,readme
,categories
,keywords
are 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-macros
andc2rust-refactor
are not updated at all, as they are no longer part of the workspace.This greatly simplifies things for the upcoming
0.17
release, as itlicense
andhomepage
/repository
fields for all new packages, which are required to publish them (description
is also needed, but I don't think that it good to inherit; we should fix that in a separate PR)