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

Codify linting toolchain #1251

Merged
merged 2 commits into from
Nov 17, 2023
Merged

Conversation

Twey
Copy link
Contributor

@Twey Twey commented Nov 16, 2023

Motivation

It is unfortunate that our linting toolchain is only specified in the GitHub actions, as this requires local developers to keep their local nightly updated to match that file.

Proposal

This PR moves the specification of our linting toolchain out of the GitHub actions into a dedicated toolchain file. Different toolchains are stored in toolchains/{name}/rust-toolchain.toml, which should make it possible to select between them in CI by running the action from that directory. Eventually this will no longer be necessary, as rustup is planning to add support for multiple toolchain files.

We also add a new devShell to the Nix flake that references the linting toolchain file, allowing nix develop .#lint to drop the developer into a shell suitable for running our CI lints.

Test Plan

CI.

Release Plan

These changes should be invisible to the user.

Links

Moves the nightly toolchain we use for linting out of a GitHub action
and into a dedicated `rust-toolchain.lint.toml` file.

rustup doesn't currently support specifying a toolchain file, though
[it will soon](rust-lang/rustup#2686), so we
hack around it by moving the toolchain file back and forth as part of
the GitHub action for Rust.
@Twey Twey marked this pull request as ready for review November 16, 2023 19:38
Copy link
Contributor

@ma2bd ma2bd left a comment

Choose a reason for hiding this comment

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

Thanks!

@Twey Twey merged commit 7ec6f67 into linera-io:main Nov 17, 2023
4 checks passed
ma2bd added a commit to ma2bd/linera-protocol that referenced this pull request Nov 20, 2023
ma2bd added a commit that referenced this pull request Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants