Closed pimlie closed 4 months ago
The problem why if1
fails is that it is the first exercise with tests. Rustlings currently tests by calling cargo test
with RUSTFLAGS="-A warning"
. It looks like RUSTFLAGS
is not handled probably on Alpine.
Closing because Rustlings can't do anything about this issue. It has to be fixed by cargo
or rustc
. Follow the issue that I opened: https://github.com/rust-lang/rust/issues/127498
Anyway: Just use Debian. Alpine is often problematic and even has worse performance sometimes.
Thanks :)
I thought indeed that the tests could be the cause of the issue, so I tried removing all the tests from if1
but I guess that it's not possible to toggle https://github.com/rust-lang/rustlings/blob/main/src/exercise.rs dynamically? If I understand correctly it's currently set in the macro config here during the rustlings build and not during the build of the exercise? https://github.com/rust-lang/rustlings/blob/main/rustlings-macros/info.toml
Disabling this would either mean disabling tests or having duplicated output of cargo check
😅
works well here
rustc 1.78.0 (9b00956e5 2024-04-29) (Alpine Linux 1.78.0-r0)
binary: rustc
commit-hash: 9b00956e56009bab2aa15d7bff10916599e3d6d6
commit-date: 2024-04-29
host: x86_64-alpine-linux-musl
release: 1.78.0
LLVM version: 17.0.6
i haven't try docker but it seems you can install clippy by apk
apk add rust-clippy
because it has some "special" patches
everything work well on pipeline
@qaqland Thanks!
I can confirm that both the packaged rustlings and the normal installation after apk add cargo rust-clippy
work. Weird how adding rust-clippy
fixes the problem 😅
Using the rust:alpine based docker image from my other issue about the terminal today, I cannot get past exercise if1 as I keep getting a rustc compile error. All other exercises up to if1 compiled fine using alpine. I tried debugging this myself a bit but I guess I'm still too much of a n00b, so sorry about that ;)
As it works using debian, this can be considered a low prio issue I guess.
The alpine container will show the following error, this ofc prevents you from continuing to the next exercise