Lyricdev
GitHub

LYR-PKG0011

`--locked` and a lock that does not match

error · spec 15-project

Reported under --locked when lyric.lock lacks a revision the graph reads from git or a source tree from git the build needs, holds one it does not read, or is missing although the program reads from git. Nothing is fetched or written.

Explanation

--locked takes the lock as it is: a build in CI should be built from exactly what was checked in, and a lock that would change is an error rather than a silent update. Without --locked, the build writes the lock to match the manifests.

Build once without --locked (or run lyric5 update) and check the new lyric.lock in with lyric.toml.

Example

$ cat lyric.toml
[package]
name = "app"
version = "0.1.0"

[dependencies]
geo = { git = "https://example.org/geo", tag = "v1.0.0" }
$ lyric5 build --locked
error[LYR-PKG0011]: 'geo' is read from https://example.org/geo at tag 'v1.0.0', which lyric.lock does not hold — --locked takes the lock as it is; a build without it writes the lock
  --> /home/ada/app/lyric.toml:6:1