replace-workspace-values.py: Update cargo.toml on only lints replace

This commit is contained in:
Lucio Franco
2025-07-23 10:37:23 -04:00
committed by Winter
parent 5570ee73c0
commit b92da7d1cb
5 changed files with 38 additions and 0 deletions
@@ -123,6 +123,7 @@ def main() -> None:
and crate_manifest["lints"]["workspace"] is True
):
crate_manifest["lints"] = workspace_manifest["lints"]
changed = True
if not changed:
return
@@ -0,0 +1,15 @@
[package]
name = "im_using_workspaces"
version = { workspace = true }
publish = false
keywords = [
"workspace",
"other_thing",
"third_thing",
]
[lints]
workspace = true
[dependencies]
bar = "1.0.0"
@@ -4,4 +4,8 @@ runCommand "git-dependency-workspace-inheritance-test" { } ''
cp --no-preserve=mode ${./crate.toml} "$out"
${replaceWorkspaceValues} "$out" ${./workspace.toml}
diff -u "$out" ${./want.toml}
cp --no-preserve=mode ${./crate_lints.toml} "$out"
${replaceWorkspaceValues} "$out" ${./workspace.toml}
diff -u "$out" ${./want_lints.toml}
''
@@ -0,0 +1,15 @@
[package]
name = "im_using_workspaces"
version = "1.0.0"
publish = false
keywords = [
"workspace",
"other_thing",
"third_thing",
]
[lints]
dbg_macro = "warn"
[dependencies]
bar = "1.0.0"
@@ -3,3 +3,6 @@ version = "1.0.0"
[workspace.dependencies]
foo = { version = "1.0.0", features = ["meow"] }
[workspace.lints]
dbg_macro = "warn"