Closed cnpryer closed 1 year ago
Feel free to send a PR, thanks!
And to preserve insertion order, perhaps we should use IndexMap
.
If that's your preference, sounds good to me :)
FYI, toml
also uses indexmap
to preserve insertion order: https://github.com/toml-rs/toml/blob/457e745a46e56205bab39c20e3dc72785ad2376e/crates/toml/Cargo.toml#L46-L49
FYI,
toml
also usesindexmap
to preserve insertion order: https://github.com/toml-rs/toml/blob/457e745a46e56205bab39c20e3dc72785ad2376e/crates/toml/Cargo.toml#L46-L49
heh I just saw this. Thanks!
Hi! Love this project. Thanks so much for building it.
When serializing
PyProjectToml
to aString
usingtoml_edit::ser::to_string_pretty
the original order of each optional dependency group isn't guaranteed to be preserved.I put together a MWE here: https://github.com/cnpryer/pyproject-toml-rs-mwe.
I'd assume this would also be the case for other data backed by
HashMap
s.IIRC
toml
solves this by usingBTreeMap
instead.