Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,16 @@ jobs:
~/.cargo/registry
~/.cargo/git
target
key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('rust-toolchain') }}-${{ hashFiles('Cargo.lock') }}
key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('rust-toolchain.toml') }}-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ github.job }}-${{ runner.os }}-${{ hashFiles('rust-toolchain') }}-${{ hashFiles('Cargo.lock') }}
${{ github.job }}-${{ runner.os }}-${{ hashFiles('rust-toolchain') }}-
${{ github.job }}-${{ runner.os }}-${{ hashFiles('rust-toolchain.toml') }}-${{ hashFiles('Cargo.lock') }}
${{ github.job }}-${{ runner.os }}-${{ hashFiles('rust-toolchain.toml') }}-

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
Copy link
Contributor Author

@fmease fmease Jul 31, 2025

Choose a reason for hiding this comment

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

I've removed the dtolnay/rust-toolchain action because it doesn't work well or at all with the rust-toolchain / rust-toolchain.toml file. See dtolnay/rust-toolchain#159.

I still don't know why it used to work a few months ago in your project. Maybe rustup changed its behavior in a recent version, that's my only explanation.

At least on ubuntu-latest which this workflow uses, rustup comes preinstalled, so we can just use it directly to install the toolchain.

Copy link
Contributor Author

@fmease fmease Jul 31, 2025

Choose a reason for hiding this comment

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

I also tried to just specify the components (https://github.com/dtolnay/rust-toolchain?tab=readme-ov-file#inputs):

      - name: Install Rust toolchain
      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt, clippy

but that didn't seem to get picked up by rustup, so I scraped it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I have been aware of the failure of dtolnay/rust-toolchain for a while. So I dropped it in favor of a simpler solution: #26 (review)

# This installs the toolchain specified in `rust-toolchain.toml`.
# There's no need to set it as the default toolchain since all
# rustup shims respect the aforementioned toolchain file.
run: rustup install

- name: Install just
uses: taiki-e/install-action@just
Expand Down
1 change: 0 additions & 1 deletion rust-toolchain

This file was deleted.

3 changes: 3 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[toolchain]
channel = "1.85.0"
components = ["rustfmt", "clippy"]