Skip to content

Setting out to Cargo.toml with workspace.package.version result in format changing. #38

Closed

Description

@kareemmahlees

Problem

I have a Rust application and I would like to pump the version in my Cargo.toml each time I make a new release.
My version field resides under workspace.package.version, every time I try to pump the version bumper seems to reformat the whole file into a different format:

  • Adding indentations.
  • Splitting dependencies into workspace.dependencies.serde and so on.

Desired solution

Nothing should change except for the version.

Workaround

I had to install another crate ( cargo-edit ) with an after:bump hook to update the version.

Activity

  1. PaulBartonADVR commented on Jan 8, 2025

    @PaulBartonADVR
    Contributor

    @kareemmahlees, could you try to upgrade to 7.0.0 and see if your issue has been resolved?

    You will also need to upgrade your version of release-it to 18.0.0 as well

  2. kareemmahlees commented on Jan 13, 2025

    @kareemmahlees
    Author

    @pbarton-andovercos roger, I am a bit busy currently so I cannot guarantee when I will confirm this.

  3. jimmyn commented on Mar 7, 2025

    @jimmyn

    Having the same issue

  4. alex-pirogov commented on Mar 25, 2025

    @alex-pirogov
    Contributor

    having this issue with python's pyproject.toml

  5. VhalPurohit commented on Apr 3, 2025

    @VhalPurohit

    For me its also removing any comments that I left before the bump in my pyproject.toml

  6. dhofstetter commented on Apr 2, 2026

    @dhofstetter

    @webpro the changes made in #43 lead - in case of python projects - to the situation, that in case there is a dependency within your pyproject.toml having the exact same version, that this might get bumped as well?

  7. alex-pirogov commented on Apr 4, 2026

    @alex-pirogov
    Contributor

    @webpro the changes made in #43 lead - in case of python projects - to the situation, that in case there is a dependency within your pyproject.toml having the exact same version, that this might get bumped as well?

    try specifying path like this

    "out": {
    	"file": "pyproject.toml",
    	"type": "text/toml",
    	"path": "project.version"
    }
  8. JamesMBarr commented on May 26, 2026

    @JamesMBarr
    Contributor

    @webpro the changes made in #43 lead - in case of python projects - to the situation, that in case there is a dependency within your pyproject.toml having the exact same version, that this might get bumped as well?

    @dhofstetter you were absolutely right about this and I stumbled into that exact issue. This should be fixed now following #53.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions