-
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
Support multi-line inline tables #11500
Comments
Note that “newlines and trailing commas in inline tables” is still unreleased. |
Yes, we currently support TOML 1.0. |
Upstream issue toml-rs/toml#397 A downside to the new TOML version is it could cause a 10% slow down in TOML parsing without a lot of optimization work as it adds support for unicode bare keys. Unless we implement a UTF-8 state machine in our parser (and deal with the risks associated with it), it'll require us to move from |
Ah ok. Didn't know that toml has a release cycle.
Parsing toml shouldn't be a performance bottleneck, right? IMO a 10% slowdown is acceptable. |
Parse does contribute to total build time to some extent. Cargo parses |
The biggest concern for performance is parsing someone's dependency tree. We do it on every run and, for large programs, can involve parsing hundreds of toml files. Toml is designed for humans and isn't the most optimal format to parse already. One potential area of improvement is if we track immutable manifests and cache those in a fast to parse format. The biggest gains for immutable manifests would be from the registry. A manifest for a given git dependency's SHA would also be immutable but I wouldn't expect there to be too many of those to be worth it. |
Can we please fix this, it's really surprising that this is even an issue for a text parser. |
TOML 1.1 spec is not released yet. |
Problem
Currently cargo won't parse a cargo.toml file that contains multi-line inline tables.
Proposed Solution
Change the toml parser to allow multi-line inline tables
Notes
No response
The text was updated successfully, but these errors were encountered: