Home / Docs / Specification / 30. Packages and dependencies
30.3 Needs and sources
Release v0.4.0
needsnames the packages the package depends on.- The requirement is a version of two or three parts, the least version that the need admits:
json 2.1admits2.1.0and later on the linejson 2,json 0.3admits0.3.0and later on the linejson 0.3. A pre-release follows a full version. It is required, except withfrom pathandfrom workspace, where it MUST NOT be written: the dependency's ownversionis used. - The local name is the
asname, or the last segment of the package's name. Two needs with one local name are U7008. A local name, and the last segment of the name of any package, MUST NOT be a reserved name or have the skeleton of one (U7008).- The reserved names are the keywords and reserved words of spec/01 §5 of every edition,
std,prelude,una,ita,itaty,itaoca,itauna,path,git,workspace, and the host capabilities' names in lower case:console,clock,env,files,keys,http. - A name's skeleton removes
_, maps0too;1anditol;2toz;3toe;4toa;5tos;7tot;8tob;9tog; thenrntomandvvtow, and collapses each run of one letter. Sostd_ands7dare refused asstdis.
- The reserved names are the keywords and reserved words of spec/01 §5 of every edition,
fromgives the origin:itaty, the default, predeclared; a source ofsources;path "<dir>", a directory relative to the package; orworkspace. Any other source is U7008, and there are no git dependencies.maylines write the ceiling that the package grants the dependency at its calls (ADR 0093 rule 1). An operation named twice, or a capability named twice in one ceiling, is U7008.avoidlines name full versions that resolution never selects.accept nameis written only under a path need (U7008 otherwise).- One identity once. A package needed twice on one major line from one source is U7008.
- The requirement is a version of two or three parts, the least version that the need admits:
sourcesdeclares a registry other thanitaty: its name, itshttps://base URL, the digest of its root metadata,sha256:and 64 lowercase hexadecimal digits, and the owners it serves. A source's name is notitaty,path,gitorworkspace; two sources with one name, or two sources that list one owner, are U7008. A need of a name whose owner a source lists names that source withfrom(U7008 otherwise), so a private owner's package never resolves at another registry.replacetakes every package of a name at a full version from another origin;trustconsents to a dependency's trusted modules by identity: its name, its major line (2, or0.3for the line0.3), and its source. The major line and the source may be left out only for a package the root needs directly (U7008 otherwise); they are then those of that need (§13).- What this release loads. Path dependencies, by §12, and the releases of the sources of
sourcesthat the lock pins and that load verified, by §14 rule 10. A need ofitaty, whose root metadata is not built into this release, or of a workspace member is refused, U7008 at the need, so no import reaches a package that is not checked with the program.una itareports a need ofitatyas U7013 (§10 rule 7).