Skip to content
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

Update rand version #58908

Merged
merged 1 commit into from
Mar 13, 2019
Merged

Update rand version #58908

merged 1 commit into from
Mar 13, 2019

Conversation

JohnTitor
Copy link
Member

@JohnTitor JohnTitor commented Mar 4, 2019

cc: #57724

r? @scottmcm

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 4, 2019
@JohnTitor
Copy link
Member Author

@scottmcm Can you review this, or should I ask someone to do instead of you?

@mati865
Copy link
Contributor

mati865 commented Mar 8, 2019

I don't think it fixes mentioned issue. It upgrades dependency for one package but Rust will still build 3 versions of rand:

rust/Cargo.lock

Lines 4179 to 4181 in 939a263

"checksum rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8356f47b32624fef5b3301c1be97e5944ecdd595409cc5da11d05f211db6cfbd"
"checksum rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e464cd887e869cddcae8792a4ee31d23c7edd516700695608f5b98c67ee0131c"
"checksum rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ae9d223d52ae411a33cf7e54ec6034ec165df296ccd23533d671a28252b6f66a"

@JohnTitor
Copy link
Member Author

Well, this issue is about "Building stage0 compiler artifacts", I think. I checked build log python x.py build --stage=0, I saw rand v0.6.1 only. Anything I'm missing?

@mati865
Copy link
Contributor

mati865 commented Mar 8, 2019

The title "rustc is using three versions of rand" remains true when this PR is merged. I'm not reviewer but IMO this PR should only cc it.

@JohnTitor
Copy link
Member Author

JohnTitor commented Mar 8, 2019

@mati865 Okay, I got it! I changed description following your opinion. Or, should I work on this issue more?

@mati865
Copy link
Contributor

mati865 commented Mar 8, 2019

I don't see other problems here.

For the further work:
There is another crate in this repository which depends on rand 0.5:

rand = { version = "0.5.5", features = ["i128_support"] }

I have no idea if upgrading it won't break tools build.
It's not possible to drop rand 0.5 entirely just yet because cargo depends on proptest 0.8.7 and cannot upgrade to proptest 0.9 because test with minimal-versions fails.

It should be however possible to get rid of rand 0.4 (in another PR) by updating few packages. I haven't ran tests but it got removed from Cargo.lock without obvious issues.
Do you want to investigate it?

@scottmcm
Copy link
Member

Thanks, @JohnTitor!

@bors r+ rollup

FWIW, I'd be happy for #57724 to close if rustc+std is down to one version, without worrying too much about whether other tools in the repo happen to use more.

@bors
Copy link
Contributor

bors commented Mar 11, 2019

📌 Commit 939a263 has been approved by scottmcm

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 11, 2019
@kennytm
Copy link
Member

kennytm commented Mar 11, 2019

@bors rollup-

This PR changes Cargo.lock.

@@ -2747,7 +2747,7 @@ version = "0.0.0"
dependencies = [
"graphviz 0.0.0",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any chance of going to 0.6.5 instead? IIUC, that should bring in rand_os 0.1.3, which fixes SIGSYS crashes on illumos.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot decide that on my own, what do you think @scottmcm? (I updated from 0.6.1 to 0.6.5 on local, but the build was failed.)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't even really know how rand is used, so I have no idea what gotchas might exist, nor do I have strong feeling about which version should be used (just that ideally there'd be only one).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JohnTitor do you have error message from that build?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mati865 Yes, the message is here:

error[E0463]: can't find crate for `core`=============>                ] 16/22: libc
   --> C:\Users\username\.cargo\registry\src\github.com-1ecc6299db9ec823\libc-0.2.46\src\lib.rs:161:1
    |
161 | extern crate std as core;
    | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error: Could not compile `libc`.

I updated rand 0.6.1 by cargo update -p rand:0.6.1 and changed this line to 0.6.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like std failed to build, either it's issue with cache/incremental compilation or something really bad happened.

Centril added a commit to Centril/rust that referenced this pull request Mar 13, 2019
bors added a commit that referenced this pull request Mar 13, 2019
Rollup of 16 pull requests

Successful merges:

 - #58829 (librustc_interface: Update scoped-tls to 1.0)
 - #58876 (Parse lifetimes that start with a number and give specific error)
 - #58908 (Update rand version)
 - #58998 (Fix documentation of from_ne_bytes and from_le_bytes)
 - #59056 (Use lifetime contravariance to elide more lifetimes in core+alloc+std)
 - #59057 (Standardize `Range*` documentation)
 - #59080 (Fix incorrect links in librustc_codegen_llvm documentation)
 - #59083 (Fix #54822 and associated faulty tests)
 - #59093 (Remove precompute_in_scope_traits_hashes)
 - #59101 (Reduces Code Repetitions like `!n >> amt`)
 - #59121 (impl FromIterator for Result: Use assert_eq! instead of assert!)
 - #59124 (Replace assert with assert_eq)
 - #59129 (Visit impl Trait for dead_code lint)
 - #59130 (Note that NonNull does not launder shared references for mutation)
 - #59132 (ignore higher-ranked object bound conditions created by WF)
 - #59138 (Simplify Iterator::{min, max})

Failed merges:

r? @ghost
@bors bors merged commit 939a263 into rust-lang:master Mar 13, 2019
@JohnTitor JohnTitor deleted the improve-rand branch March 13, 2019 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants