cargo-edit icon indicating copy to clipboard operation
cargo-edit copied to clipboard

Toml-related crates upgrades

Open nbigaouette opened this issue 1 year ago • 3 comments

I'm using cargo-edit (0.13.0) as a library in one of my projects in addition to cargo_toml (0.21.0). Since cargo-edit depends on "old" versions of some crates (toml 0.7.6 and toml_edit 0.19.14) and cargo_toml 0.21.0 depends on toml 0.8.14, cargo pulls in multiple versions of them in the dependency tree.

This PR simply bumps the toml and toml_edit to their latest released versions. The [dev-dependency] trycmd is also upgraded since it has a direct dependency on toml_edit. The lock file is updated too following those upgrades.

Note also that I added a re-export of toml_edit since some of its types appear in the public API, for example in cargo_edit::Manifest. Doing so allows end-user to not have to add toml_edit to their own [dependency].

nbigaouette avatar Dec 30 '24 17:12 nbigaouette

As I mentioned, we do not support using this is a library, so my main interest in moving this forward is bug fixes like

(edit) When a comment exists on a line before a dotted key, don't duplicate it on all following dotted keys under the same root key

See https://github.com/toml-rs/toml/blob/main/crates/toml_edit/CHANGELOG.md

epage avatar Dec 30 '24 17:12 epage

I'm not sure I follow your comment about toml_edits CHANGELOG.md. Do you mean that you would accept the changes proposed here as a "bug fix" rather than, say, a feature request? The changes are relatively minor (I would think) as they are just dependency upgrades. I don't mind writing a CHANGELOG.md entry mentioning this upgrade if that is what you were asking for.

nbigaouette avatar Dec 30 '24 17:12 nbigaouette

I'm not sure I follow your comment about toml_edits CHANGELOG.md. Do you mean that you would accept the changes proposed here as a "bug fix" rather than, say, a feature request? The changes are relatively minor (I would think) as they are just dependency upgrades. I don't mind writing a CHANGELOG.md entry mentioning this upgrade if that is what you were asking for.

I was stating the primary motivation to move forward with this PR. I'll handle the changelog when releasing.

epage avatar Dec 30 '24 18:12 epage