Skip to content

0.70.0

Choose a tag to compare

@b10x-bot b10x-bot released this 26 Oct 21:44
· 502 commits to main since this release
077e4ee

Named rows beside a row set, state wire spellings, and replays that no longer stop with InvalidReplay.
8 added, 3 changed (1 breaking), 9 fixed.

Breaking

  • Breaking for generated code of a variant that declares code:: a variant's code:, {name: call.started, code: Begun}, names its identifier in the code ess generate synthesize generates for Rust, Web and Go, as a declaration's naming: {code: …} does, while the wire value stays call.started (#662). It validated before and every target ignored it, though the Rust collision refusal named it as the remedy. A model that declares code: on a variant sees that variant's generated identifier move to the one it wrote. A written code the target cannot use is refused as invalid-identifier where it is written, and the refusal names the code: Self on Rust and Web, and on Go any code that is not an exported identifier, such as begun or type. Go holds a declaration's naming: {code: …} to the same rule; before, it emitted such a code verbatim into a module that did not compile.

Changed

  • From format: ess/32 one command may guard on rows its input names, when_related: {via: input.<field>, exists: false | predicate: …}, beside a row-set guard, when_related: {entity, where, exists | count | forall}, as an adopter asked (#554): "connect two ports that exist and face the right way, unless a wire already leaves the source" is one command. The one precedence rule answers a missing named row first, in declaration order, then every refusal over a present named row or a row set in declaration order, then the accepting branches; the interpreter follows it, synthesis witnesses each branch it can arrange on rows the declared commands create and names the branch it cannot, as ESS-SYNTH-001 does, and generated Rust and Go keep such a command an obligation, named. Below ess/32 the pair keeps its unsupported_construct, its message unchanged and its hint naming ess/32; a when_subject guard beside a row set keeps it at every format.
  • From format: ess/32 a struct may declare no fields, fields: [], as an adopter asked (#649). Open (undeclared_fields: ignored), any object is a value and the schemas admit any member; closed, only {} is, and TypeScript realizes it as Record<string, never>. The generated Rust decoder refuses a value that is no object, as the Go decoder does. Below ess/32 an empty struct keeps ESS-TYPE-007, its message unchanged and its hint naming ess/32. An enum or a union with no variants is still refused at every format.
  • From format: ess/32 a lifecycle state may declare its wire spelling, states: [{name: Indexing, wire: indexing}, Ready], as two adopters asked (#639). JSON Schema, OpenAPI, AsyncAPI and the generated Rust, Go and TypeScript spell the state indexing and refuse Indexing; guards, transitions and conformance suites keep the declared name. Two states spelled alike are refused as conflicting_declaration. Below ess/32 the mapping is refused as unsupported_format_version naming ess/32 at the state, where it was a whole-file invalid type: map. ess verify diff reports a changed spelling as VariantWireNameChanged on <Entity>.State, and Entity Runtime lowering refuses a spelled state as StateWireNameUnsupported. A view ordered by a respelled state keeps its generated query an obligation, as one ordered by a respelled enum does.
  • The synthesized Rust server's wire module decodes published events, as an adopter asked. decode_system_event reads the envelope encode_system_event writes, {"event": …, "payload": {…}}, back into the system's SystemEvent. Each event gets its own decode_event_<name>, which reads every payload field under its declared wire name and refuses a payload that is not an object. An envelope naming an event the system does not publish is refused, and the refusal names that event. The web bridge's wire module gains the same per-event decoders. Existing functions keep their signatures.
  • The synthesized Rust server's surface modules gain dispatch_with_events and handle_with_events, as an adopter asked. Each answers what dispatch and handle answer and also returns every typed event published while the call ran, in log order: the command's own events, what its bindings published in turn, and what a held-back delivery retried during the call published. Events already on the system's log when the call started are not the call's and are not returned. A call refused before the command runs returns an empty list. dispatch, handle and serve keep their signatures and answer the same bytes. The Go server has no public dispatch or codecs and is unchanged.
  • ess-conformance makes the interpreted target's minting and view ordering public, as an adopter asked, in a new module interpret::values. mint(ir, type, tick) answers the value the interpreter mints for that type on the scenario counter's tick-th draw, counting from 1, and None for an Optional type. order_view_rows(ir, view, rows) sorts rows into the order the interpreter answers that view in; rows tied on every order_by key keep the caller's order. The interpreter calls these two functions itself, so a renderer or preview that calls them shows the identifiers and row order the interpreter does, without a copy that drifts. Both answer the interpreter's own choice, not a rule of the specification, and may change in a later release.
  • ess generate types takes --check, as the other generating commands do, as an adopter asked (#654). With the arguments that wrote a library and its --out, it compares the files the command would write with what --out holds and writes nothing: it exits 0 when the library is current and 1 with one line per file that is missing, differs, or is recorded in .ess-output and no longer generated, each naming ess generate types. A copy of the library at another path checks clean, and a file .ess-output does not record is not drift. --check requires --out.
  • 12 more in the changelog.

Every change: CHANGELOG.md § 0.70.0

Adopter replay (reported by the adopters, not verified by ess)

  • on integrate/ess-0700 8a4fdbe built locally, a 9-domain adopter specification gives 1105 scenarios / 41 refusals at ess/25, ess/31 and ess/32, where 0.69.2 stopped with InvalidReplay at ess/31. The 41 refusals have the causes reported before (filed as 0.71.0 stories).
  • on integrate/ess-0700 8a4fdbe built locally, a second adopter specification goes from 42 scenarios / 7 refusals to 46 / 3; the 4 Decimal wrong-state refusals are gone.