Upgrade to Rust 1.43.0 (bp #9754) (#9807)

* Upgrade to Rust 1.43.0 (#9754)

(cherry picked from commit 230df0ec0c)

# Conflicts:
#	core/src/validator.rs
#	runtime/src/accounts_db.rs

* Update validator.rs

* Update accounts_db.rs

Co-authored-by: Michael Vines <mvines@gmail.com>
This commit is contained in:
mergify[bot]
2020-04-30 08:50:03 -07:00
committed by GitHub
parent e7748c603b
commit b4933f4c74
6 changed files with 21 additions and 15 deletions

View File

@ -1,4 +1,4 @@
FROM solanalabs/rust:1.42.0 FROM solanalabs/rust:1.43.0
ARG date ARG date
RUN set -x \ RUN set -x \

View File

@ -1,6 +1,6 @@
# Note: when the rust version is changed also modify # Note: when the rust version is changed also modify
# ci/rust-version.sh to pick up the new image tag # ci/rust-version.sh to pick up the new image tag
FROM rust:1.42.0 FROM rust:1.43.0
# Add Google Protocol Buffers for Libra's metrics library. # Add Google Protocol Buffers for Libra's metrics library.
ENV PROTOC_VERSION 3.8.0 ENV PROTOC_VERSION 3.8.0

View File

@ -1,28 +1,30 @@
# #
# This file maintains the rust versions for use by CI. # This file maintains the rust versions for use by CI.
# #
# Build with stable rust, updating the stable toolchain if necessary:
# $ source ci/rust-version.sh stable
# $ cargo +"$rust_stable" build
#
# Build with nightly rust, updating the nightly toolchain if necessary:
# $ source ci/rust-version.sh nightly
# $ cargo +"$rust_nightly" build
#
# Obtain the environment variables without any automatic toolchain updating: # Obtain the environment variables without any automatic toolchain updating:
# $ source ci/rust-version.sh # $ source ci/rust-version.sh
# #
# Obtain the environment variables updating both stable and nightly, only stable, or
# only nightly:
# $ source ci/rust-version.sh all
# $ source ci/rust-version.sh stable
# $ source ci/rust-version.sh nightly
# Then to build with either stable or nightly:
# $ cargo +"$rust_stable" build
# $ cargo +"$rust_nightly" build
#
if [[ -n $RUST_STABLE_VERSION ]]; then if [[ -n $RUST_STABLE_VERSION ]]; then
stable_version="$RUST_STABLE_VERSION" stable_version="$RUST_STABLE_VERSION"
else else
stable_version=1.42.0 stable_version=1.43.0
fi fi
if [[ -n $RUST_NIGHTLY_VERSION ]]; then if [[ -n $RUST_NIGHTLY_VERSION ]]; then
nightly_version="$RUST_NIGHTLY_VERSION" nightly_version="$RUST_NIGHTLY_VERSION"
else else
nightly_version=2020-03-12 nightly_version=2020-04-23
fi fi
@ -51,6 +53,10 @@ export rust_nightly_docker_image=solanalabs/rust-nightly:"$nightly_version"
nightly) nightly)
rustup_install "$rust_nightly" rustup_install "$rust_nightly"
;; ;;
all)
rustup_install "$rust_stable"
rustup_install "$rust_nightly"
;;
*) *)
echo "Note: ignoring unknown argument: $1" echo "Note: ignoring unknown argument: $1"
;; ;;

View File

@ -25,7 +25,7 @@ source ci/_
source ci/upload-ci-artifact.sh source ci/upload-ci-artifact.sh
eval "$(ci/channel-info.sh)" eval "$(ci/channel-info.sh)"
source ci/rust-version.sh nightly source ci/rust-version.sh all
set -o pipefail set -o pipefail
export RUST_BACKTRACE=1 export RUST_BACKTRACE=1

View File

@ -5,7 +5,7 @@ use std::sync::{Arc, RwLock};
lazy_static! { lazy_static! {
static ref LOGGER: Arc<RwLock<env_logger::Logger>> = static ref LOGGER: Arc<RwLock<env_logger::Logger>> =
{ Arc::new(RwLock::new(env_logger::Logger::from_default_env())) }; Arc::new(RwLock::new(env_logger::Logger::from_default_env()));
} }
struct LoggerShim {} struct LoggerShim {}

View File

@ -60,7 +60,7 @@ pub const DEFAULT_NUM_DIRS: u32 = 4;
lazy_static! { lazy_static! {
// FROZEN_ACCOUNT_PANIC is used to signal local_cluster that an AccountsDB panic has occurred, // FROZEN_ACCOUNT_PANIC is used to signal local_cluster that an AccountsDB panic has occurred,
// as |cargo test| cannot observe panics in other threads // as |cargo test| cannot observe panics in other threads
pub static ref FROZEN_ACCOUNT_PANIC: Arc<AtomicBool> = { Arc::new(AtomicBool::new(false)) }; pub static ref FROZEN_ACCOUNT_PANIC: Arc<AtomicBool> = Arc::new(AtomicBool::new(false));
} }
#[derive(Debug, Default)] #[derive(Debug, Default)]