Every host compilation must see the standard library graph.
Corelib injection and resolution
Platform spec feature
Corelib injection and resolution
Spec standingStandard
-
Parser rejects noCorelib and useCorelib false.
Context
Decision
Rule Detail Forbidden keys noCorelib,useCorelib: falserejected at parseTemplates Scaffolds must not emit opt-out keys Consequences
Implicit injection in
resolve_dependenciesalways attaches corelib.Verification anchors
projects/parser.rs; template manifest tests. -
Corelib member packages must not implicit-back-link to aggregate.
Context
Shards under
packages/*would create cycles if they gained implicit host edges.Decision
Rule Detail Guard is_corelib_workspace_shard_manifestskips implicit back-edgeHost Only application hosts receive implicit corelib Consequences
Building
packages/runtimealone does not pull beskid_corelib as a hidden parent.Verification anchors
resolver.rs; corelib workspace compile tests. -
Compiler mods compile as carriers without host corelib rules.
Context
Mods are not end-user hosts; injecting corelib would distort mod graphs.
Decision
Rule Detail ModDoes not receive implicit host injection HostReceives implicit corelib per D-CORE-COMP-0005 Consequences
Mod SDK projects declare their own dependency closure.
Verification anchors
Mod project tests in
beskid_tests. -
CLI and LSP share corelib discovery and graph options.
Context
IDE analysis must match CLI compilation attachment.
Decision
Rule Detail CLI ensure_corelib_readybefore commandsLSP CompilationContext::try_for_analysis_path_with_graph_optionsConsequences
Diagnostic drift between CLI and LSP indicates a resolver bug.
Verification anchors
LSP workspace tests;
corelib/compile.rs.
- Contracts and edge cases Corelib injection guarantees and edge cases.
- Design model How the compiler injects and resolves the corelib package into host compilations.
- Examples Observable corelib injection scenarios.
- FAQ and troubleshooting Corelib injection and resolution FAQ.
- Flow and algorithm End-to-end flow for corelib injection during project graph resolution.
- Verification and traceability Tests and traceability for corelib injection and resolution.
0 revisions (git unavailable at build; counts may be empty)
No commits recorded for this path.
| Section id | Required | Found |
|---|---|---|
what-this-feature-specifies | yes | yes |
implementation-anchors | yes | yes |
Full tree: run pnpm verify:platform-spec-layout (writes src/generated/platform-spec-layout-report.json).
What this feature specifies
Corelib injection and resolution defines one operational contract that a newcomer can follow end-to-end: first the model, then execution flow, then strict guarantees, concrete examples, and verification guidance.
Implementation anchors
- Corelib integration tests in
compiler/crates/beskid_tests/src/projects/corelib/compile.rs - Corelib project helpers in
compiler/crates/beskid_tests/src/projects/corelib/mod.rs - Analysis services in
compiler/crates/beskid_analysis/src/services.rs - Resolution pipeline in
compiler/crates/beskid_analysis/src/resolve/mod.rs
Decisions
Section titled “Decisions”No open decisions. Closed choices are normative ADRs under adr/ (D-CORE-COMP-0005 … D-CORE-COMP-0008); use the reader ADRs tab for expandable detail.
Articles
- Host projects cannot opt out of corelibParser rejects noCorelib and useCorelib false.
- Contracts and edge casesCorelib injection guarantees and edge cases.
- Design modelHow the compiler injects and resolves the corelib package into host compilations.
- ExamplesObservable corelib injection scenarios.
- FAQ and troubleshootingCorelib injection and resolution FAQ.
- Flow and algorithmEnd-to-end flow for corelib injection during project graph resolution.
- Verification and traceabilityTests and traceability for corelib injection and resolution.