-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Unkind error message failing patch non-existing package with a prerelease version package #12315
Copy link
Copy link
Closed
Labels
A-dependency-resolutionArea: dependency resolution and the resolverArea: dependency resolution and the resolverA-diagnosticsArea: Error and warning messages generated by Cargo itself.Area: Error and warning messages generated by Cargo itself.A-semverArea: semver specifications, version matching, etc.Area: semver specifications, version matching, etc.C-bugCategory: bugCategory: bugE-easyExperience: EasyExperience: EasyS-acceptedStatus: Issue or feature is accepted, and has a team member available to help mentor or reviewStatus: Issue or feature is accepted, and has a team member available to help mentor or review
Metadata
Metadata
Assignees
Labels
A-dependency-resolutionArea: dependency resolution and the resolverArea: dependency resolution and the resolverA-diagnosticsArea: Error and warning messages generated by Cargo itself.Area: Error and warning messages generated by Cargo itself.A-semverArea: semver specifications, version matching, etc.Area: semver specifications, version matching, etc.C-bugCategory: bugCategory: bugE-easyExperience: EasyExperience: EasyS-acceptedStatus: Issue or feature is accepted, and has a team member available to help mentor or reviewStatus: Issue or feature is accepted, and has a team member available to help mentor or review
Type
Fields
Give feedbackNo fields configured for issues without a type.
Problem
Trying to patch a stable version package (0.1.0) with prerelease version one (0.1.1-prerelease) fails with an unkind error message if there are no other matching repositories. For example,
root's Cargo.toml:
cargo-mylib's Cargo.toml
cargo updatein this cargo-mybin fails with$ cargo update Updating git repository `https://github.com/loloicci/cargo-mylib.git` Updating crates.io index error: no matching package named `cargo-mylib` found location searched: registry `crates-io` required by package `cargo-mybin v0.1.0 (/.../cargo-mybin)`This message says wrong information that no matching package was found. This is because
cargo/src/cargo/core/resolver/errors.rs
Lines 226 to 228 in 5febbe5
Steps
cargo updateon itPossible Solution(s)
use
OptVersionReq::Anyinstead ofsemver::VersionReq::parse("*").unwrap()incargo/src/cargo/core/resolver/errors.rs
Lines 226 to 228 in 5febbe5
Notes
No response
Version