Lyricdev
GitHub

LYR-PKG0007

a git dependency or a source tree cannot be read

error · spec 15-project

Reported when the repository of a dependency or of a source tree cannot be cloned or fetched, when a source tree's URL cannot be loaded, when git is not on the PATH, or when under --offline the user's cache does not hold the revision or the file. The exit code is 2: the environment failed, not the manifest.

Explanation

Packages from git are read through the user's cache (~/.cache/lyric/git on Linux): fetched when the cache lacks the revision, read from it otherwise. The source trees of [native.vendor] are read the same way — a tree from git like a package, a tree from a URL as a file kept under its hash (~/.cache/lyric/vendor) — and only by a build whose target needs them. When git cannot reach the repository, or is not installed, or the URL does not answer, or --offline forbids the fetch the build needs, there is nothing to read.

The message quotes git's, or the server's, own first line. Check the URL and the network, install git, or build once without --offline to fill the cache.

Example

$ lyric5 build
error[LYR-PKG0007]: 'geo' cannot be read from file:///nowhere/geo: fatal: '/nowhere/geo' does not appear to be a git repository
  --> /home/ada/app/lyric.toml:6:1
$ lyric5 build --offline
error[LYR-PKG0007]: 'geo' is read from https://example.org/geo at tag 'v1.0.0', which the cache does not hold, and --offline fetches nothing
  --> /home/ada/app/lyric.toml:6:1