The documentation for the package id spec (https://doc.rust-lang.org/1.40.0/cargo/reference/pkgid-spec.html) does not seem to be correct in several ways.
- The proto is not optional. Cargo defaults to
cargo:// which is not a scheme Cargo understands anywhere.
crates.io as a host does not work. It looks like you can only give the full path to the index, like https://github.com/rust-lang/crates.io-index#bitflags:1.2.1
host/name doesn't work. It looks like the matching code requires the entire scheme/host/path to match.
The question is, what should we do? Should we just remove all the things that don't work from the documentation? Or should we try to enhance the parsing/matching code to work better.
- Should
crates.io work as an alias for https://github.com/rust-lang/crates.io-index?
- Missing proto probably shouldn't default to anything, and should probably match any proto.
- Should
host/name match host/path#name?
EDIT: #9188 and #9249 fixed the broken parts, but leaving this open to consider adding abbreviated forms.
The documentation for the package id spec (https://doc.rust-lang.org/1.40.0/cargo/reference/pkgid-spec.html) does not seem to be correct in several ways.
cargo://which is not a scheme Cargo understands anywhere.crates.ioas a host does not work. It looks like you can only give the full path to the index, likehttps://github.com/rust-lang/crates.io-index#bitflags:1.2.1host/namedoesn't work. It looks like the matching code requires the entire scheme/host/path to match.The question is, what should we do? Should we just remove all the things that don't work from the documentation? Or should we try to enhance the parsing/matching code to work better.
crates.iowork as an alias forhttps://github.com/rust-lang/crates.io-index?host/namematchhost/path#name?EDIT: #9188 and #9249 fixed the broken parts, but leaving this open to consider adding abbreviated forms.