Skip to content
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 parsing all Cargo.toml files #130

Closed
2 of 4 tasks
Tracked by #133
epage opened this issue Aug 26, 2021 · 6 comments
Closed
2 of 4 tasks
Tracked by #133

Support parsing all Cargo.toml files #130

epage opened this issue Aug 26, 2021 · 6 comments
Labels
C-enhancement Category: Raise on the bar on expectations

Comments

@epage
Copy link
Member

epage commented Aug 26, 2021

This is a pre-req to replacing toml-rs in cargo.

To do this, we might need a feature flag for deviating from the toml standard.

This will require comparing parse results between both parsers across all of crates.io. My assumption is we'd have a command that pulls in both crates and uses the toml_test encoding to compare the resylts

@epage epage added the C-enhancement Category: Raise on the bar on expectations label Aug 26, 2021
@epage
Copy link
Member Author

epage commented Aug 26, 2021

In crate-ci/cargo-release#326 (comment), kornelski gave some pointers

Thanks.

I get Cargo.toml the hard way, by downloading the crate file:

https://gitlab.com/crates.rs/crates.rs/-/blob/main/crates_io_client/src/lib_crates_io_client.rs#L77

and extracting it:

https://gitlab.com/crates.rs/crates.rs/-/blob/main/tarball/src/lib.rs

If you want to test the broken ones, look for Cargo.toml.orig.

@epage
Copy link
Member Author

epage commented Sep 12, 2021

The warning says support for this is going to be removed. I wonder when that can happen

The lack of newline could be handled through a regex. Unfortunately, the split table can't

@epage
Copy link
Member Author

epage commented Sep 21, 2021

rust-lang/cargo#9932 removes the compatibility hacks from Cargo.

@epage
Copy link
Member Author

epage commented Nov 16, 2021

This is open ended enough, I'm going to go ahead and close it for what has been done.

@epage epage closed this as completed Nov 16, 2021
@epage
Copy link
Member Author

epage commented Nov 16, 2021

nm, I do want to track this here

@epage epage reopened this Nov 16, 2021
@epage epage added the cargo label Nov 16, 2021
@epage
Copy link
Member Author

epage commented Dec 23, 2021

ehuss did this for us: https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/toml_edit.20testing/near/263954437

@_Eric Huss|120518 said:

@Ed Page I forgot to tell you, I tested toml_edit against every TOML file ever published > to crates.io against the toml crate, and the only issues I found were the two that I opened.

@epage epage closed this as completed Dec 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: Raise on the bar on expectations
Projects
None yet
Development

No branches or pull requests

1 participant