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
{{ message }}
Repository navigation
archtest: add the emitters layering rule before the first emitter package exists #973
Invariant 1 keeps emitters from importing compilers, and emitter-design §2 says the import-graph test enforces it. At c387e25c, internal/archtest's rules map has no entry for emitters or any package under it.
A first emitter package that imports compilers/openapi fails TestImportGraph_EveryPackageIsRuledOrExempt, because no rule reaches it. Nothing says which rule to add, though. With the entry "emitters/golang": {ir} or a parent "emitters": {ir}, TestImportGraph_LayeringHolds refuses the compiler import as it should. With an exempt entry, the import passes.
A rule for a directory that does not exist yet is skipped (internal/archtest/arch_test.go), so the entry can land now.
Direction
A proposal:
Add "emitters": {"ir"} now, and entries for the contract packages emitter-design §7 names (emitters/plan, policy, naming, manifest, verify) as each is created.
State in §7 that an emitter package never goes into exempt.
Done when a planted emitters/golang importing compilers/openapi fails TestImportGraph_LayeringHolds.
Activity