exercism / rust-test-runner

GNU Affero General Public License v3.0
3 stars 15 forks source link

Update Rust version #58

Closed senekor closed 2 years ago

senekor commented 2 years ago

Hi, so I've used a relatively new Rust feature in one of my exercises. (scoped threads, introduced in 1.63, about two months ago)

My tests fail and it's saying that scoped threads are an unstable library version. I'm assuming the Rust version of the test runner is lower than 1.63.

Can this version be bumped? (I will gladly help out if it makes sense, but I'm not very experienced with docker.)

Thank you for taking a look!

senekor commented 2 years ago

Just stumbled into this again with array::from_fn, also added in 1.63.

RGafiyatullin commented 2 years ago

The runner is built from rust:latest. Maybe it would be better to have the version explicitly specified, so that when the time comes for another stable version:

It's just that there is no event that would lead to the test-runner being rebuit.

senekor commented 2 years ago

That sounds good to me. Is that as easy as changing this line?

FROM rust:latest as build

I wonder if it would be possible to even do this completely automatically. Maybe some github workflow triggered by a time interval, which checks if an updated version of the rust docker image is available. Sounds difficult though.

RGafiyatullin commented 2 years ago

I am not sure how exactly the Exercism's CI is functioning, but it would only be logical, if upon merging a PR, something gets into motion.

At least, this should be done in order to satisfy one of the Dockerfile best practices:

When building images, always tag them with useful tags which codify version information, intended destination (prod or test, for instance), stability, or other information that is useful when deploying the application in different environments. Do not rely on the automatically-created latest tag.