Hi! Which rust toolchain should I use to run builds and tests on main? After running tests in nix develop
first I got error about this-error crate using nightly feature provide_any
, but after switching to nightly in rust-toolchain.toml
I got another error in gen_llvm crate about let ... else
statement being unstable. I tried adding the #![feature(let_else)]
but I'm not sure where to put it.
I suspect your rust version is old
hmm actually, maybe the compiler rust version is old? @Anton the toolchain toml says it's 1.65 still. rust is on 1.68 at this point. maybe we can upgrade again?
to anwer the question: the roc compiler uses the stable toolchain
and based on the rust-toolchain.toml
it uses rust 1.65
you can run e.g. cargo --version
to see which version you actually have
I'll make a note to upgrade.
But with nix you can basically not use the wrong rust version, so I think something is off
well based on the errors, the compiler used is too old for the code that it is compiling
@ziutech can you tell me what OS you are on and the sequence of commands you executed?
Are you using the main branch without any changes?
I'm on linux
I'm directly on main, without any changes
I updated my fork, pulled changes, then run nix develop
and cargo run
While in a nix shell (=after having executed nix develop
), can you do a cargo clean
, followed by cargo run repl
?
I suspect that you have some rust crates in play from once executing cargo without nix.
Okay, now everything works, thank you
Several people have encountered this issue. I wonder if we could alias cargo in the flake to quickly inspect some metadata before running so that we can provide a nice error message when crates compiled outside of nix are detected :thinking:
Last updated: Jul 06 2025 at 12:14 UTC