Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #12933 - epage:pkgid-spec, r=weihanglo
feat(spec): Extend PackageIdSpec with source kind + git ref for unambiguous specs ### What does this PR try to resolve? This tries to add just enough information to Package ID Specs that we can be sure they are unambiguous. On its own thats important but this will unblock #12914 so we can have a user-facing ID that can be used with cargo's CLI. More specifically, this adds - `git+`, etc prefixes to the scheme - These were previously stabilized for `cargo metadata`s source id urls - Like with `SourceID`, this will allow `PackageIDSpec` to generate `directory+` and `local-registry+` prefixes but not parse them. I'm assuming that the layers where those are dealt with they won't appear here but I don't have enough experience with them - git ref query strings for URLs Things from `SourceID` that this does not include - precise: this seems less related to matching (e.g. ignored for `impl Ord for SourceId`) - canonical URL for git kinds: this could be nice for users but users aren't the target audience and we can switch to these later Fixes #10256 ### How should we test and review this PR? Per-commit ### Additional information
- Loading branch information