Repository navigation
0.25.0
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 derivedX.Stateand an authored viewXStateboth want to beXState.
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 staysess/4, and a build older than this one refuses
a document that uses the key, becauseNamingisdeny_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
rustorweb. 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 goemitted 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 formX.Stateagainst an authoredXState.The refusal stays, because a collision an emitter silently repaired would be worse,
and it now names the remedy rather than only the symptom. -
gorepaired 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" — andallocate_declaredsweptir.types()first, where an
entity's derived state enum is filed alongside authored types.X.Statesorts before
XState, so the derived enum took the identifier and the author's declaration was
renamedXState_, 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
reservedXData,AnyXandx_statebut notXState, 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.