Sibling articles under this feature previously restated requirements in inconsistent forms.
Program assembly - Flow and algorithm
Platform spec article
Program assembly - Flow and algorithm
Spec standingStandard
-
This feature hub owns normative MUST/SHOULD contract text for Program assembly.
Context
Decision
This feature hub owns normative MUST/SHOULD contract text. Sibling articles must not redefine hub requirements and should link here for authority.
Consequences
Contract changes start on the hub or in linked ADRs, then propagate to articles and implementation anchors.
Verification anchors
site/website/src/content/docs/platform-spec/compiler/build-pipeline/program-assembly/index.mdxarticle bundle under the same feature directory.
-
Platform-spec text supersedes informal crate comments for Program assembly.
Context
Implementation crates accumulated informal notes that diverged from published contracts.
Decision
Normative platform-spec prose and ADRs under this feature supersede informal comments in implementation crates until explicitly migrated into spec text.
Consequences
Engineers file spec/ADR updates when behavior changes; crate comments are non-authoritative for conformance arguments.
Verification anchors
compiler/crates/beskid_analysis/
-
This feature hub defines how the reference compiler turns a resolved **`CompilePlan`** plus **effective (materialized-fi
Context
This feature hub defines how the reference compiler turns a resolved
CompilePlanplus effective (materialized-first) source roots into aProgramAssembly: discovered.bdunits, a sharedModuleIndexfor cross-module resolution, and a single front-end spine consumed by CLI, LSP, analyze, and codegen. JIT and AOT backends consumeCodegenArtifactonly and do not re-run assembly.Decision
The reference compiler must implement Program assembly as documented in this feature hub and its article bundle.
Consequences
Changes require hub/ADR updates and verification anchor extensions.
Verification anchors
compiler/crates/beskid_analysis/
- Program assembly - Contracts and edge cases Materialized-first roots, discovery caps, and parity across CLI and LSP.
- Program assembly - Design model EffectiveCompilationRoots, ProgramAssembly, ModuleIndex, and hybrid discovery modes.
- Program assembly - Flow and algorithm Ordered assembly after workspace materialize and before multi-unit parse and HIR resolution.
- Program assembly - Verification and traceability Test and source anchors for ProgramAssembly and effective roots.
0 revisions (git unavailable at build; counts may be empty)
No commits recorded for this path.
Full tree: run pnpm verify:platform-spec-layout (writes src/generated/platform-spec-layout-report.json).
- Build
EffectiveCompilationRootsfromCompilePlan+ optionalPreparedProjectWorkspace(or lockfile replay for LSP). - Emit pipeline phase
program.assemble(afterworkspace.materializewhen present). - Discover source paths per
AssemblyOptions.discovery. - Parse each unit; build
ModuleIndexby collection-only resolver passes on non-entry units. - Hand entry
SourceUnitandModuleIndexto the shared front-end spine (mod host → semantic → HIR resolve/type on entry with prefetch index). - Lower to
CodegenArtifactfor JIT/AOT consumers.
Workspace resolution step 1 output must feed stage-ordering step 6 (HIR/resolution) through ModuleIndex, not only semantic rules on the entry file.