def naming.go

ezx@1.11.0.0 · src/pub/plan.bend:225

import ezx@1.11.0.0/src/pub/plan.bend as Plan
import Base
import ezx@1.11.0.0/src/pkg/pkg.bend as K

225# which of the two keys the ledger gives. Neither is a publish by hash, as
226# before the keys existed; one without the other is refused rather than
227# guessed at, as `cargo publish` refuses a package with no version.
228def naming.go(noname: Bool, nover: Bool, +pa: String, +pv: String) -> Named:
229  match noname:
230    case True{}:
231      match nover:
232        case True{}:
233          ByHash{}
234        case False{}:
235          Unnamed{why.noname(pv)}
236    case False{}:
237      match nover:
238        case True{}:
239          Unnamed{why.nover(pa)}
240        case False{}:
241          naming.both(K.name.part(pa), semver(pv), pa, pv)

Uses (8)

Used by (1)