Skip to content

Conversation

@epage
Copy link
Contributor

@epage epage commented Dec 18, 2025

What does this PR try to resolve?

Support

  • multi-line inline tables
  • trailing commas on inline tables
  • \e string escape character
  • \xHH string escape character
  • Optional seconds in times (sets to 0)

Anyone using these features will raise their development MSRV. The published Cargo.toml file will still be compatible with old TOML parsers and so old Cargos. If toml_datetime gains the ability to track whether seconds were optional (will be a breaking change), then that might change though that would only apply to package.metadata as we don't make use of times in Cargo.

How to test and review this PR?

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 18, 2025
@rustbot
Copy link
Collaborator

rustbot commented Dec 18, 2025

r? @ehuss

rustbot has assigned @ehuss.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@weihanglo weihanglo added this pull request to the merge queue Dec 18, 2025
@weihanglo weihanglo removed this pull request from the merge queue due to a manual request Dec 18, 2025
@weihanglo weihanglo added the T-cargo Team: Cargo label Dec 18, 2025
@weihanglo
Copy link
Member

weihanglo commented Dec 18, 2025

@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
@weihanglo

This comment was marked as duplicate.

@rust-rfcbot
Copy link
Collaborator

rust-rfcbot commented Dec 18, 2025

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.

@rust-rfcbot rust-rfcbot added proposed-final-comment-period An FCP proposal has started, but not yet signed off. disposition-merge FCP with intent to merge labels Dec 18, 2025
Copy link
Member

@0xPoe 0xPoe left a 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.)

View changes since this review

@epage
Copy link
Contributor Author

epage commented Dec 18, 2025

I think it's fine to delegate that to toml which includes running the TOML conformance tests.

Copy link
Member

@0xPoe 0xPoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rust-rfcbot rust-rfcbot added final-comment-period FCP — a period for last comments before action is taken and removed proposed-final-comment-period An FCP proposal has started, but not yet signed off. labels Dec 18, 2025
@rust-rfcbot
Copy link
Collaborator

🔔 This is now entering its final comment period, as per the review above. 🔔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

disposition-merge FCP with intent to merge final-comment-period FCP — a period for last comments before action is taken S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-cargo Team: Cargo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants