-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 #9188 - weihanglo:issue-9041, r=ehuss
Package ID specification urls must contain a host Resolves #9041 Not sure which commit breaks this. Cargo shipped with rust 1.46 didn't unwrap on a `None` but 1.47 did. Even checkouted to 149022b (cargo of rust 1.46), it still unwrap unexpectedly. So I ended up following the [Specification grammer](https://doc.rust-lang.org/cargo/reference/pkgid-spec.html#specification-grammar) to make sure there is a `host` in the pkgid urls. <details> <summary>See console output</summary> cargo of rust 1.46 ```console $ cargo +1.46 -vV cargo 1.46.0 (149022b 2020-07-17) release: 1.46.0 commit-hash: 149022b commit-date: 2020-07-17 $ cargo +1.46 pkgid /path error: package ID specification `/path` matched no packages ``` cargo of rust 1.47 ```console $ cargo +1.47 -vV cargo 1.47.0 (f3c7e06 2020-08-28) release: 1.47.0 commit-hash: f3c7e06 commit-date: 2020-08-28 $ cargo +1.47 pkgid /path thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/tools/cargo/src/cargo/core/package_id_spec.rs:234:50 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ``` cargo on commit 149022b ```console $ git checkout 149022b $ cargo run -- pkgid /path Compiling cargo-platform v0.1.1 ([..]/cargo/crates/cargo-platform) Compiling crates-io v0.31.1 ([..]/cargo/crates/crates-io) Compiling cargo v0.47.0 ([..]/cargo) Finished dev [unoptimized + debuginfo] target(s) in 22.90s Running `target/debug/cargo pkgid /path` thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/cargo/core/package_id_spec.rs:234:50 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ``` </details>
- Loading branch information
Showing
6 changed files
with
76 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters