-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Update to rust 1.44.0 #10585
Update to rust 1.44.0 #10585
Conversation
|
I'm preparing nightly now. |
|
Also, I'm aware of rust 1.44.1 is baking now, but not bothered with waiting after reviewing its pending release notes: rust-lang/rust#73238 |
|
Hmm, it looks like updating rust and rust-nightly is tightly coupled at the moment... CI failed... |
| This image may be manually updated by running `CI=true ./build.sh` if you are a member | ||
| of the [Solana Labs](https://hub.docker.com/u/solanalabs/) Docker Hub | ||
| organization, but it is also automatically updated periodically by | ||
| [this automation](https://buildkite.com/solana-labs/solana-ci-docker-rust-nightly). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find this job?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was stale information
|
|
||
| This image manually maintained: | ||
| 1. Edit `Dockerfile` to match the desired rust version | ||
| 2. Run `./build.sh` to publish the new image, if you are a member of the [Solana |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I didn't know it's not needed to manually increment those numbers... ;)
ci/docker-run.sh
Outdated
| fi | ||
|
|
||
| if [[ -n $SOLANA_ALLOCATE_TTY ]]; then | ||
| ARGS+=(--tty) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm impatient so I wanna view a rainbow progress bar in terminal. :)
| // This prevents the amount of storage needed for bench-tps accounts from creeping up | ||
| // across multiple runs. | ||
| keypairs.sort_by(|x, y| x.pubkey().to_string().cmp(&y.pubkey().to_string())); | ||
| keypairs.sort_by_key(|x| x.pubkey().to_string()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ryoqun I can't think of a good reason. binary comparison sounds good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll do this as a separate pr for back-porting.
| source scripts/ulimit-n.sh | ||
|
|
||
| scripts/coverage.sh | ||
| scripts/coverage.sh "$@" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to do like this:
$ SOLANA_ALLOCATE_TTY=1 SOLANA_DOCKER_RUN_NOSETUID=1 ci/docker-run.sh --nopull solanalabs/rust-nightly:2020-06-15 ci/test-coverage.sh -p solana-sdk test_slot_duration_from_slots_per_year
Codecov Report
@@ Coverage Diff @@
## master #10585 +/- ##
========================================
Coverage 81.8% 81.9%
========================================
Files 301 301
Lines 70637 70204 -433
========================================
- Hits 57833 57504 -329
+ Misses 12804 12700 -104 |
| scripts/coverage.sh | ||
| scripts/coverage.sh "$@" | ||
|
|
||
| if [[ -z $CI ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this manual use case: https://github.com/solana-labs/solana/pull/10585/files#diff-1143f3dc73bf3e79cf89244ccda0fe97R25
| } | ||
|
|
||
| rpc_url=$($solana_gossip rpc-url --entrypoint "$gossip_entrypoint") | ||
| rpc_url=$($solana_gossip rpc-url --timeout 180 --entrypoint "$gossip_entrypoint") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, was hard to debug.... Well, this depended on exact build timing. ;)
Greatly increase from the default 15 seconds to 180 to prevent another sorrow. ;)
|
|
||
| /// From slots per year to slot duration | ||
| pub fn slot_duration_from_slots_per_year(slots_per_year: f64) -> Duration { | ||
| // Regarding division by zero potential below: for some reason, if Rust stores an `inf` f64 and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@CriesofCarrots This is added by https://github.com/solana-labs/solana/pull/7130/files#diff-826aa0353ee517a070e3c98cc61423eaR43
FYI, rust (stable rust 1.45+; this will be affected in our nightly CI builds after this pr) is actually fixing this behavior: https://github.com/rust-lang/rust/blob/master/RELEASES.md#compatibility-notes
I'm preserving the current behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweet, thanks!
|
@svenski123 FYI, we're about to go rust 1.45 based on your previous efforts at #10445. Thank you very much! :) |
|
@mvines Finally, this got ready for review and merge! I've updated relevant docs and fiddled scripts a bit while doing this for the first time. Could you review these? |
| RUN set -x \ | ||
| && rustup install nightly-$date \ | ||
| && rustup component add clippy --toolchain=nightly-$date \ | ||
| && rustup component add rustfmt --toolchain=nightly-$date \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.

Problem
Using older rust.
Summary of Changes
Update it
Credits
@svenski123 Special thanks for previous works at #10445. That pr greatly reduced required efforts in this pr!
prev: #9754