lemmy icon indicating copy to clipboard operation
lemmy copied to clipboard

Use fixed cargo version for formatting check in CI

Open Nutomic opened this issue 2 years ago • 2 comments

Our CI currently uses the Docker image rustdocker/rust:nightly for running cargo fmt -- --check in CI, to ensure that Rust code is correctly formatted. This is a problem because it is not tied to a specific nightly version, so it can update automatically and make incompatible changes to formatting requirements. It would be good if there were Docker images for specific nightly dates, but I couldnt find any in a quick search.

See https://github.com/LemmyNet/lemmy/commit/fc60b82f8264301202d6c118e8bf3c1de3f49968

Nutomic avatar Jul 03 '23 09:07 Nutomic

It might be possible to do so by using the image digest inside of a tag. This has drawbacks like if the pinned image becomes unavailable. But it could solve this issue.

lgerard-pass avatar Jul 05 '23 16:07 lgerard-pass

Another option would be rustup toolchain install nightly-2023-07-06. But thats slower.

Nutomic avatar Jul 06 '23 13:07 Nutomic