googleapis / googleapis/release-please
cargo updater crashes on target-specific path dependency without version
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 588
- Avg merge
- 12h 16m
- Merged PRs (30d)
- 7
Description
#### Environment details
- OS: Linux 5.15.0-164-fips x86_64
- Node.js version: v22.17.0
- npm version: 10.9.2
- `release-please` version: 17.2.0
#### Steps to reproduce
1. Create a Rust crate `Cargo.toml` with a target-specific dependency that uses `path` but no `version`, for example:
`[target.'cfg(target_os = "linux")'.dependencies]`
`internal-metrics = { path = "../internal-metrics", features = ["heap"] }`
2. Run release-please with the `cargo-workspace` plugin so `CargoToml.updateContent` attempts to update that dependency via `versionsMap`.
3. Observe release-please trying to update:
`target.cfg(target_os = "linux").dependencies.internal-metrics.version`
4. It fails with:
`path not found in object: target.cfg(target_os = "linux").dependencies.internal-metrics.version`
Contributor guide
Assessment
This issue has not been assessed yet.