on master help sign in
Remove the rust-toolchain.toml file before building the release

The 'dtolnay/rust-toolchain' action ignores the rust-toolchain.toml file, but the installed 'cargo' respects it. This can create a version mismatch if the MSRV is different from the stable rust version. Any additional targets installed by rustup like aarch64-darwin might not be installed for the correct version. To fix this, we remove the rust-toolchain.toml file before calling 'cargo'.

commit6bfc3097412e54563f7bd6a6ff5fce5b4d9577e1 authorMichael Davis <mcarsondavis@gmail.com> dateFri 31 Mar 2023, 10:05 (4 years ago) parentfc5e515
1 file changed+6
.github/workflows/release.yml+6
.github/workflows/release.yml+6
@@ -114,6 +114,12 @@ jobs:
114114 mkdir -p runtime/grammars/sources
115115 tar xJf grammars/grammars.tar.xz -C runtime/grammars/sources
116116
117+ # The rust-toolchain action ignores rust-toolchain.toml files.
118+ # Removing this before building with cargo ensures that the rust-toolchain
119+ # is considered the same between installation and usage.
120+ - name: Remove the rust-toolchain.toml file
121+ run: rm rust-toolchain.toml
122+
117123 - name: Install ${{ matrix.rust }} toolchain
118124 uses: dtolnay/rust-toolchain@master
119125 with: