googleapis / googleapis/release-please
bug: root cargo workspace releaser rewrites member crate versions, overriding per-path releases
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 588
- Avg merge
- 12h 16m
- Merged PRs (30d)
- 7
Description
## Environment details
- OS: nixos (linux)
- Node.js version: 24.14.0
- npm version: 11.9.0
- `release-please` version: 17.5.2
## Summary
When using manifest mode with a Cargo workspace, configuring root path `.` as `release-type: rust` rewrites all workspace member crate versions to the root version, even when member crates have separate release paths/config or no releasable changes.
This causes inconsistent output (for example member `Cargo.toml` version rewritten while manifest entry stays unchanged).
## release-please version
Observed in action logs: `release-please version: 17.1.3` (`googleapis/release-please-action@v4`).
## Repro config
```json
{
"plugins": [{ "type": "cargo-workspace", "merge": false }],
"packages": {
".": {
"release-type": "rust",
"exclude-paths": ["crates", "editors"]
},
"crates/panache-parser": {
"release-type": "rust"
},
"editors/code": {
"release-type": "node",
"package-name": "panache-code"
}
}
}
```
Workspace members:
- `crates/panache-parser`
- `crates/panache-wasm`
## Steps to reproduce
1. Have last released versions around:
- root `.` = `2.33.0`
- `crates/panache-parser` = `0.2.0`
- `crates/panache-wasm` = `0.1.1`
2. Push a commit that triggers only root release (`.`), with no `crates/panache-parser` changes.
3. Run manifest release PR.
## Actual behavior
Logs show root Rust strategy doing workspace-wide update:
- `found workspace with 2 members, upgrading all`
- `updating 2 submodules`
- versions map sets `panache`, `panache-parser`, and `panache-wasm` to the root next version (e.g. `2.33.1`)
PR diff includes:
- `crates/panache-parser/Cargo.toml` bumped to root version (`0.2.0 -> 2.33.1`)
while manifest proposal can still keep parser unchanged (`"crates/panache-parser": "0.2.0"`), leading to inconsistency.
## Expected behavior
In manifest mode with per-path packages:
- Root `.` release should not force member crate package versions to root version.
- Member crate versions should be controlled by their own path candidate/config, or remain unchanged if no releasable changes exist for that path.
- Cargo workspace dependency updates should respect per-package release decisions and keep manifest/Cargo.toml consistent.
## Likely root cause
In `src/strategies/rust.ts`, workspace handling unconditionally sets member versions to root `newVersion` (`versionsMap.set(member.package.name, version)`), which conflicts with manifest per-path semantics in monorepos.
Contributor guide
Assessment
This issue has not been assessed yet.