Sibling articles under this feature previously restated requirements in inconsistent forms.
Workspace resolution contract - Design model
Platform spec article
Workspace resolution contract - Design model
Spec standingStandard
-
This feature hub owns normative MUST/SHOULD contract text for Workspace resolution contract.
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/resolution-and-projects/workspace-resolution-contract/index.mdxarticle bundle under the same feature directory.
-
Platform-spec text supersedes informal crate comments for Workspace resolution contract.
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 explains how the compiler discovers `Project.proj`, builds a project graph, and hands resolved workspac
Context
This feature hub explains how the compiler discovers
Project.proj, builds a project graph, and hands resolved workspace inputs to compile and dependency commands.Modprojects are included in the graph like other project kinds; after resolution, the mod host registers them for event-driven orchestration per Project manifest contract and Compiler Mods.Decision
The reference compiler must implement Workspace resolution contract 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/
- Workspace resolution contract - Contracts and edge cases Normative guarantees and failure behavior for manifests, graph resolution, and root selection.
- Workspace resolution contract - Design model Actors, data model, and boundaries for project/workspace discovery in compiler services.
- Workspace resolution contract - Examples Practical examples of manifest graph resolution and target path selection.
- Workspace resolution contract - FAQ and troubleshooting Common newcomer questions for project graph resolution, manifests, and lock behavior.
- Workspace resolution contract - Flow and algorithm End-to-end algorithm from manifest discovery to resolved compile input.
- Workspace resolution contract - Verification and traceability Tests and source anchors used to validate project graph and workspace resolution behavior.
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).
The resolution model has four core objects: CompilePlan (target + dependency plan), PreparedProjectWorkspace (materialized source roots and lockfile state), resolved source input (source_path, source) used by compile commands, and ProgramAssembly (multi-module units + ModuleIndex built from effective roots — see Program assembly).
beskid_analysis::projects owns graph building and manifest semantics; CLI commands and LSP integrations consume this model and should not reimplement manifest traversal rules.
Mod projects in the graph
Section titled “Mod projects in the graph”Mod projects appear as graph nodes with type = Mod. Resolution must:
- Include all transitive
Moddependencies of the active host compilation in the resolved dependency graph. - Never treat
Modas the default compile target forbeskid build/beskid run; host builds resolve App/Lib/Test targets while still loading mod artifacts from dependencies. - Expose the same graph slice to LSP and CLI so mod scheduling decisions match across surfaces.
Scope narrowing for which host compilation units a mod affects is owned by Collector contracts at execution time, not by manifest attach metadata.
Mod artifact resolution
Section titled “Mod artifact resolution”When a Mod node is discovered:
- Resolve package source (workspace path or registry materialization).
- Check artifact hash against cached AOT output.
- Rebuild when hash changes (eager incremental check) or when
beskid mod rebuildis invoked.
Errors in mod artifact load/bootstrap use the E1821–E1835 band (Diagnostic code registry, AOT artifact contract).