Design 47 H2: H-A-517 to H-A-529, a module's fingerprint over the packages it imports
This commit is contained in:
@@ -1579,3 +1579,42 @@ The lead's one-line answers to the questions H2's develop and review raise (impl
|
||||
one of the artifact's packages holds a TypeScript file, by the same test its lint uses, and the seat's verb
|
||||
description says so in place of "lint always". The Go build seat's lint stays always (a Go package always holds Go
|
||||
files). Principle 3 (failure is loud): a verb that says what a step will do says what it really does.
|
||||
- **H-A-517 to H-A-529 (a module's fingerprint over the packages it imports: the open questions of its specification, 10:24)**
|
||||
23 Nov 10:24: the operator asked to start the fix that ends the cascade in which one shared package's release moves about
|
||||
a hundred modules whose code did not change (main.416: 105 movers). The part is ADR 0593 §2 to §5 (§2 as ADR 0606 and
|
||||
ADR 0617 change it); its specification left thirteen questions. Each is answered by the principle named.
|
||||
- **H-A-517 (Q1, the carrier):** the build module says the import set as an event of its own build seat,
|
||||
`imports-reported`, at the end of every trunk build of a module: the module, its fingerprint and commit, and the
|
||||
mesh packages its programs import (the import closure without tests), each by its import path. The indexer hears it
|
||||
and keeps it. Principle 1 (an event, never a read of another part's state) and principle 12 (the build module says
|
||||
what only it knows).
|
||||
- **H-A-518 (Q2):** the indexer keeps one import set per module, the union over its programs; no set per artifact is
|
||||
kept. Principle 10 (the module is the unit) and principle 7.
|
||||
- **H-A-519 (Q3):** the import set is the one the main branch's last build reported; a watched branch's fingerprint
|
||||
uses it too. Principle 7: one set, until a branch needs its own.
|
||||
- **H-A-520 (Q4):** the take-in recomputes the fingerprint of every module, in any repository, whose import set holds
|
||||
a package the change touches, and writes it into the catalog revision, so that module is a mover with a new
|
||||
fingerprint and is built again. A-476 (c) is amended for this. Principle 3: a mover served its old build is a
|
||||
silent failure.
|
||||
- **H-A-521 (Q5, Q6):** a fingerprint takes a package by content only, never by its version. An importer moves once,
|
||||
at the take-in that changes a package it imports, and builds after that package's `package-published` in the same
|
||||
pipeline; no move follows `version-released`, and G §571's reuse key takes the package digests the fingerprint
|
||||
takes, not versions. Principle 7 (one move, no second revision) and principle 3.
|
||||
- **H-A-522 (Q7):** the catalog graph's edge kind 1 comes from the same reported import set; the manifest's
|
||||
`packages` serves only until a set is reported. Principle 7: one source.
|
||||
- **H-A-523 (Q8):** a TypeScript module's fingerprint takes its imported mesh packages by content too, from the import
|
||||
set its build module reports. Principle 5 (everything ships the same way).
|
||||
- **H-A-524 (Q9):** a package's digest takes every file in its directory the build reads (embedded, generated and
|
||||
non-Go files included), and leaves out test files and sub-directories. Principle 3.
|
||||
- **H-A-525 (Q10):** the fingerprint takes the go.mod and go.sum of the importer's own Go module and of each mesh Go
|
||||
module that holds an imported package. Principle 3: a changed requirement changes what is compiled.
|
||||
- **H-A-526 (Q11):** the indexer's state of the latest published versions and package digests is read by no other
|
||||
part; whatever another part still needs from it is asked through a verb of `mesh-catalog`, and a reader the gap
|
||||
survey finds moves to that verb. Principle 1 and principle 12.
|
||||
- **H-A-527 (Q12):** the indexer keeps per module the reported import set with each package's digest at the reporting
|
||||
build, in a state of its own, and a tool reads it for one module. Principle 2 and principle 4.
|
||||
- **H-A-528 (Q13):** a module with no reported import set moves by the fallback that exists (H1's reading of its
|
||||
requirements), never stale, until its first report. Principle 7: no new path.
|
||||
- **H-A-529 (the first report):** by ADR 0593 §4 a module's import-form fingerprint is written only at the first
|
||||
recompute where one of its own inputs or imported packages differs from the reporting build's, so the form costs no
|
||||
rebuild of its own. Principle 7.
|
||||
|
||||
Reference in New Issue
Block a user