Skip to content

Index inconsistently updated? #16904

@winterqt

Description

@winterqt

Problem

I added a feature to one of my dependencies (proptest) by manually editing my Cargo.toml, and ran into a very interesting edge case:

$ cargo check
error: failed to select a version for the requirement `convert_case = "^0.11"`
candidate versions found which didn't match: 0.8.0, 0.7.1, 0.6.0, ...
location searched: crates.io index
required by package `proptest-macro v0.5.0`
    ... which satisfies dependency `proptest-macro = "^0.5.0"` of package `proptest v1.11.0`
    ... which satisfies dependency `proptest = "^1.11.0"` (locked to 1.11.0) of package `foo v0.1.0 (/home/winter/src/...)`

$ cargo update
    Updating crates.io index
     Locking 3 packages to latest Rust 1.93.0 compatible versions
      Adding convert_case v0.11.0
      Adding proptest-macro v0.5.0
      Adding unicode-segmentation v1.13.2

My Cargo.toml looks like this:

[dev-dependencies]
# ...
proptest = { version = "1.11.0", features = ["attr-macro"] }

(Notably, no explicit proptest-macro dependency.)

So... how did my local index know about a proptest which depends on proptest-macro ^0.5.0 but not proptest-macro 0.5.0+ itself?

Steps

I have no idea, beyond what I described above, unfortunately.

Possible Solution(s)

No response

Notes

No response

Version

cargo 1.93.0 (083ac5135 2025-12-15)
release: 1.93.0
commit-hash: 083ac5135f967fd9dc906ab057a2315861c7a80d
commit-date: 2025-12-15
host: x86_64-unknown-linux-gnu
libgit2: 1.9.1 (sys:0.20.2 vendored)
libcurl: 8.15.0-DEV (sys:0.4.83+curl-8.15.0 vendored ssl:OpenSSL/3.5.4)
ssl: OpenSSL 3.5.4 30 Sep 2025
os: NixOS 26.5.0 [64-bit]

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-dependency-resolutionArea: dependency resolution and the resolverC-bugCategory: bugS-triageStatus: This issue is waiting on initial triage.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions