Lyricdev
GitHub

LYR-PKG0002

a manifest or lock field that is missing or malformed

error · spec 15-project

Reported when lyric.toml or lyric.lock parses as TOML but a field is missing, has the wrong type, or has a value of the wrong form: a package name or version, an edition, a dependency, a [[bin]] entry, a profile, [native], [trust], [lints], a toolchain pin, a locked revision, a source tree of [native.vendor] or an @name/ path that names none, a bindings entry — and a prebuilt file [native] names that is not part of the package or not there, or a URL's tree without its hash, when the build needs it.

Explanation

Every key of a manifest has a type and a form: name is a lowercase identifier, version a semantic version MAJOR.MINOR.PATCH, a dependency { path = "…" } or { git = "…", tag = "…" }, a [[bin]] entry a .lyr file under src/. A value of another type or form is refused rather than guessed at, so a manifest means one thing to every toolchain that reads it.

The message names the field and the form it takes. Write the field in that form.

A source tree loaded from a URL is pinned by its hash, the SHA-256 of the file: a URL without one is refused once the build has loaded it, and the message gives the hash to write — lyric add <name> --vendor --url <url> writes the line with it.

Wrong

//- lyric.toml
[package]
name = "app"
version = "1.0"
//- src/main.lyr
fn main(): void {
}
//- lyric.toml
[package]
name = "app"
version = "1.0.0"
//- src/main.lyr
fn main(): void {
}