Skip to content

Commit

Permalink
Update to Rust 1.71 (#922)
Browse files Browse the repository at this point in the history
* Update to Rust 1.71

* Use "limited", actually

* Fix new warnings

* Update the fuzzing toolchain
  • Loading branch information
tomaka authored Aug 8, 2023
1 parent 3c3722a commit c9a1693
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 18 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
test-64bits:
runs-on: ubuntu-latest
container:
image: rust:1.70
image: rust:1.71
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
Expand All @@ -39,7 +39,7 @@ jobs:
test-32bits:
runs-on: ubuntu-latest
container:
image: rust:1.70
image: rust:1.71
steps:
- run: apt-get update && apt install -y libc6-dev-i386
- uses: actions/checkout@v3
Expand All @@ -50,7 +50,7 @@ jobs:
wasm-node-check:
runs-on: ubuntu-latest
container:
image: rust:1.70
image: rust:1.71
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
Expand All @@ -65,7 +65,7 @@ jobs:
check-features:
runs-on: ubuntu-latest
container:
image: rust:1.70
image: rust:1.71
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
# Since build artifacts are specific to a nightly version, we pin the specific nightly
# version to use in order to not invalidate the build cache every day. The exact version
# is completely arbitrary.
toolchain: nightly-2023-04-20
toolchain: nightly-2023-07-15
override: true
- uses: baptiste0928/cargo-install@v2 # This action ensures that the compilation is cached.
with:
Expand All @@ -119,7 +119,7 @@ jobs:
check-rustdoc-links:
runs-on: ubuntu-latest
container:
image: rust:1.70
image: rust:1.71
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
build-js-doc:
runs-on: ubuntu-latest
container:
image: rust:1.70
image: rust:1.71
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -82,7 +82,7 @@ jobs:
build-rust-doc:
runs-on: ubuntu-latest
container:
image: rust:1.70
image: rust:1.71
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -103,7 +103,7 @@ jobs:
build-tests-coverage:
runs-on: ubuntu-latest
container:
image: rust:1.70
image: rust:1.71
steps:
- run: apt update && apt install -y jq
- run: rustup component add llvm-tools-preview
Expand Down Expand Up @@ -173,7 +173,7 @@ jobs:
npm-publish:
runs-on: ubuntu-latest
container:
image: rust:1.70
image: rust:1.71
steps:
- uses: actions/checkout@v3
- uses: actions/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/periodic-cargo-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
cargo-update:
runs-on: ubuntu-latest
container:
image: rust:1.70
image: rust:1.71
steps:
- uses: actions/checkout@v3
# Note: `cargo update --workspace` doesn't seem to have any effect.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ repository = "https://github.com/smol-dot/smoldot"
include = ["**/*.rs"] # Only Rust files are included, as anything else might be a test fixture.

[profile.dev]
debug = 1 # Default value is `2`, which contains the full debug info. `1` is enough for stack traces. # TODO: use the named version after Cargo v1.71
debug = "limited"
opt-level = 2
panic = "abort"
[profile.dev.package."*"]
Expand Down
6 changes: 3 additions & 3 deletions light-base/src/runtime_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ impl<TPlat: PlatformRef> RuntimeService<TPlat> {
}
}
};
let mut guarded_lock = &mut *guarded_lock;
let guarded_lock = &mut *guarded_lock;

// Extract the components of the `FinalizedBlockRuntimeKnown`. We are guaranteed by the
// block above to be in this state.
Expand Down Expand Up @@ -1413,7 +1413,7 @@ async fn run_background<TPlat: PlatformRef>(
let near_head_of_chain = background.sync_service.is_near_head_of_chain_heuristic().await;

let mut guarded = background.guarded.lock().await;
let mut guarded = &mut *guarded;
let guarded = &mut *guarded;
// TODO: note that this code is never reached for parachains
if new_block.is_new_best {
guarded.best_near_head_of_chain = near_head_of_chain;
Expand Down Expand Up @@ -1466,7 +1466,7 @@ async fn run_background<TPlat: PlatformRef>(
let near_head_of_chain = background.sync_service.is_near_head_of_chain_heuristic().await;

let mut guarded = background.guarded.lock().await;
let mut guarded = &mut *guarded;
let guarded = &mut *guarded;
guarded.best_near_head_of_chain = near_head_of_chain;

match &mut guarded.tree {
Expand Down
2 changes: 1 addition & 1 deletion light-base/src/sync_service/parachain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ impl<TPlat: PlatformRef> ParachainBackgroundTask<TPlat> {

/// Start fetching parachain headers of new blocks whose parachain block needs to be fetched.
fn start_paraheads_fetch(&mut self) {
let mut runtime_subscription = match &mut self.subscription_state {
let runtime_subscription = match &mut self.subscription_state {
ParachainBackgroundState::NotSubscribed { .. } => return,
ParachainBackgroundState::Subscribed(s) => s,
};
Expand Down
2 changes: 1 addition & 1 deletion light-base/src/transactions_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ async fn background_task<TPlat: PlatformRef>(mut config: BackgroundTaskConfig<TP
// A block body download has finished, successfully or not.
let (block_hash, block_body) = download;

let mut block = match worker.pending_transactions.block_user_data_mut(&block_hash) {
let block = match worker.pending_transactions.block_user_data_mut(&block_hash) {
Some(b) => b,
None => {
// It is possible that this block has been discarded because a sibling
Expand Down
2 changes: 1 addition & 1 deletion wasm-node/javascript/prepare.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ if (buildProfile != 'debug' && buildProfile != 'min-size-release')
// The Rust version is pinned because the wasi target is still unstable. Without pinning, it is
// possible for the wasm-js bindings to change between two Rust versions. Feel free to update
// this version pin whenever you like, provided it continues to build.
const rustVersion = '1.70.0';
const rustVersion = '1.71.0';

// Assume that the user has `rustup` installed and make sure that `rust_version` is available.
// Because `rustup install` requires an Internet connection, check whether the toolchain is
Expand Down

0 comments on commit c9a1693

Please sign in to comment.