Files
faumaray ca04975d54 bootstrap
Signed-off-by: faumaray <faumaray@gmail.com>
2026-11-25 02:11:19 +03:00

3.2 KiB

11 — Named modules, partitions, header units and artifact ownership

Status: PLANNED; no implementation claim Requirements: R-008,R-010,R-012,R-021 Dependencies: 05,06/07,08,09,10; generated prerequisites depend on VBS availability.

Ownership and boundaries

Proposed Astra: NEW include/vls/modules/, src/modules/, tests/modules/. Root serializes module graph schema; no writes to VBS-produced artifacts. Future assignments must verify the then-current baseline and exact disjoint paths; these proposed scopes do not authorize work in another repository.

Contracts and data flow

ModuleGraph contains provider/import edges, unit kind, owning compile context, source/generated identity and scan provenance. Artifact keys include exact frontend/toolchain/stdlib, flags/macros, transitive content, backend version and relevant physical paths. Private IDE BMIs/PCHs are never assumed binary-compatible with project artifacts.

Implementation sequence

  1. Use the accepted compiler's dependency scanner/semantic APIs, with native VBS topology as additional context. Model primary interfaces, implementation units, exported/internal partitions and explicit header units.
  2. Order generated inputs and module prerequisites before analysis. Missing generators remain unready until an explicit build action; private compiler cache generation follows approved metadata/tool authority.
  3. Construct overlay-aware dependency snapshots and invalidate transitively when an unsaved interface/header/context changes, including new providers and previously absent/shadowing includes.
  4. Publish complete artifacts atomically into private cache generations, retain readers' referenced artifacts and enforce cycle/duplicate-provider diagnosis. Test imported std modules only for a proven exact toolchain configuration.

Failure behavior and constraints

Report missing, cyclic or ambiguous providers and incompatible artifacts explicitly. A filename/mtime or compiler-family label does not establish validity. Do not load GCC CMI into Clang or relocate opaque path-sensitive artifacts on faith. Cancellation withholds publication.

Acceptance scenarios

  1. Cover interfaces, implementations, both partition kinds, header units, private/global fragments and import visibility with positive/negative semantic queries.
  2. Edit an imported unsaved module, delete/add providers, switch macros/toolchains and verify importer invalidation and current diagnostics.
  3. Test missing generated source/header, duplicate/cyclic providers, corrupt cache, reverse completion and eviction while old readers remain active.

Verification and integration

Proposed NEW CTest label: modules. Once implemented, register a nonzero suite and run:

dev cpp-gcc -c ctest --test-dir build/bootstrap -L modules --output-on-failure

This future command is not evidence that the label/tests exist now. Before dispatch, bind the fixtures above to actual targets and record prerequisites/side effects. Require fresh independent review of the implemented contract and affected integrations. Quarantine incompatible cache generations and rebuild without altering project-produced artifacts. Preserve known source/module graph diagnostics; never fall back to regex-derived authoritative semantics.