Skip to content

cargo updater crashes on target-specific path dependency without version #2674

@dillona

Description

@dillona

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

Metadata

Metadata

Assignees

Labels

priority: p3Desirable enhancement or fix. May not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions