Skip to content

Transitive minor updates of deps shouldn't fail cargo update #4127

Closed
@alexcrichton

Description

@alexcrichton

Let's say you've got the following project structure:

  • Top level project, A
  • A depends on log = "0.3.6"
  • A depends on B, a sub-project in this same directory
  • B depends on log = "0.3.6"

When you generate a lock file for this project let's say you get log = "0.3.6". If you then later edit B's Cargo.toml to instead say log = "0.3.8" then if you run cargo update -p a Cargo will inform you:

error: failed to select a version for `log` (required by `b`):
all possible versions conflict with previously selected versions of `log`
  version 0.3.6 in use by log v0.3.6
  possible versions to select: 0.3.8

Cargo should gracefully handle this and not generate an error!

I'm not sure whether this is 100% related to path dependencies. Some more info can also be found here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions