type Source
import ezx@1.11.0.0/src/ledger/manifest.bend as Manifestimport Base
9# where a package's bytes come from. A hub package needs nothing else, though
10# one added by its `<name>@<version>` keeps it, which is what its import lines
11# say and what the hub named the hash by; a git one pins a commit, and
12# remembers the tag that was asked for so an upgrade knows what to
13# re-resolve. It also carries the two facts nothing can work out again
14# without the checkout: the directory inside it the package's paths are written
15# from, and the NAR hash nix rebuilds it by. They live here, in the file that is
16# committed, because a clone gets the ledger and not the vendoring cache.
17# `vend` is the committed tree: the package is allowlisted under `.ez/lib` and
18# an upgrade that moves it lays the new hash there. Absent, it is not.
19#
20# A member of the same workspace is the third kind (EZ-WS-5): a section with
21# `workspace = true` names the member whose `[package] name` is its key, and
22# records no hash and no source, because the member's package is a fact about
23# the committed tree. A member's own ledger reads it with an empty `path` and
24# `named`; the workspace's joint ledger (ws/joint.bend) fills in the member's
25# directory from the root, written as `path`, its hash, and, when the member
26# publishes under a name, the `<name>@<version>` it is imported by, written as
27# `hub`. No command writes those to a ledger a person keeps.
28type Source is Data:
29 Hub{named: String}
30 Git{url: String, rev: String, tag: String, root: String, nar: String, vend: Bool}
31 Member{path: String, named: String}