Sibling articles under this feature previously restated requirements in inconsistent forms.
Program assembly - Contracts and edge cases
Platform spec article
Program assembly - Contracts and edge cases
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).
- Materialized-first — When
PreparedProjectWorkspaceexists, assembly roots must usematerialized_source_rootand dependencymaterialized_source_rootentries, not pre-copy project trees. - Lockfile fallback (LSP) — When materialization did not run,
Project.lockmaterialized_rootpaths may be used when directories exist. max_units— Workspace scan must stop at the cap and report deterministically sorted paths.- No diagnostic filtering — Cross-module symbols must be visible to resolution; hosts must not drop E1105/E1201/E1301 solely because a path exists on disk.
usealias resolution — Import aliases must expand to prefetched module paths before value/type lookup; binding auseitem as a callable namespace is forbidden (contract-as-namespace remains the only in-scope dotted-path fallback).- Mod rounds — After generator output changes imports, the host may re-run assembly within
maxGeneratorRounds.