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

chore(ci): bump rust toolchain to 1.81 #1523

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

SuperFluffy
Copy link
Member

@SuperFluffy SuperFluffy commented Sep 19, 2024

Summary

Updates the rust toolchain used for all rust releated github jobs to and the containerfile to 1.81.0.

Background

Rust 1.81 was released and comes with a load of niceties that we would like to use. Among them of immediate interest are:

  1. lint reasons (Replace all allow attributes by expect and require lint reasons #1521)
  2. fixes clippy::blocks_in_conditions lint triggering on proc macros like tracing::instrument (which chore(sequencer): Add instrumentation #1368 needed to work around)
  3. lazy lock and lazy cell (to replace once_cell) in 1.80 (Replace once_cell by sync primitives added in 1.80 #1520)
  4. checked cfg names (also 1.80 which flags a few issues in our code and should be immediately available).

Note that this is orthgonal to setting the MSRV in individual Astria crates.

Changes

  • Updates all github workflows to use the 1.81.0 toolchain (except for rustfmt and dylint, which need nightlies, respectively).
  • Fix all new clippy warnings.
  • Upgraded to the most recent dylint to make it compile again
  • Upgrade the single containerfile to use rust:1.81-bookwarm as the base image

Related Issues

Closes #1522

@github-actions github-actions bot added ci issues that are related to ci and github workflows docker labels Sep 19, 2024
@SuperFluffy SuperFluffy force-pushed the ENG-819/bump-msrv-to-1.81 branch 2 times, most recently from 8415675 to 9142701 Compare September 19, 2024 10:26
@github-actions github-actions bot added conductor pertaining to the astria-conductor crate sequencer pertaining to the astria-sequencer crate labels Sep 19, 2024
@SuperFluffy SuperFluffy force-pushed the ENG-819/bump-msrv-to-1.81 branch 4 times, most recently from c084b23 to c751c24 Compare September 19, 2024 12:10
@SuperFluffy SuperFluffy marked this pull request as ready for review September 20, 2024 11:33
@SuperFluffy SuperFluffy requested review from a team as code owners September 20, 2024 11:33
.github/workflows/reusable-build.yml Show resolved Hide resolved
@@ -13,6 +13,8 @@ on:
env:
REGISTRY: ghcr.io
FULL_REF: ${{ inputs.tag && format('refs/tags/{0}', inputs.tag) || github.ref }}
# This must match the entry in rustup-toolchain.toml at the repository root
RUSTUP_TOOLCHAIN: "1.81.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess we could name this RUST_TOOLCHAIN to be consistent with the filename?

Also, could we read the appropriate value from the rust-toolchain.toml file here rather than having to keep these in sync?

Copy link
Member Author

@SuperFluffy SuperFluffy Sep 23, 2024

Choose a reason for hiding this comment

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

RUSTUP_TOOLCHAIN is the actual env var that's read by rust: https://rust-lang.github.io/rustup/overrides.html#the-toolchain-file, so I'd like to keep that.

And I guess we could extract this, but I didn't want to move away from dtolnay/rust-toolchain (at least for now), and parsing toml files in workflows can only be done through obscure github actions, which I didn't feel comfortable introducing.

Followup?

.github/workflows/test.yml Outdated Show resolved Hide resolved
lint/tracing_debug_field/rust-toolchain Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci issues that are related to ci and github workflows conductor pertaining to the astria-conductor crate docker sequencer pertaining to the astria-sequencer crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update CI to Rust 1.81
2 participants