You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is opam-monorepo so powerful that it can create a lockfile that it can't pull? Turns out, yes :/
$ cat src.opam
opam-version: "2.0"
depends: ["lwt"]
x-opam-monorepo-opam-provided: ["lwt"]
$ opam monorepo lock
==> Using 1 locally scanned package as the target.
==> Found 16 opam dependencies for the target package.
==> Querying opam database for their metadata and Dune compatibility.
==> Calculating exact pins for each of them.
==> Wrote lockfile with 0 entries to src.opam.locked. You can now run opam monorepo pull to fetch their sources.
$ opam monorepo pull
==> Using lockfile src.opam.locked
opam-monorepo: [ERROR] Missing x-opam-monorepo-duniverse-dirs field in opam-monorepo lockfile /tmp/bug/src.opam.locked
The reason is that the lockfile does not, indeed, contain this field.
After a light investigation, it seems that it's due to how the opam libs render empty lists:
So from the point of view of opam-monorepo, I think that it's necessary to handle the absence of this field as equivalent to an empty list. A special empty value is possible too I guess but since lockfiles are versioned I don't think there can be a confusion between "no field" and "an empty list".
The text was updated successfully, but these errors were encountered:
Is opam-monorepo so powerful that it can create a lockfile that it can't pull? Turns out, yes :/
The reason is that the lockfile does not, indeed, contain this field.
After a light investigation, it seems that it's due to how the opam libs render empty lists:
So from the point of view of
opam-monorepo
, I think that it's necessary to handle the absence of this field as equivalent to an empty list. A special empty value is possible too I guess but since lockfiles are versioned I don't think there can be a confusion between "no field" and "an empty list".The text was updated successfully, but these errors were encountered: