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

Toml-related crates upgrades #915

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

nbigaouette
Copy link

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].

src/lib.rs Outdated
@@ -43,6 +43,7 @@ pub use index::*;
pub use manifest::{find, get_dep_version, set_dep_version, LocalManifest, Manifest};
pub use metadata::manifest_from_pkgid;
pub use registry::registry_url;
pub use toml_edit;
Copy link
Collaborator

Choose a reason for hiding this comment

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

As this crate is not meant to be used as a library (see semver compatibility](https://docs.rs/cargo-edit/latest/cargo_edit/#semver-compatibility), I would prefer this to be reverted

Copy link
Author

Choose a reason for hiding this comment

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

Fair enough, I've dropped commit acb2f2b.

@epage
Copy link
Collaborator

epage commented Dec 30, 2024

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

@nbigaouette
Copy link
Author

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.

@epage
Copy link
Collaborator

epage commented Dec 30, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants