-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat(toml): TOML 1.1 parse support #16415
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
base: master
Are you sure you want to change the base?
Conversation
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 upgrade. I am really excited about it!
Anyone using these features will raise their development MSRV.
Do we care about helping people catch this? Like we discussed earlier on Zulip, one (and probably the only) case that may affect people is via git dependencies.
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.
If people have an MSRV, they should generally have CI jobs to verify it or else it is likely a lie. We call out verification as an expectation.
To verify this, we'd have to write a custom tool that re-parses the file and try to walk the structure for inline tables and check for these. It won't be cheap.
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.
To verify this, we'd have to write a custom tool that re-parses the file and try to walk the structure for inline tables and check for these. It won't be cheap.
A way to do it is that we depend on an old version of toml_edit for 1.0 spec, and parse again to see if it fails.
If people have an MSRV, they should generally have CI jobs to verify it or else it is likely a lie. We call out verification as an expectation.
I agree, though not everything is in a ideal state having a proper CI setup. If not code change, I guess it is worth putting a caution in CHANGELOG for this MSRV breakage.
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!
|
@rfcbot fcp merge T-cargo This a one-way door change — Once Cargo starts supporting 1.1 we cannot revert back. Worth a check with the entire team. |
1 similar comment
This comment was marked as duplicate.
This comment was marked as duplicate.
|
Team member @weihanglo has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
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.
A dumb question: Does it make sense to add some tests to cover the newly supported formats and parsing behavior in Cargo? or is this outside the scope of Cargo tests? (The toml itself would have sufficient tests, and there is nothing special here.)
|
I think it's fine to delegate that to |
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! ![]()
|
🔔 This is now entering its final comment period, as per the review above. 🔔 |
What does this PR try to resolve?
Support
\estring escape character\xHHstring escape character0)Anyone using these features will raise their development MSRV. The published
Cargo.tomlfile will still be compatible with old TOML parsers and so old Cargos. Iftoml_datetimegains the ability to track whether seconds were optional (will be a breaking change), then that might change though that would only apply topackage.metadataas we don't make use of times in Cargo.How to test and review this PR?