googleapis / googleapis/release-please

cargo updater crashes on target-specific path dependency without version

Open
#2,674 0 comments 0 reactions 1 assignee Claimed by @chingor13 View on GitHub
priority: p3 type: bug
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.