Expand description
API versioning: one @version enum, @added/@removed lifecycle annotations
and per-version HIR projection.
Phase 1 is deliberately small. A specification is versioned by marking one
enum with @version; its members, in declaration order, are the version
history. @added(Versions::v1) and @removed(Versions::v2) mark when a
declaration exists; annotation order never matters. Renames are expressed by
declaring a new member with a disjoint interval plus @rename, exactly like
the desugaring versioned idl -> multi idl describes.
Projection is a pure HIR rewrite: each version is wrapped in
module <version-ident> { ... }, lifecycle annotations and the version enum
are removed, and the document version pragma carries the version value. The
merged form keeps one module per selected version so generators can stay
version-free.
Structs§
- Version
Def - One member of the API version enum.
- Version
Id - Position of a version inside the declaration order of the
@versionenum. - Version
Timeline - Ordered API version history declared by the
@versionenum. - Versioned
Projection - One HIR projection produced from a specification.
- Versioning
Record - Result of analysing the API versioning annotations of a specification.
Enums§
- Versioning
Error - Diagnostics raised while analysing or projecting API versioning annotations.
Constants§
- API_
VERSIONS_ PROPERTY - Generation property that selects several API versions (comma separated, or
*). - API_
VERSION_ MODULES_ PROPERTY - Generation property that lists the API version modules of a projection.
- API_
VERSION_ PROPERTY - Generation property that selects one API version by member ident or value.
- LAYOUT_
MERGED - Layout value: one specification holding one module per version.
- LAYOUT_
PER_ VERSION - Layout value: one projection per version.
- VERSION_
LAYOUT_ PROPERTY - Generation property that selects the version output layout.