-
Notifications
You must be signed in to change notification settings - Fork 892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow rustup to handle unavailable packages #1063
Conversation
I forgot to mention that with this change the tests pass, and nightly now downloads. I'm not sure how to go about creating a test case for this bug though. |
@erickt Thanks! |
Seems ok. There's some forwards-compatibility risk here by relying on the So I'm ok accepting this package as is. Travis errors are legit though. Edit: this comment was misreading the patch. |
☔ The latest upstream changes (presumably #1131) made this pull request unmergeable. Please resolve the merge conflicts. |
Hm, after reviewing this does seem to respect the 'available' flag in the manifest, not base its logic on the presence of the hash/url fields? |
Oh right the original bug here is just that rustup errors in a weird way when a component is unavailable, because rcs generats manifests in a way I didn't expect. So the logic here is to avoid reading the url/hash fields when a component is unavailable to deal with the manifests that actually exist in the wild. Patch still seems fine to me. |
I'm rebasing this. |
Rebased and tested. Caught an error in the manifest stringification. r? @Diggsey |
Test failures are legit. |
Before this, if a package was unavailable (like nightly is at the moment), it would error out with a message like "error: missing key: 'url'" because at the moment a few of the rust-analysis packages didn't build. This resulted in the `channel-rust-nightly.toml` to be created with blocks like this: ```toml [pkg.rust-analysis.target.aarch64-apple-ios] available = false [pkg.rust-analysis.target.aarch64-linux-android] available = false [pkg.rust-analysis.target.aarch64-unknown-fuchsia] available = false [pkg.rust-analysis.target.aarch64-unknown-linux-gnu] available = true hash = "be50ffa6f94770929b53bae553977cb6d78b03506f033d14a7251c7b0cdb9035" url = "https://static.rust-lang.org/dist/2017-04-13/rust-analysis-nightly-aarch64-unknown-linux-gnu.tar.gz" ``` rustup assumed that there'd always be a `hash` and `url`, which is not the case when packages are unavaible. This patch then just updates rustup to handle their absence.
@bors r+ |
📌 Commit ea39fe0 has been approved by |
Allow rustup to handle unavailable packages Before this, if a package was unavailable (like nightly is at the moment), it would error out with a message like "error: missing key: 'url'" because at the moment a few of the rust-analysis packages didn't build. This resulted in the `channel-rust-nightly.toml` to be created with blocks like this: ```toml [pkg.rust-analysis.target.aarch64-apple-ios] available = false [pkg.rust-analysis.target.aarch64-linux-android] available = false [pkg.rust-analysis.target.aarch64-unknown-fuchsia] available = false [pkg.rust-analysis.target.aarch64-unknown-linux-gnu] available = true hash = "be50ffa6f94770929b53bae553977cb6d78b03506f033d14a7251c7b0cdb9035" url = "https://static.rust-lang.org/dist/2017-04-13/rust-analysis-nightly-aarch64-unknown-linux-gnu.tar.gz" ``` rustup assumed that there'd always be a `hash` and `url`, which is not the case when packages are unavaible. This patch then just updates rustup to handle their absence. Closes #1063
☀️ Test successful - status-appveyor, status-travis |
Before this, if a package was unavailable (like nightly is at the moment),
it would error out with a message like "error: missing key: 'url'" because
at the moment a few of the rust-analysis packages didn't build. This resulted
in the
channel-rust-nightly.toml
to be created with blocks like this:rustup assumed that there'd always be a
hash
andurl
, which is notthe case when packages are unavaible. This patch then just updates
rustup to handle their absence.
Closes #1063