Skip to content

Add Cargo.lock to repo

The GitLab runner picks up to date package versions when building the project and as a result will fail to build every now and then (because some package released a new version that doesn't compile with our project (usually because it's expecting a newer version of Rust)). The reason it is doing this is that the Cargo.lock is not committed to the repo. The GitLab runner will run its algorithm to select up to date versions of packages based on our declared dependencies every time it runs, whereas locally the Cargo.lock file is already there and cargo will use the versions described inside it.

Adding the Cargo.lock will resolve the issue and also result in everyone using the same package versions when building the project. If we want to update some packages, that should be done by changing the version of a dependency in Cargo.toml , manually updating a package's version with cargo update or regenerating the Cargo.lock file.

Merge request reports

Loading