Skip to content
Beskid Platform specification

Beskid

Jump to a Beskid service

Beskid

Jump to a Beskid service

Corelib prelude is Tier 1 only

Platform spec ADR

Corelib prelude is Tier 1 only

Spec standingStandard

Owner
Piotr Mikstacki
Submitter
Piotr Mikstacki

Every Beskid project gets the corelib prelude injected by default (see Corelib injection and resolution). Adding a module to the prelude makes it transitively visible to all downstream code. Including Tier 2 / Tier 3 modules in the prelude would expose unstable surfaces by default and violate the tier compatibility table.

RuleDetail
Membership rulecompiler/corelib/beskid_corelib/src/Prelude.bd must re-export only modules whose declarations resolve to standard
Enforcementcompiler/crates/beskid_tests/src/projects/corelib/layout.rs::corelib_prelude_only_re_exports_tier1_modules cross-checks every pub mod ...; line in Prelude.bd against the resolved per-module tier
Promotion pathPromoting a Tier 2 module to Tier 1 requires (a) updating the directive to @tier(standard) on the module’s package source and (b) adding a row to the hub’s ## Decisions section pointing at this ADR or a new follow-up ADR
Demotion pathDemoting a Tier 1 prelude item requires a normative ADR under adr/ and a compatibility alias for at least one minor release
  • The prelude stays small and predictable: only a vetted surface ships transitively.
  • Tier 2 / Tier 3 modules remain reachable via explicit use System.FS; (etc.); no expressivity lost.
  • CI catches accidental prelude growth before merge, keeping the v0.3 → v1.0 compatibility budget intact.
  • compiler/corelib/beskid_corelib/src/Prelude.bd
  • compiler/crates/beskid_tests/src/projects/corelib/layout.rs::corelib_prelude_only_re_exports_tier1_modules
  • compiler/crates/beskid_tests/src/projects/corelib/compile.rs::checked_in_corelib_prelude_exports_mvp_modules