-
-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
I think this is just due to an extra whitespace, because if you run the fix command via cargo sort --workspace that is the only change.
diff --git a/Cargo.toml b/Cargo.toml
index f60f543..3e5bcb4 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -2,5 +2,5 @@
members = ["one", "two"]
[workspace.dependencies]
-one = { path = "one" , version = "0.1.2" }
+one = { path = "one", version = "0.1.2" }
two = { path = "two" }Reproduce:
Dependency versions
- cargo
1.19.1 - knope
0.21.7 - https://crates.io/crates/cargo-sort/2.0.2
Project files
Cargo.toml
[workspace]
members = ["one", "two"]
[workspace.dependencies]
one = { path = "one" }
two = { path = "two" }knope.toml
[packages.one]
versioned_files = [
"Cargo.lock",
"one/Cargo.toml",
]
changelog = "one/CHANGELOG.md"
scopes = ["one"]
[packages.two]
versioned_files = [
"Cargo.lock",
"two/Cargo.toml",
{ path = "Cargo.toml", dependency = "one" },
]
changelog = "two/CHANGELOG.md"
scopes = ["two"]
[[workflows]]
name = "release"
[[workflows.steps]]
type = "PrepareRelease"
[[workflows.steps]]
type = "Command"
command = 'git commit -m "chore: prepare new release(s)"'
[[workflows.steps]]
type = "Release"one/Cargo.toml
[package]
name = "one"
version = "0.1.0"
edition = "2024"
publish = false
[dependencies]two/Cargo.toml
[package]
name = "two"
version = "0.1.1"
edition = "2024"
publish = false
[dependencies]
one = { workspace = true }Actions
- Create a repo with these files and a single conventional commit e.g. "feat: commit"
- Run
cargo sort --workspace --check, everything should pass - Run
knope release, which produce a diff onCargo.tomllike the following:
❯ git diff HEAD~1 Cargo.toml
diff --git a/Cargo.toml b/Cargo.toml
index d67ca8e..f60f543 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -2,5 +2,5 @@
members = ["one", "two"]
[workspace.dependencies]
-one = { path = "one" }
+one = { path = "one" , version = "0.1.2" }
two = { path = "two" }- Running
cargo sort --workspaceshould now fail.
Metadata
Metadata
Assignees
Labels
No labels