Closed PatchMixolydic closed 3 years ago
I'm a bit concerned about these tests. One works by checking a compiler diagnostic, which may cause it to start failing if the diagnostic is reworded, while the other requires a nightly toolchain to be installed. Is this okay?
@PatchMixolydic Thanks! It's a nice feature to support, so I think it's worth maintaining the new tests.
@PatchMixolydic Could you help with a CI build failure?
The CI setup now installs both rust stable (1.47 or 1.51) and nightly toolchains (https://github.com/fornwall/rust-script/blob/master/.github/workflows/ci.yml#L16-L23):
- name: Setup rust (${{ matrix.rust }})
uses: hecrj/setup-rust-action@v1
with:
rust-version: ${{ matrix.rust }}
- name: Setup rust (nightly)
uses: hecrj/setup-rust-action@v1
with:
rust-version: nightly
This works on Linux and Mac, but on Windows it fails with (https://github.com/fornwall/rust-script/runs/2436947155#step:5:192):
---- tests::script::test_stable_toolchain stdout ----
rust-script cmd: "target/debug/rust-script" "--toolchain-version" "stable" "tests/data/script-unstable-feature.rs"
rust-script stdout
-----
-----
rust-script stderr:
-----
error: toolchain 'stable-x86_64-pc-windows-msvc' is not installed
error: test failed, to rerun pass '--test integration'
So it seems that +stable
doesn't work on Windows here? Earlier the output from the stable installation was 1.47.0-x86_64-pc-windows-msvc installed
.
Any ideas? Unfortunately I haven't developed in a Windows environment for a long time.
Ah, it seems that it might be due to stable
being preinstalled on Mac and Linux runners, but not on Windows. Installing stable
explicitly fixed the tests on Windows.
Thanks! This has now been released in version 0.14.0.
Sorry about not being around to give you a hand; I was still asleep :sweat_smile: Glad to see it's working fine now!
This allows the user to specify which toolchain to use to build their script. This allows for the use of nightly features, features only stabilized in beta (without resorting to nightly), and even the use of custom-built toolchains if the need ever arises.