-
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
refactor(toml): Cleanup noticed on the way to #12801 #12902
Conversation
In switching from toml v0.5 to toml_edit, we no longer need to have tables after all fields.
r? @weihanglo (rustbot has picked a reviewer for you, use r? to override) |
|
||
// Properties that can be inherited by members. | ||
package: Option<InheritableFields>, | ||
dependencies: Option<BTreeMap<String, TomlDependency>>, | ||
lints: Option<TomlLints>, | ||
|
||
// Note that this field must come last due to the way toml serialization | ||
// works which requires tables to be emitted after all values. |
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.
Seems like metadata isn't needed to be the last anymore. Do we have a test to verify the change?
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.
Looks like we have several tests in testsuite/package.rs
that use package.metadata
which means we'll serialize the prepared manifest and verify its output which would hit this situation.
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.
This was 6bc7455 but since we have tests and toml
crate has changed largely, I am going to merge this. Thank you!
@bors r+ |
☀️ Test successful - checks-actions |
Update cargo 7 commits in 708383d620e183a9ece69b8fe930c411d83dee27..b4d18d4bd3db6d872892f6c87c51a02999b80802 2023-10-27 21:09:26 +0000 to 2023-10-31 18:19:10 +0000 - refactor(toml): Cleanup noticed on the way to rust-lang/cargo#12801 (rust-lang/cargo#12902) - feat(trim-paths): set env `CARGO_TRIM_PATHS` for build scripts (rust-lang/cargo#12900) - feat: implement RFC 3127 `-Ztrim-paths` (rust-lang/cargo#12625) - docs: clarify config to use vendored source is printed to stdout (rust-lang/cargo#12893) - Improve the margin calculation for the search command's UI (rust-lang/cargo#12890) - Add new packages to [workspace.members] automatically (rust-lang/cargo#12779) - refactor(toml): Decouple parsing from interning system (rust-lang/cargo#12881) r? ghost
In splitting up
toml/mod.rs
for #12801, I noticed some things to clean up. I decided to split this up.