Skip to content

0.25.0

Choose a tag to compare

@github-actions github-actions released this 16 Sep 07:42
· 2566 commits to main since this release

Added

  • naming: { code: … } names the identifier a code emitter spells a declaration as. A
    target with no dotted type names flattens a qualified name to one identifier, so an
    entity's derived X.State and an authored view XState both want to be XState.
    One of them has to move, and this is the author saying which — because the author
    knows which name carries meaning and an emitter does not. Optional and serialising
    out when unset, so every document that does not use it compiles to the bytes it
    always did; the source format stays ess/4, and a build older than this one refuses
    a document that uses the key, because Naming is deny_unknown_fields. Only code
    emitters read it: wire names, document schemas and the qualified name are untouched,
    so setting one cannot break a deployed consumer.

Fixed

  • A legal specification could not be emitted for rust or web. Since 0.19.0, which
    added the workspace feasibility check, an authored declaration whose flattened
    identifier equals a derived one refused the entire workspace — including a view
    named for the entity whose lifecycle it projects, which is an ordinary thing to
    write. --target go emitted the same workspace, so the model was legal, compiled,
    and unemittable by two of three targets. Measured on a released model: five
    collisions, all of the form X.State against an authored XState.

    The refusal stays, because a collision an emitter silently repaired would be worse,
    and it now names the remedy rather than only the symptom.

  • go repaired that collision backwards. allocate_names' own doc comment states the
    rule — "a declared type's name comes from the specification and a derived one is this
    emitter's to move" — and allocate_declared swept ir.types() first, where an
    entity's derived state enum is filed alongside authored types. X.State sorts before
    XState, so the derived enum took the identifier and the author's declaration was
    renamed XState_, silently, with no test covering it. Authored names are now reserved
    before derived ones.

  • rust's entity-snapshot allocation did not reserve the lifecycle enum's name. It
    reserved XData, AnyX and x_state but not XState, so a snapshot fallback was
    free to choose a name the state enum already held. Found while fixing the above; no
    committed specification reaches it.

    No generated bytes change for any specification that does not collide.