Skip to content

cargo update silently doesn't update tokio-threadpool without --precise #7671

Open
@glandium

Description

@glandium

Problem
I was trying to update tokio-threadpool in Firefox, and had a hard time with it, especially because cargo update would say absolutely nothing.

Reduced Steps

  1. cargo new foo
  2. Edit foo/Cargo.toml to add:
[dependencies]
hyper = "=0.12.19"
tokio-threadpool = "=0.1.14"
tokio-executor = "=0.1.7"
  1. Enter the foo directory and run cargo update. This gives us the initial state for Cargo.lock.
  2. Remove the tokio-threadpool and thread-executor dependencies in Cargo.toml
  3. Run cargo update -p tokio-threadpool

Nothing happens, and the output is desperately empty.

Possible Solution(s)

cargo update -p tokio-threadpool --precise 0.1.17 (0.1.17 being the last version as of writing) works, and updates both tokio-threadpool and tokio-executor. I think cargo update -p tokio-threadpool should work just as well.

If not, then at least, cargo should say something about the fact that there is a newer version, but it can't be used because $reason, similar to what happens after upgrading both tokio-threadpool and tokio-executor, and trying to downgrade tokio-executor with cargo update -p tokio-executor --precise 0.1.7:

error: failed to select a version for the requirement `tokio-executor = "^0.1.8"`
  candidate versions found which didn't match: 0.1.7
  location searched: crates.io index
required by package `tokio-threadpool v0.1.17`
    ... which is depended on by `hyper v0.12.19`
    ... which is depended on by `foo v0.1.0 (/tmp/foo)`

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-dependency-resolutionArea: dependency resolution and the resolverC-bugCategory: bugCommand-updateS-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions