Repository navigation
This release adds GES schemas (.gess) with exact bit-level encoding, deltas and
generated C# and Swift code, GES documents (.gesd), the Bytes type, the shared
Syntax module and the Generator package, and gives the C# and Swift ports the same
public names and byte-identical compiler output.
Breaking
-
Line breaks inside any parentheses or square brackets separate nothing, so parameter lists, selectors such as
[:take highest⏎1]and parenthesized expressions may span lines in both ports; inside braces they separate
statements as before. -
The Swift parser rejects what the C# reference rejects: an operator tighter than the type operation after
as,is
orhas value(a as :Number + 1), a second superscript or^after a power (a²²,a² ^ b),:Numericas a
type,5%abcand90°x,rollwithoutdice, and a dice count on the next line. Calls and lists count the
nesting of their arguments and items, so deeply nested chains reportparse.sourceNestingExceededinstead of
exhausting the stack. -
Program segment and section types (
GesStringConstantSegment,GesCodeSegment,GesSourceMapSegmentand the
others) have no public constructors and theirSliceEntryvalues no public setters; Programs come only from the
Compiler and the Reader. Swift keeps those initializers behind@_spi(Compiler). -
Program validation rejects binding argument names with a
_numbersuffix and a second Record binding of the same name
or a Record binding without an ID (InvalidProgram). A message-name handler records the labelmessagewhatever its
source binding is called. -
The new runtime limit
MaxValueDepth(default 64) stops a handler that nests Lists, Maps, Records or Messages more
than 64 levels deep, which could otherwise overflow the native stack when the value was converted, compared or
released. Raise it inGesRuntimeLimitswhere deeper values are needed. -
:contains anyand:contains allwith a Range of candidates,has any/has allover a binary64 Range and
starts with/ends withbetween two Ranges chargeMaxLoopIterationsfor every Range item they visit, and
shuffling a Range longer thanMaxRangeItemsreports that limit and gives an empty List, asas :Listdoes. -
An external type's constructor parameter or field declared as a plain Number (
Floatwithout a unit) keeps a
Quantity's unit instead of dropping it, as an unconstrained Point or Vector already did:5mstays5mas binary64.
Declare a unit to convert, or convert the value in the host. -
Swift
[UInt8]converts to and from GES Bytes instead of a List of numbers. -
Text such as
"0x10"is now a hexadecimal number forparse,as :Number,as :Percentage,
documents and Message JSON instead of Text ornothing. -
C#
GesValue.AsMap()returns only stored Map and Record data, as in Swift; an external
value givesnull.MaterializedMap()reads its fields. -
:Vector(value)and:Point(value)with one positional argument are now the cast,
so:Vector([1, 2])is 1, 2, 0 instead ofnothingand:Vector(:Dice[6, 3])is
6, 3, 0 instead of 9, 0, 0. -
:Messagerejects the labelsvalueandtagsin source; usewith. -
The literal
nothingand a constant with that value are no tags: this is the new
validate.invalidTag, and a tag value that isnothingat runtime makes the tag
clause invalid instead of adding#nothing. -
A send with an invalid tag clause sends nothing and continues; a result-bearing send
is false. A statement send used to end the handler, in C# always and in Swift for a
Message value. -
Message names start uppercase:
initializationandundeliverableare entry points
only the host uses.parseand documents no longer recognize
:Message(initialization())and:Handler(undeliverable()), and in source a lowercase
name is a variable or a call of a function or predicate.GameEventScriptMessage.Create
andFromJsonreject those names,CreateMessagereturns nothing for them, and
loading a Program with such an outbound binding or message shape fails. -
A labeled
:Rangeneedsfromandto, so:Range(from: 1)is an error. -
value as :Recordisvalidate.invalidTypeConstructorinstead of a compiler failure
withdecode.invalidOperand. -
Handlers print a space after each comma:
:Handler(Done(value, _)). -
Labeled Vector and Point components must be a run without gaps:
:Vector(x: 1, z: 2)isvalidate.invalidTypeConstructorin source, stays Text
forparseand isdocument.invalidLiteralin documents. The literalstrue
andfalseare no components either, though a Boolean variable counts as 0 or 1.
ConstructDatano longer acceptsvectorandpoint.CreateVectorand
CreatePointuseImmediateX3 for labeledx, which never lifts; values above
3 fail validation. Recompile.gesbfiles to get the:Vector(x: v, y: 3)fix. -
A bare name without a visible binding of its own source is now the
validation diagnosticvalidate.unresolvedVariableat the name, reported for
every such name, instead of the firstcompile.unresolvedSymbolof lowering.
The Syntax module reports it too, so editors see it while typing.
$constants, calls, extension calls and inline-assembly operands are not
affected; an unknown$constantremainscompile.unresolvedSymbol. -
Validation reports the rules of each source on its own first, source by source
and in source order of their positions: spelling of names and labels,
repeated parameters, arguments, fields and bindings, shadowing, system
endpoint forms and removed type names. The program-wide rules follow. A
program with errors of both kinds therefore lists its diagnostics in a new
order; their codes and positions are unchanged. -
The optional highlighter packages are renamed to the Syntax module, which
will hold the shared lexer, parser and syntax tree: NuGet
GameEventScript.SyntaxHighlighterbecomesGameEventScript.Syntax(namespace
GameEventScript.Syntax), and the SwiftPM product and module
GameEventScriptSyntaxHighlighterbecomeGameEventScriptSyntax. Type names
such asGesSyntaxHighlighterare unchanged. Migrate by replacing the package
reference and theusing/import. -
Highlighting is derived from the lossless syntax tree instead of the bundled
TextMate grammars, in both ports. Spans carry a category and the diagnostics
overlapping them, andGesHighlightResult.Diagnostics/diagnosticslists the
document's syntax errors or, without those, its violated single-source rules
as newGesHighlightDiagnosticvalues with UTF-16 ranges. The line API
(HighlightLine/highlightLine),GesHighlightState,NextState/nextState,
CreateState/makeStateand the TextMateScopes/scopesare removed;
highlight the whole document after an edit and theme byKind/kind. Swift
GesHighlightingErrorlosesexpectedSingleLineandincompatibleState. Some
categories become more precise: function and predicate names are Function,
contextual keywords such asbetween,fromorascendingare Keyword,
brackets and braces are Symbol, extension names are Builtin, and GESA label
definitions are Label. Input with statements outside a handler, as console
input has, keeps its statement categories. The Swift module no longer imports
Foundation, andscripts/sync-highlighter-grammars.pyis removed; the TextMate
grammars remain for the editor bundles. -
Runtime now depends on the Syntax module, which owns the quantity unit table
and the text and name rules.GesQuantityUnitandGesQuantityUnitsmove to
the Syntax assembly in C# with the unchanged namespaceGameEventScript.Api;
Swift Runtime re-exportsGesQuantityUnit, so source code is unchanged. The
NuGet Runtime, Compiler and CSharpBridge packages declare the Syntax
dependency, and theruntime,compilerandunityDLL sets now include
GameEventScript.Syntax.dll, which manual DLL installations must copy too. -
parsematerializes at mostMaxRangeItemsRange items into Lists per
invocation in total, so many:List(:Range(...))forms in one Text cannot
multiply the per-Range limit. Exceeding the total stops the handler with the
MaxRangeItemsruntime limit. This includes a single Range longer than the
limit, such asparse ":List(:Range(1, 10001))"with the default limit, which
previously produced an empty List and let the handler continue. Migrate by
raisingMaxRangeItemsor keeping such Ranges lazy, for example
:Range(1, 10001)without:List(...). -
strictdirectly afterparseis now the strict mode word. To parse a
binding namedstrict, writeparse (strict);parse strictalone is a
syntax error. -
A number directly followed by a unit spelling is now one quantity literal, so
10m/s,6m/s²or120°/sare a speed, an acceleration and an angular speed
rather than divisions by a bindings,2/sis the rate2Hz, and2m²or
2m^2is an area rather than the square of2m. Write10m / sor2 / s
with whitespace to divide and(2m)²to square. Text such as'250ms'now
parses as0.25sinstead of failing. -
floor,ceil,truncateand the threeroundforms keep the unit of a
quantity, at runtime and in constant folding:floor 2.5mis now2minstead
of the unitless2, andround half even 2.5m/sis2m/s. Percentages still
round to unitless numbers. A rounded time such asfloor 1.5sis therefore a
valid send delay. Remove the unit explicitly withas :Quantity(none)where a
plain number is needed. -
Swift
GesQuantityUnithas new cases for the added physical units, so an
exhaustiveswitchover it must handlekilogram,newton,joule,watt,
volt,ampere,hertz,squareMeter,cubicMeter,wattPerSquareMeter,
kelvin,degreePerSecond,decibel,wattPerKelvinandjoulePerKelvin
(or add adefault).
C#GesQuantityUnitgains the same members; existing values keep their numbers. -
Runtime observer callbacks report the host-local send ID of the message they
describe: C#MessageEmitted(message, id, accepted),
MessagePublished(message, id, result),DispatchStarted(message, id, dispatchSignatureId)andDispatchCompleted(message, id, dispatchSignatureId);
SwiftmessageEmitted(_:id:accepted:),messagePublished(_:id:result:),
dispatchStarted(_:id:signatureID:)anddispatchCompleted(_:id:signatureID:).
Every queued emit or received message, processed publish, delayed send and
initialization gets the next ID of its host, so a trace can match each dispatch
to its emit, publish or delayed send; 0 marks an emit that was not queued or a
publish the host did not accept. Messages themselves carry no ID.
Migrate by adding theidparameter: every callback now has an empty default
implementation in both ports, so an observer that keeps an old signature still
compiles but no longer receives that callback. -
Public API types are renamed so that only the three edge types keep the
GameEventScriptprefix:GameEventScriptHost,GameEventScriptProgramand
GameEventScriptMessage. All other public types useGes, identically in C#
and Swift, for exampleGesContext,GesHostBuilder,GesMessageArgument,
GesRuntimeLimits,IGesPublishSink(Swift:GesPublishSink) and
GesSyntaxHighlighter. Deviating names:GameEventScriptBuilderbecomes
GesProgramBuilder,GameEventScriptInstancebecomesGesProgramInstance,
the C#GameEventScriptBytecodeInstructionUnitand SwiftGesUnitbecome
GesQuantityUnit, the concreteGameEventScriptExternalTypeCatalogbecomes
GesDeclaredExternalTypeCatalog(the C# interface isIGesExternalTypeCatalog,
the Swift protocolGesExternalTypeCatalog), SwiftGameEventScriptExtensionFault
becomesGesExtensionFaultErrorand SwiftGameEventScriptAPIErrorbecomes
GesApiError. Behavior is unchanged; migrate by renaming references. -
Builders are created directly or through their target type, following each
language's idiom. C#:new GesProgramBuilder()(the staticCreate()is
removed) or, with C# 14,GameEventScriptProgram.CreateBuilder(); hosts via
new GesHostBuilder()orGameEventScriptHost.CreateBuilder(). Swift:
GesProgramBuilder()orGameEventScriptProgram.makeBuilder()(create()is
removed); hosts viaGesHostBuilder()orGameEventScriptHost.makeBuilder()
(formerlycreateBuilder()). The SwiftGameEventScriptHostinitializer is no
longer public; configure hosts through the builder. Swift factory methods use
make:GesMessageSignature.makeMessage(_:)andmakeSignatureId(name:parameterNames:). -
Reading, encoding, validating and dumping Programs are members of
GameEventScriptProgram; the separate reader, writer, validator and dumper
types are no longer public. C#:GameEventScriptProgram.Read(bytes, options),
program.Encode()(formerlyToArray),program.GetEncodedSize(),
program.Write(destination),program.Validate()andprogram.Dump(...).
Swift:GameEventScriptProgram.read(_:options:),program.encode()(formerly
bytes),program.encodedSize(),program.write(into:),program.validate()
andprogram.dump(includeInstructionAddresses:). -
The Swift Program exposes the same segments as C#:
metadata,
stringConstants,uint16IndexLists,bindings,code,debugSymbols,
sourceMap,sourceArchiveandbuildMetadataare segment types
(GesStringConstantSegment,GesBindingSegment,GesCodeSegment, …) that are
also random-access collections over their entries. The binding entry type is
GesBindingSegment.Entryin both languages (formerly C#
GameEventScriptBinaryBindEntry, SwiftGameEventScriptBinding); Swift
GameEventScriptSourceMapandGameEventScriptBuildMetadatabecome
GesSourceMapSegmentandGesBuildMetadataSegment. Swift
GesDebugInfoOptionsmoves from the Compiler to the Runtime module, as in C#. -
Message and value JSON are members of the encoded types;
GameEventScriptMessageJson
is removed. C#:message.ToJson(),GameEventScriptMessage.FromJson(json),
value.ToJson()andGesValue.FromJson(json). Swift:message.json(),
GameEventScriptMessage(json:),value.json()andGesValue(json:). -
GesSymbolKindis renamed toGesDiagnosticSymbolKindin both languages to
separate it fromGesDebugSymbolKind. -
Swift gains
GesDiagnosticCodeswith the same stable codes as C#, and
GesOpaqueSection.flagsis aGesSectionFlagsoption set instead of a raw
UInt16, as in C#. The C#GesInstructionFlagenum is no longer public; both
languages expose the rawUnitAndFlags/unitAndFlagsbyte. -
Bridge types use the
GesBridgeprefix and identical names for shared roles:
GesBridgeHostRunner,GesBridgeExtensionRegistry,
GesBridgeExternalTypeRegistry,GesBridgeMessageHandler,
GesBridgePublishSinkandGesBridgeValueConversion(formerly
GameEventScriptCSharp…/GameEventScriptSwift…). C# registries are created with
GesBridgeExtensionRegistry.Create(types)/CreateBuilder()and
GesBridgeExternalTypeRegistry.Create(types); the staticGameEventScriptCSharpExtensions
andGameEventScriptCSharpExternalTypesentry classes are removed. C# gains the
publicGesBridgeMessageHandlerandGesBridgePublishSinkdelegate adapters.
Swift descriptors becomeGesBridgeFieldBinding<Root>,
GesBridgeConstructorBinding<Root>,GesBridgeTypeBinding<Root>and
GesBridgeAnyTypeBinding;GesBridgeValueConvertible,
GesBridgeConversionErrorandGesBridgeHostRunnerRegistrationreplace their
GameEventScriptSwift…predecessors. Attributes and macros keep their names. -
Swift bridge members no longer name the language:
setSwiftValue(_:),
swiftValue(at:as:),withSwiftArguments(_:)and theswiftArguments:labels of
message, emit and publish conveniences becomesetNativeValue(_:),
nativeValue(at:as:),withNativeArguments(_:)andnativeArguments:. -
Swift no longer exposes runtime helper types that C# keeps internal:
GesNumber,GesTextandGesSpatialValue(useGesValue.x/y/z) are
internal, andGesSeriesValuewithGesValue.series(_:)/seriesValueis
available only to the Compiler. -
Swift reports the public value kind as
GesValue.valueKind: GesBytecodeTypeKind,
the same single type C# uses forValueKind;GesValueKindandkindare no
longer public. Integer and binary64 ranges are both.range(use
integerRangeValue/floatRangeValue), and records and external values are
.custom.GesMessageArguments.kindAt(_:)returnsGesBytecodeTypeKind. -
Swift maps follow the C# model of sorted keys with parallel values:
GesValue.map(keys:values:)andGesValue.record(typeName:keys:values:)create
them, andGesValueMap.key(at:)/value(at:)read them next tolength,
get(_:)andcontainsKey(_:).GesMapEntry,GesValueMap.entriesand
GesValue.mapEntriesare no longer public. -
C#
GesValueMap.StorageLengthis removed; it always equaledLength. Use
Lengthinstead. -
Attributed C# extension parameters check units: a
[GesParam]with a unit requires exactly
that unit, and one without a unit a unitless argument; another unit givesnothing. -
The C#
GesBridgeHostRunnerreturns a runner-ownedGesBridgeHostRunnerRegistrationfromLoadandSubscribe, as
the Swift runner does; itsIsAttached,StartResultandDetach()take the runner's lock.GetStartResult,
Detach(instance)andUnsubscribe(subscription)are removed, since the host's own handles bypassed the lock. -
C# attributed extensions convert arguments strictly, as Swift does: a fraction, a Boolean or a Percentage no longer
converts to an integer or number parameter, and a number no longer to abool; such a call givesnothing. -
C#
GesBridgeExternalTypeRegistry.Createrejects fields and constructor parameters of CLR types without a conversion,
such asdecimalor enums, and external classes it does not register. A constructor argument that does not convert
exactly, such as2.7for anint, is nowruntime.externalConstructorFailedinstead of a truncated value. -
The end of console input (EOF) delivers scheduled delayed messages before the CLI exits, as a batch
rundoes, so
piped console scripts lose no timer or delayedErrorCode;:quitstill discards them. -
Host configuration names now say what they configure, before 1.0 freezes them:
MaxProcessedEventsPerRunis
MaxProcessedMessagesPerRun,MaxQueuedMessagesPerRunisMaxQueuedMessages(it bounds the host's persistent queue,
not one run), andWithRegistry/withRegistryisWithExtensionRegistry/withExtensionRegistry. Observer
callbacks and diagnostics report the new limit names. -
C# removes
GesValue.AsNumeric, which duplicatedAsNumber(), andGesValue.GesNumber, an alias ofGesFloat. -
Swift
GesContext.extensionRegistryis no longer optional: a host without extensions has an empty registry, as in C#. -
C#
GesPointandGesVectorcompare components with binary64 equality, as Swift does, so a NaN component makes two
values unequal.
Added
-
Schema computed fields take the script language's functions and powers:
sqrt/√,cbrt/∛,sin,cos,tan,
asin,acos,atan,atan2,hypot,exp,ln,^,²,³,floor,ceil,truncate,round half …,rad
anddeg, with the language's units (the root of m² is m). A square root is correctly rounded and bit-identical
everywhere; the other functions may differ in their last bits between platforms, as in scripts. A field named like a
GES keyword is read in backticks, such as`length` / 2. -
Names in backticks: any GES keyword written in backticks is a plain name wherever a name stands (bindings, parameters,
labels, record fields, member access, map keys), so a field namedlengthorifcan be declared and read, and a
backtickedereads a field while plainestays Euler's number. Argument-label words such aslength,eorabsalso
name record fields and members without backticks. -
Extension functions declared with Swift
@GesFunctionor C#[GesFunction]may take oneGesRandomGenerator
parameter in any position, which receives the call's seeded generator; it is no script argument and does not count
toward labels, arity or C#'s four-parameter limit. -
Packed schemas:
packed schema :Nameorpacked(8|16|32|64) schema :Namedeclares a record of fixed-width fields
(integers and stepped numbers with fixed ranges, Booleans, closed Tags, Flags, other packed schemas) of at most 64
bits,schema.packedFieldandschema.packedTooWideotherwise. Its wire encoding is unchanged and equals the word in
little-endian order; its delta changes the word as a whole. Generated code holds it as one word: a Swift struct over
rawValuethat isHashable,SendableandCodable, or a C# struct overRawValue, with checked field properties,
checked and unchecked creation from a raw word, and Lists of them as arrays of words that read and write a word at a
time.GesSchema.PackedWidth/PackedBitsandGesBitReader.RemainingBits(SwiftpackedWidth,packedBits,
remainingBits) are new. -
ges schema generate --models <namespace>(GesSchemaGenerateOptions.Models): wire code shares the packed types of
model code in that namespace and converts every wire record with a model directly to and from it, without GES values:
C#ToModel()/CopyFrom(model), SwifttoModel()/read(model:)/init(wire:), guarded by the schema hash. -
Swift wire code generated with
--namespaceand--modelsconverts to and from models at file scope, also in split
files, and names wire and model types so that neither hides the other. A packed wire root shared with the models gets
its wire members as static members of an enum<Name>Wirein the wire namespace, as C# does with its class, so that
several wire generations of a module can share the model, withcopyandquantizeas in C#. A Swift file declares its
namespace enums and then extends the whole namespace, as split files do, so that names of enclosing namespaces cannot
hide the other side's.--modelsnaming the wire namespace itself, a namespace that continues the other side's with the
name of a type there (a<Name>Wireor a type of any model group included), a<Name>Wirethat another type already
names, a namespace starting with a Swift type name that generated code uses and, in Swift, a wire type or nested type
that would hide a namespace the code names aregenerate.nameCollision; Swift namespaces of wire code with models and of
its models start with an uppercase letter (generate.invalidNamespace). -
Swift wire code with
--modelsextends the namespace components it shares with the models' namespace instead of
declaring them again, andges schema generate --extend-namespace <A>(GesSchemaGenerateOptions.ExtendNamespace)
makes any Swift generation extend the leading partAof its namespace that another generation declares, so
generations such asGame.WorldandGame.Panels, or two inGame, can share one module. -
Both CLIs have
bench, an in-process benchmark of a compiled program: it loads the program once, warms it up and
times every further run of the entry message, then reports min, median, mean, p95, max and standard deviation, a
checksum of the console output, and on .NET the allocations and collections per run and the tiering settings, as
text or JSON.scripts/bench-compare.pycompares the Swift CLI, the .NET JIT with and without tiered compilation,
ReadyToRun and NativeAOT on the same binary. -
:Bytes, an immutable byte sequence: literals:Bytes[0xa0, 183]and:Bytes("a0b7"),as :Bytes
from integer Lists and hexadecimal Text,as :Text/parse/documents, count,in, indexing,
iteration, equality and order,:take/:dropfirst/lastslices,+concatenation and UTF-8
conversion with:Bytes(utf8: text)and:Text(utf8: bytes). Message JSON writes Bytes as Base64, schemas add:Bytes max nwith
generatedWriteBytes/ReadBytescode, and the Bridges map C#byte[]and Swift[UInt8]. -
ges schema generate --model <group> --valuesgives every model typetoValue()andinit(value:)(C#ToValue()and
FromValue(value)) with the plain Record that wire--valuesreads and writes, so models and wire records convert
through one value instead of hand-written copies. A nested field that does not convert reports its path, such as
entries[].level, as the wire value path does. -
Schema union alternatives take labels, as in
:Text max 64 | bind: :Loadout_UnitBind: generated code names the
alternative.bind(C#Bind) instead of after its type; the label changes no bytes and no hash. -
Schema tag sets
tags :Mount as (#front, #rear): a field, list element or alternative of type:Mountis that
:Tag(...)in place, with the same bytes and hash, and generated code declares oneMountenum for every field of it
instead of one per field. -
Schemas take the fields of another schema with
with :Unit_Common, optionallyall optionaland
without (id); anabstract schemaonly lends its fields. The record stays flat and hashes like written fields.
Generated models adopt a protocol (C# interface) per schema they take unchanged;GesSchema.IsAbstractandTakes
(SwiftisAbstract,takes) describe it, and misuse of an abstract schema isschema.invalidAbstract. -
Schema fields
computed byan expression, as in script records:power: :Quantity(W) computed by 0W when duration <= 0s, otherwise energy / duration. The subset reads fields, lets and constants with arithmetic and comparisons in units,
when … otherwise,min of,max of,clamp,abs,default,has valueand list sums and counts; binding checks
types and units, and the expression belongs to the hash. Computed fields are never encoded, decoding adds them, a
document that sets one fails, and generated models and wire records give them as read-only properties that compute the
bits of the virtual machine.GesSchema.ComputedFields(SwiftcomputedFields) describes them; mistakes are
schema.invalidExpression, and a required field that reads an optional field withouthas valueordefaultis
schema.computedMayBeAbsent. Generated code is plain binary64 and Boolean code in the language's own operators, such as
duration <= 0.0 ? 0.0 : energy / duration, with a smallGesComputedhelper type for the rules plain code lacks;
only a field where whole numbers beyond 2^53 could meet keeps the exact-value helpers. -
Computed fields may be spatial:
:Vector,:Point,:Box,:Discand:Poly, built with the constructors of scripts,
as insize: :Vector(m) computed by :Vector(x: (arena.columns - 1) * arena.spacing, y: (arena.rows - 1) * arena.spacing)
orbounds: :Box(m) computed by :Box(lower: origin, upper: origin + size). Later fields read their parts (size.x,
bounds.center,zone.radius,shape.points[:count]), vectors and points take the arithmetic of the virtual machine,
absof a vector is its correctly rounded length, and:Poly(points:)takes a list of points, a list field of Points or
a projectionlist[:select item => point]. Generated models and wire records give them asGesVector,GesPoint,
GesBox,GesDiscandGesPolyproperties. -
A schema union may span lines: a
|may end a line or start the next one, with comments and blank lines between the
alternatives, in fields, arguments and List elements.ges schema formatbreaks a union before each further
alternative once it no longer fits 100 columns or holds an axis block. -
ges schema generate --model <group> --documents(optionDocuments) lets models read GES document text: each root gets
C#FromDocument(text)(Swiftinit(document:)) and the generation a type that reads any root by its:Schema(:Name)
header:Documentinside the namespace,ModelDocumentwithout one. The document is checked against the embedded schemas, defaults apply, and errors carry their
document.*orwire.*code, line, column and field path; a missing or other header is the new
document.schemaMismatch. The Runtime'sGesSchemaDocumentdoes this for generated code, andGesDocumentException.Path
(SwiftGesDocumentError.path) names the field. -
Schema type
:Disc(unit) { x ..., y ..., radius ... }holds the geometry library'sGesDisc: its centre as a Point of
the axes x and y, then its radius, binary64 without a block. The value path, documents ([center: ..., radius: ...]),
deltas, dumps, generated wire code and models handle it like a Box. -
Schema types
:Box(unit) { ... }and:Poly(unit) max n { ... }hold the geometry library'sGesBoxandGesPoly
with per-axis constraints like:Point. A Box encodes its cornerslowerandupperas two Points and its value
orders them; a Poly encodes its points in the plane z = 0 as a List of x and y. The value path converts the library's
external values, documents write a Box as the Map of its corners and a Poly as the List of its points, generated wire code
holdsGesBoxand the reusable Points of a Poly with aGesPolyview, and models holdGesBoxandGesPoly.
The built-in namesBox,PolyandDiscare reserved: a schema, message or message set of that name is
schema.duplicateName. -
Recursive schema Lists:
units: :List(:Loadout_Bind) max 16 depth 3in:Loadout_Bindholds records of that schema
up to three deep, so a tree needs one schema instead of one per level. The wire encoding is that of one schema per
level; a record deeper than the depth fails with the newwire.tooDeep, whose message names the depth, such as
wire.tooDeep at 'units[].units[].units': deeper than depth 3(GesWireException.Detail, Swift
GesWireError.detail), and a document withdocument.tooDeep. Generated code of the recursive schema takes the level
of each record; every other schema generates the same code as before.GesSchemaType.Depth(Swiftdepth) describes it.
The element may also be a union of scalars and the schema itself,units: :List(id: :Text max 64 | bind: :Loadout_Bind) max 16 depth 3, so a document writes a unit as its id alone or as a bind; at the depth the List holds neither. -
ges schema generate -d <dir>(--out-dir) writes one file per declaration, or per.gesswith--split file,
plus a shared_<Namespace>file and the manifest.ges-generated.json; a later run removes files the manifest owns and
no longer needs, warns about foreign files withcli.unowned, and--checkcompares the whole directory.
GesSchemaGenerator.GenerateFilesandGenerateModelFiles(SwiftgenerateFiles,generateModelFiles) return the
files for build integrations, selected byGesSchemaGenerateOptions.Split. -
Schema fields take defaults, as in
efficiency: :Percentage default 100%ormaxPower: :Quantity(W) default power:
a literal, a constant, a let or a sibling field of the same type fills in what a value, model value or document leaves
out, while the wire still carries every field. Generated models take defaults as initializer arguments, describe them
and add them to the layouts;GesSchemaFieldInfo.Default(SwiftdefaultValue) describes them. Invalid defaults are
schema.invalidDefault. -
A schema field whose type is a schema takes a record literal as its default, as in
electricity: :Unit_Consumer default [efficiency: 90%]ordefault [:]: the fields it names take its values, nested
records take nested literals, and every other field takes its own default. Each value is checked like a default of its
field, and a literal that leaves out a required field without a default isschema.invalidDefault. Generated models
default such a field to an initializer call (SwiftUnit_Consumer(efficiency: 0.9), C#
new Unit_Consumer(efficiency: 0.9));GesSchemaDefaultKind.RecordwithGesSchemaDefaultInfo.Entriesdescribes
it, and layouts list its entries. -
Schemas declare constants with
let retention be 2sinside their braces. Its fields can name a let as a bound, step,
delta range ormax; generated wire and model types declare it as a static member in base units, and it belongs to
the hash.GesSchema.Constants(Swiftconstants) describes them. -
Generated model types carry their
SchemaHash(SwiftschemaHash), as wire records do. -
Generated model reading reports a required field without a key as
wire.missingFieldandnothingwhere a value is
required aswire.nothingValue, as the wire value path does, instead ofwire.typeMismatch. -
Generated wire records fill a list of reused elements with
Set<Field>Count(count)(Swiftset<Field>Count(_:)), and
a list of Text or open Tag elements also reads and sets as strings with<Field>Values(Swift<field>Values). -
Generated wire records count their exact size with
ByteCount()andDeltaByteCount(baseline)(Swift
encodedByteCount()anddeltaEncodedByteCount(against:)), andToBytes/encoded()and the delta forms allocate only
that size instead ofMaxByteCount: a record with a 4 MiB:Byteslimit that holds 1 KB allocates 1 KB. They build on
the new countingGesBitWriter.Counting()(Swiftcounting()). -
Schema maximums accept digit separators, such as
:List(:Text max 1_024) max 10_000. -
Schema
:Flags(#a, #b)with up to 64 members: one bit per member on the wire, a script flag Map such as
[armed:]in the value path and documents,WriteFlags/ReadFlags(SwiftwriteFlags/readFlags) masks, and
generated C#[Flags]enums and SwiftOptionSettypes. -
Hexadecimal integer literals such as
0xff_88_00in source,parse, numeric text casts and
documents: exact Int64 values with_between digits, without unit or percentage suffix. -
Schema roles:
wire(group)marks a schema, message or message set as a wire root and
model(group)a schema as a model root, optionally in a group (defaultwithout one).
ges schema layoutandgeneratetake--wire <group>and--model <group>, and the
Generator addsWireRoots,ModelRoots,ModelLayoutandGenerateModels. A wire root that
reaches a document-only type fails reading withschema.notEncodable, soges schema check
reports it;schema.invalidRoleandschema.duplicateRolereport misplaced roles. Roles change
no hash. -
ges schema generate --modelwrites plain model types: SwiftHashable,Sendable,Codable
structs with a memberwiseinit(Identifiablewith a key), C# 9 classes with value equality,
with enums for closed tags and unions, and no ranges, steps or parameters needed. -
Swift extensions declared with macros:
@GesExtension,@GesFunctionand@GesPredicate
generategesExtensions()with signatures from the declarations, strict conversions, declared
units andnothingfor an argument that does not convert; instance methods yield an instance
gesExtensions(). The C# attributes gain[GesPredicate], nullable, Text, spatial and shape
parameters and results,[GesFunction(name, unit)]andAddInstance(instance). -
ges schema generate --model --bindingsoffers generated models to scripts as external types:
a generatedGesTypescatalog and registry,ToGesValue/FromGesValue(SwiftgesValue()/
init?(gesValue:)) and a:Name(fields: map)constructor, without the Bridge, macros or Reflection. -
GesDiscin both runtimes, a filled circle in the plane z = 0, which the geometry library offers to scripts as
:Disc(center: p, radius: r)and:Disc(radius: r)around the origin (a Percentage radius is its unitless ratio,
as the declared Number type converts it), withcenter,bounds,area,distance,
inset,nearest,containsandintersectswith discs, 2D boxes and polygons. -
GesBoxandGesPolyin both runtimes, andGesGeometryLibrary, which offers them to
scripts as the external types:Boxand:Polywith the functions:geometry.size,center,
union,inset,nearest,bounds,area,distance,centroid,containsand
intersects; an invalid polygon givesnothing. -
GesPointandGesVectorin both runtimes: unitless spatial values with the language's
affine arithmetic,length,distance,normalized,dotandcross, and conversions to
and fromGesValuewith an explicit unit. -
Host conveniences on the spatial values: Swift
+=,-=,*=and/=onGesPointandGesVector
(C# derives them from the operators), the component boundsMinXthroughMaxZ(SwiftminXthroughmaxZ) of
GesBox, andGesBox.FromSize(Swiftinit(size:)), the box from the origin to a size. Scripts are unchanged. -
External values have three explicit read paths in both ports:
ExternalValuereturns the
host object,ReadField(name)runs one getter andMaterializedMap()runs all of them.
C# adds these andGesValue.GesExternal(value); Swift addsreadField(_:)and the protocol
GesFatalRuntimeError, the counterpart ofGesFatalRuntimeException, so a host can read
the diagnostic of a failing getter, and a host's own conforming error keeps its diagnostic. -
Hosts build Maps and Records from ordered entries in the Runtime: C#
GesValue.GesMap(("a", x), ("b", y))andGesValue.GesRecord("Hit", ("a", x)), Swift
.map([("a", x)])and.record(typeName: "Hit", [("a", x)]). -
value["name"]reads the field of a Record, the entry of a Map or the coordinate of a
Point or Vector and can be chained; everything else gives Nothing, without calling
external field getters. -
GesValueMapcan be traversed in canonical key order:foreachin C#, without
allocating, andfor (key, value) in mapin Swift. -
ges schema generate(anddotnet ges schema generate) writes C# 9 or Swift 6 code for schema
roots: a type per schema that writes and reads its records with the same bytes, error codes and
paths asGesSchemaWriterandGesSchemaReader, without allocating, with parameters as constants.
Schemas with Text, List or Dice become classes whose storage grows on demand and is reused;
messages and message sets are supported too. Schemas write and read deltas with the bytes of
GesSchemaDelta, lists with keyed elements included, and records compare by wire values
(WireEquals), quantize and copy into existing storage.--valuesadds the conversion to and
from GES values and messages through the value path. Generated Swift classes skip dynamic
exclusivity checks, which halves their time;--checked-exclusivitykeeps them.--namespace,
--access internaland--checkfor checked-in output are supported. -
ges schema layout(anddotnet ges schema layout) prints the language-neutral generation
layout of one or more roots, or of every declaration with--all-roots: every reached type with
its bound encodings, hashes and the parameters its constants depend on. A type that several roots
share appears once, and both CLIs print identical JSON. -
New Generator package: the NuGet package
GameEventScript.Generatorand the SwiftPM product
GameEventScriptGeneratorexposeGesSchemaGenerator.LayoutandGenerate(Swiftlayoutand
generate) withGesSchemaGenerateOptions, so build integrations such as a Unity editor menu,
an MSBuild target or a SwiftPM plugin generate schema code without the CLI. It depends on Runtime
and Syntax only and games never ship it; the DLL distribution adds ageneratorset for a Unity
Editorfolder. -
Schema bit primitives:
GesBitWriterandGesBitReaderwrite and read values of 0 to 64
bits in the wire format's bit order, andGesWireRulesholds its Text, tag, quantization and
wrapping rules and the delta range over plain operands.GesWireException(SwiftGesWireError) can be created
from a code and a path, and everywire.*code is a public constant. The schema writer and
reader now build on these primitives, without loss in speed. -
Schema deltas work element by element for a list whose elements have a
key, when the keys of
baseline and record ascend strictly; otherwise the list is replaced as a whole. The limit of
MaxByteCountrises from 1 MiB to 64 MiB.GesSchemaDelta.Encodeuses its buffer as scratch
space, so size it withMaxByteCount: a smaller buffer can fail withwire.bufferTooSmall
even when the delta would fit. -
Schema deltas:
GesSchemaDeltaconverts between full records and deltas against a baseline
record without allocating,GesSchemaValuesdoes so for values, andges schema dump --baseline
makes a delta readable. A decoder accepts only the canonical form (wire.invalidDelta), a
record with another key iswire.keyMismatch, and a target buffer that overlaps an input is
wire.overlappingBuffers. -
Type, message and handler names can join segments with single underscores, such
as:Unit_WeaponandUnit_Fire. Each segment starts with an uppercase letter,
so:Unit_1andUnit__Firestay invalid; use:Unit_Type1. The underscore
forms no hierarchy:is :Unitis false for a:Unit_Weapon. -
GES schemas (
.gess) describe data formats and yield a very compact binary encoding for
server-driven multiplayer games: ranges, steps and wrapping values with exact quantization,
closed tag sets, tags, lists, Dice and text with hard limits, optional fields, unions, nested schemas, keys,
messages and message sets, parameters bound per session, and a canonical FNV-1a 64 hash. In
Runtime,GesSchemaSet,GesSchema(a read-only description with its fields),GesBoundSchema,GesSchemaWriter,GesSchemaReaderand
GesSchemaDumpuse no VM, and the writer and reader allocate nothing on success;GesSchemaValues
converts Records and Messages. Schemas also check documents, including union types, through
CheckDocument. The CLIs addschema check,format,hash,canonicalanddump. -
cmis a prefixed literal spelling of the meter, likekmandmm:150cmis
1.5m. It adds no unit,:Quantity(cm)remains invalid, and printing documents
does not choose it. -
Link failures of an import that the source calls carry one diagnostic per
call site with its source location, in source order:
GesDynamicLinkException.Diagnosticsand Swift
GesDynamicLinkError.diagnostics, whose first entry remains
Diagnostic/diagnostic. The message names the import, for example
Unknown extension :navigation.nope(x). Columns need the SourceArchive;
without a SourceMap the single diagnostic keeps only the symbol. Both CLIs
print every call site. -
GES document highlighting:
GesSyntaxLanguage.Gesd(Swift.gesd) categorizes
.gesdtext and reports its first document error as a diagnostic with a UTF-16
range, in both Syntax packages. The CLIs adddocument checkanddocument formatfor.gesdfiles and the console command:show <file>, which
highlights a.ges,.gesaor.gesdfile and marks its errors. TextMate,
Sublime Text, bat and VS Code grammars cover.gesdfiles. -
The VS Code extension opens
.gesbfiles in a read-only viewer: segments with
offsets and sizes, inbound and outbound messages, functions, predicates, records,
extensions, external types, embedded sources and texts. The viewer needs neither
the CLI nor workspace trust; GES: Show Assembler Dump opens theges dumpoutput. -
parse strict inputrecognizes the same literals asparse, but produces
nothinginstead of the original Text when the input is not a complete data
literal:parse strict "standard"andparse strict "[1, 2"arenothing,
whileparse strict "'standard'"is the Textstandard. The bytecode encodes
it asParseLiteralwith the Strict flag (mode=Strictin GESA,#strictin
inline assembly). -
GES documents (
.gesd): human-editable data files whose values are written
like GES literals, such asmaxForce: 21.4kNormount: :Vector(x: 0m, y: -0.8m).
C#GesDocument.Parse(text)/document.Print()and Swift
GesDocument(parsing:)/document.text()read and print them. The root is a
Map or, with a:Schema(:TypeName)header, a Record;:Schema('file.gess')
references a schema file. Entries are separated by commas or line breaks,
//comments are allowed, and reading is strict: unquoted Text, duplicate
keys and explicit forms or number tokens that construct nothing, such as
:Range(1)orNaN, fail with
aGesDocumentException/GesDocumentErrorcarrying a stabledocument.*
code, line and column. Printing writes exact prefixed units such
as1kWor250msand reads back bit-identically in every implementation;
GesValue.Format()/formatted()print a single value. Schemas are only
referenced, not validated. -
Literal parsing without a Host for extensions, configuration and other
embedding code: C#GesValue.ParseLiteral(text)and
GesValue.ParseLiteralStrict(text), SwiftGesValue(literal:)and
GesValue(strictLiteral:). They followparseandparse strict, return
null/nilfor unrecognized strict input, never run constructors, and throw
GesLiteralLimitException/GesLiteralLimitErrorwhen a parsing limit is
exceeded, including more than 10,000 items materialized from Ranges in total. -
Physical units in C# and Swift: meter per second (
m/s), meter per second
squared (m/s², ASCIIm/s^2), kilogram (kg), newton (N), joule (J),
watt (W), volt (V), ampere (A), hertz (Hz), square meter (m², ASCII
m^2), cubic meter (m³, ASCIIm^3), watt per square meter (W/m², ASCII
W/m^2), kelvin (K), degree per second (°/s, ASCIIdeg/s), decibel
(dB), watt per kelvin (W/K) and joule per kelvin (J/K), next to meters, seconds and degrees (ASCIIdeg). Literals accept the
prefixed spellingskm,mm,cm²,km²,ms,t,kN,kJ,MJ,mW,
kW,MW,mW/m²,kW/m²,mW/K,kW/K,MW/K,kJ/K,MJ/K,kV,
kHz,WhandkWh, which normalize
exactly to the base unit, and/safter a number for a rate such as4/s.
Products and quotients follow a closed derivation table, for example
10m / 2sis5m/s,2kg * 3m/s²is6N,2m * 3mis6m²,10W / 2m²
is5W/m²,10W / 2Kis5W/Kand1 / 2sis0.5Hz(formerlynothing); other combinations of
two units remainnothing. Squares and cubes follow the same table and roots
invert them, so(3m)²is9m²andsqrt 16m²is4m(formerlyNaN).
Decibel levels add and scale by numbers but derive with no other unit and
givenothingwith a percentage. Every unit works in:Quantity(...), text
formatting and parsing, message JSON, vectors and points, inline assembly
(#meterPerSecond) and host APIs, including Swift
@GesField(unit: .meterPerSecond). The UnitIds are 0 to 18; the formerly
reserved bit, byte and bit-per-second ids 13 to 15 now hold the square meter,
cubic meter and watt per square meter. SwiftGesQuantityUnitis now
Sendable. -
Runtime observers can follow delayed messages. C#
MessageScheduled(message, id, deadline, publish)/ SwiftmessageScheduled(_:id:deadline:publish:)reports
each acceptedemit … afterorpublish … afteronce, with its send ID and its
absolute deadline in microseconds on the host clock.
MessageDiscarded(id)/messageDiscarded(id:)reports every queued,
pending-initialization or delayed message removed before it was dispatched,
such as after a failed initialization, so each send ID ends in a dispatch or a
discard. Hosts without an observer behave as before.ges run --verbose
traces them asschedule #<id> … at <local time>anddiscard #<id>and shows
the send ID on emit, publish and dispatch lines. -
C#
IGesRuntimeObservergives every callback an empty default implementation,
like Swift, so an observer implements only the callbacks it needs. -
Swift
GesBitWriter.writeBytes(_:)andGesBitReader.readBytes(_:into:path:)take a[UInt8]; generated Swift
wire code uses them, so a counting writer skips the bytes of a Text or Bytes at once and byte-aligned reads copy them. -
The C# runner subscribes by exact signature with optional tag filters, as the Swift runner does.
-
C# external-type fields and constructor parameters accept
float,GesPoint,GesVector,GesBox,GesPolyand
nullable value types, and a[GesConstruct]factory may return an instance of a derived class. -
Verbose traces and the paths of
:list,:sourceand:showescape only quotes, backslashes and control characters
in both CLIs, so Unicode text stays readable; the C# CLI escaped all non-ASCII text and<,>,'before. -
The Swift Runtime explains every Program format error and reached runtime limit with a specific message, as C#
does, instead of a generic one.
Changed
- A power with the exponent 0.5, as
sqrtand√compute it, is now the correctly rounded square root in both virtual
machines, so its bits no longer depend on the platform'spow. Host.Loadand the writer no longer validate a Program again that the Reader, the Compiler or an earlier validation
already accepted, so loading one Program into many hosts costs no repeated pass. A VM reset clears only the registers
the last handler used instead of the whole register file.- C# writes an extension's result into its destination register when the call returns, as Swift does, instead of during
the call.GesValueArgumentsis valid only during the extension call: C# throwsInvalidOperationExceptionand
Swift reads it as empty with Nothing items when it is kept longer. - The
GesRuntimeLimitsdocumentation states what each limit counts; the unused call-depth bookkeeping of the runtime
budget is gone. SwiftGesValueandGameEventScriptMessagedocument why they are notSendableand how to forward
a message across isolation domains as a JSON snapshot. - Swift Syntax, Runtime and Compiler no longer use Foundation. The Card Lab
WebAssembly module shrinks from about 71 MB to about 19 MB. Highlighting the
shared corpus is about 20 times faster in Swift and 3.5 times faster in C#. - A delayed
emit after …without recipients now behaves like the same emit
withoutafter: it is not scheduled and is observed as not queued, so it no
longer keeps the host waiting, counts towards the queue limit or appears in
NextMessageDelay. Its script result stays true. Delayed publishes are still
scheduled for the outbound sink. - The root SwiftPM package now exposes only the four libraries. Build
gesfrom
implementation/swift/GameEventScriptTool, or install it via Homebrew, the
install script or standalone downloads. The root macOS minimum is now 10.15;
the separate CLI retains its 10.15.4 minimum. - Swift
GameEventScriptProgramis now an immutablefinal class, so hosts and
callers share a single Program instance. Program contents, binary encoding and
copy-on-write isolation of returned arrays are unchanged. - Script handlers execute faster in both runtimes. Integer arithmetic and
integer range loops write results in place, constant map literals and data
constructions no longer redo per-execution work, and sorting numeric keys is
no longer quadratic. The Swift VM additionally mutates registers in place
without per-access exclusivity checks or reference counting on integer paths.
Behavior and results are unchanged. - Both compilers move loop-invariant constant loads and arithmetic in front of
their loop, so loops execute fewer instructions. Random draws, messages and
host calls stay in place and results are unchanged; executed opcode counts
drop and register requirements can grow slightly. - The C# and Swift compilers now produce byte-identical Programs for the same
sources and compilation options, including debug symbols, source maps and
source archives. Only BuildMetadata differs to identify the producing compiler. - The Swift compiler now writes the BuildMetadata section with compiler ID
steph.ges.compiler.swiftand version0.1.0, as the binary format requires
of every port. Runtime behavior does not depend on it.
Fixed
-
A random scope that a handler leaves open is reported as
runtime.randomScopeImbalanceeven when an earlier handler of
the same message failed; before, any earlier error in the frame suppressed it. -
A publication that only an outbound sink would receive and that a failed initialization discards now reports
MessageDiscardedwith its send ID, so every issued send ID reaches an observer callback. -
The Swift parser leaves the token after a missing dice pattern unread, as C# does, so a closing brace there still ends
the handler, and the Swift binder accepts a line break after the_of an unlabeled Record field. -
The source range of
random from … to …starts atrandomin both ports, also when a line break follows it, so
diagnostics and the SourceMap point at the whole expression. -
The Swift VM reports
runtime.invalidRecordConstructorandruntime.instructionPointerOutOfRangelike C#, and a
Publish without an outbound binding is ignored as in C# instead of raising an uncatalogued code. -
nothing = nothingandnothing <> nothingfold tonothing, as the VM computes them, and C# folds dice pattern faces
such as[:has pair of (1.5 + 1.5)]as Swift does;(50%) / (true)folds to50%. -
A negated decimal random bound such as
random from -20.0 to -10.0, a decimal constant andrandom 1 to pidraw
binary64 values in both ports. -
C# types constants in function and predicate bodies by their literal and
letbindings by their value, as Swift does,
sopredicate active() be $flagcompiles andemit after $delaywith a unitless constant is
validate.invalidTypeConstructorin both ports. -
Swift rejects
:Recordand unknown quantity units as parameter types like C#, lowers fold seeds and unit-literal
indexes like C#, and reports an unresolved labeled call ascompile.unresolvedSymbol. -
emit emit Done()compiles in both ports instead of crashing the syntax binder. -
The branch simplification inverts only exact branch pairs, so a
nothingcondition keeps its branch. -
compare-compiler-output.py --mutants Ncompiles seeded broken variants of corpus programs with both CLIs. -
C# compiles a call whose unlabeled first argument is followed by labeled ones, such as
scale(2, factor: 3)for
scale(_ value, factor), as Swift does. -
Unparenthesized extension calls such as
:math.double pitake the same operands in both ports. -
Both parsers report the same positions and recover alike for broken sources;
test-syntax-roundtrip.py --mutants
compares seeded broken variants of the corpus intest-swift.sh. -
on Start as incoming_1compiles to a Program that loads; before, linking failed with an argument exception. -
Program validation is linear in the Program size: a long register or label list shared by many instructions, many
source lines and many mappings no longer make C# validation take minutes to hours.Encode()/ToArray()validate
once, and the reader copies pools without per-element calls. -
parseof a form with many labels checks them through a set instead of quadratically, in both ports. -
The Swift Program reader rejects counts and lengths above
Int.maxon 32-bit targets such as wasm32 with the format
error instead of trapping. -
Start()completes an initial group with more initializations thanMaxProcessedEventsPerRuninstead of failing
withruntime.initializationLimitReached; the limit paces ordinary pumps only. -
Choosing items at random from a long Range no longer allocates one entry per Range item, and integer Ranges answer
has any,has all,starts withandends withfrom their bounds. -
Delayed messages are kept in a heap, so scheduling them in falling deadline order and delivering many at once no
longer take quadratic time; equal deadlines still keep their scheduling order. -
C#
:distinct,:distinct by,:group by,:map byand Map union index their keys once they hold sixteen, so large
results no longer take quadratic time. -
The C# CLI builds with .NET SDK 10.0.404, so the Windows archives and the AOT tool packages
contain .NET 8.0.34 instead of 8.0.25, which had known vulnerabilities such as CVE-2026-111497.
The libraries keep their .NET Standard 2.1 target. -
The CLI overview lists
ges schema layoutandgenerate, andges run --helplists the
console commands:edit,:saveand:quit!. -
External field values are no longer cached, so they can change between handlers. In C#,
a script's field read runs only that field's getter instead of all of them, so a failing
getter affects only its own field. -
Swift matches external field names by Unicode scalars, not by canonical equivalence.
-
C#
GesValue.GesRecord(typeName, keys, values)keeps the last value of a duplicate name,
likeGesMapand Swift; it used to keep both entries. -
:Vector(x: 1)and:Point(x: 1m)compile in C# like in Swift, and
:Vector(x: v, y: 3)with a Vectorvisnothinginstead of writing 3 intoz. -
The Swift compiler accepts the source short form
:Message(Done), like the C#
compiler. -
:Series(kind: fibonacci)compiles without quotes, andparseand documents read
:Series(offset: 2, kind: fibonacci). -
In Swift, a statement
emitorpublishof a Handler value no longer sends a message,
like in C#. -
A line break may stand before the comma of a further tag inside
:Message(...). -
:Quantity(km)(1)reportsvalidate.invalidTypeConstructorin Swift like in C#, and
a:Quantity(m)without a value reports at its start in C# like in Swift. -
:Message(...),:Handler(...)and:Series(...)can span lines like other
type constructors. Depending on the form, a line break made the valuenothing
in C# or was a syntax error in one or both compilers. -
Swift link diagnostics for exceeded register and call-stack limits and a full
initialization queue now carry a message, as in C#, instead of an empty one. -
C# syntax errors that name an unexpected token, such as
Unexpected token '}',
now range over that token, as in Swift, instead of having no length; their
start positions are unchanged. -
Unbraced
forandrandom withbodies open a scope of their own during
validation, as braced bodies do: a binding there no longer escapes into the
enclosing scope or repeats the loop binding, and shadows it instead. -
:sumand:averagewithout a binding no longer report that they shadow an
enclosing binding namedvalue. -
A repeated parameter of a
:Handler(Msg(...))data form is reported at the
parameter instead of the start of the source. -
Swift no longer accepts
pair of a kind, which only the counts fromthree
take, and reads the face afterpair ofas an expression also when it starts
with a binding nameda. -
The Swift compiler treats a backslash in a source Text literal as ordinary
text, as the language specifies and C# does, so'C:\'and"path\"compile.
Before, the backslash escaped the closing quote and the literal failed with
parse.syntax. -
The Swift compiler rejects a vertical tab or form feed between tokens with
parse.syntax, like C#; only space, tab and the line breaks LF, CRLF and CR
are source whitespace. -
C#
parseandGesValue.ParseLiteralno longer accept whitespace between:
and a type name, such as: Number(5), matching Swift and the source type
syntax; such input now fails recognition like any other malformed literal. -
C# external field reads now follow the field's declared type, as in Swift:
a field declaredFloat<Watt>that returns the integer3reads as3W,
and the same applies to Map conversion, keys, values, entries and iteration.
Before, C# returned the raw field value. -
External type fields and constructor parameters declared as Tag keep a Tag
value unchanged; before, C# turned it intonothingand Swift into the Tag
#nothing.nothingstaysnothingunder every declared type, so a missing
optional Tag field in Swift no longer reads as#nothing, and a Boolean
constructor parameter no longer turnsnothingintofalse. -
The Swift compiler no longer exhausts small thread stacks on deeply nested
sources. Its parser and compiler passes need far less stack per nesting level,
so sources at the expression and statement nesting limits compile on a 512 KB
thread, the stack of Swift concurrency tasks, also in Debug builds. Before,
about 25 nested calls could crash an unoptimized build there. -
The Swift compiler rejects reserved keywords such as
empty,recordorif
as argument labels, map literal keys and extension function names with
parse.syntax, like the C# compiler;to,nothing, the math constants and
prefix intrinsic names stay valid labels. It also accepts°(degree)
wherever an identifier is expected, such as a map key. -
The Swift compiler reports every diagnostic of a failing phase, as C# does,
instead of only the first: the parser resumes after a syntax error at the next
declaration or statement, and validation reports all semantic errors in the
order thatspecs/Diagnostics.mddefines. Call, arity andis-predicate
checks now run during validation, so they appear in that list. -
The C# compiler rejects records with a repeated field name or an unknown field
type, as Swift does. A field type may be a built-in type, a record of the
program or a configured external type. -
Both compilers reject
:Integerand:Floatwherever a type is named; use
as :Numberto convert andis integeroris fractionalto check. Casts and
checks to other custom types bound only at run time remain valid. -
ln,exp, roots and powers without an exactly representable integer result
are no longer folded at compile time; they run on the target platform's math
library, so a constant such asln 2andln xforx = 2always agree
within one execution. Their exact inner terms are still folded. -
Constant folding of integer products with a unit is exact like VM execution:
3000000000m * 3000000001stays9000000003000000000minstead of being
rounded through binary64; only an Int64 overflow falls back to binary64. -
When a source exceeds the nesting limit, both compilers still report the
syntax errors found before it in that source. -
Both compilers no longer hang on a
moduledeclaration after another
declaration or on a repeated one; it is now aparse.syntaxerror at the
modulekeyword. -
Compiler diagnostics in C# and Swift start at the same, most specific source
position: the offending token, the repeated or misnamed parameter, argument,
condition or binding, the failing call or constructor, or the first construct
that exceeds the nesting limit. -
A Swift
@GesFunctionor@GesPredicatewith an Optional parameter receivesnilfornothinginstead of being
skipped. -
A Swift runner delivers delayed work after the last outside reference to it is gone, as the C# runner does.
-
The Swift console answers each piped line at once instead of waiting for 4096 bytes or the end of the input.
-
The C# CLI ends with status 1 when stdout is a closed pipe, as Swift does, instead of returning the script's code.
-
:savewrites through a symbolic link to its target and keeps the file's permissions in both CLIs. -
C# diagnostics no longer end in an empty
[program=], and an I/O error without a file has no leading colon. -
The C# console's waiting prompt indents continuation lines without
...markers. -
The specifications define the typed value reads (
AsInteger,AsNumber,AsBoolean,AsText) of both ports, why
ValueKinduses the bytecode type kinds and which of them a host observes, the module graph with Syntax and
Generator, the anonymous name of an empty Program,InvalidProgramfor duplicate callable signatures and Record
names, reserved section types as unknown sections, and the instruction flag bits; stale runner names and a Swift
Host initializer are gone. -
The public C# Runtime types document what each member does instead of generated placeholder text.
-
Swift CI runs the Swift port on Linux in the release image of the static CLI (package tests, the supported corpus,
CLI process checks) and builds the libraries with the declared minimum Swift 6.0; a Linux-only Swift test that did
not compile is fixed. -
Publication requires the tagged commit on main with successful C# CI and Swift CI runs, and the C# release workflow
also runs the zero-allocation gate and the reproducibility check. -
An interrupted NuGet or CLI download publication can be resumed by running it again; identical published packages
and downloads are skipped and differing ones stop the run. -
C# CI runs the guide examples, the timing-only performance scenarios without timing and a license header gate for
Swift, C, Python, GES and web sources; Swift CI runs the Swift guide examples and treats guide example edits as
code. -
The Conformance runner scales its batch deadline with the selected cases and prints how long a batch took.
-
Workflow container images are pinned by digest and every job has a timeout.
-
Swift
list + valueandzipcheck MaxValueDepth like every other construction, where a deep fold crashed the Swift
process. C# Bytes answer:contains any,:contains all,[:first],[:last]and[:single]as Swift does, and C#
external type constructors take Bytes parameters. -
The C# CLI writes a script's output to a redirected file at the shared offset, so a later writer no longer overwrites
it, and it formats canonical decimals, schema hashes and generated code culture-invariantly, where a locale with the
minus sign U+2212 changed them.bench --entry initializationiscli.missingEntryinstead of a crash. -
The release gate requires the native jobs of Swift CI to have run, not only a successful run that skipped them.
-
The Swift compiler assigns binding IDs per kind with counters, as C# does, instead of in quadratic time.
-
The DLLs in the C# packages carry the time of the packed commit, or the current time for uncommitted changes, instead
of a fixed date, so MSBuild's copy into a build output replaces the DLL of an older package version of the same size. -
A unary intrinsic with a parenthesized operand, such as
floor(x), and an intrinsic call such asatan2(y, x)are power
bases in both ports:floor(x) ^ 2is(floor x) ^ 2. C# rejected both, and Swift accepted-x² ^ 2andfloor x² ^ 2,
which are syntax errors. -
The compiler no longer overflows its native stack when a predicate, local binding or send delay takes its type from a
long chain of function calls; result types are inferred iteratively and once per callable. -
parseandparse strictstop with MaxRangeItems when Range item counts near the Int64 maximum add up, instead of
trapping (Swift) or returning a partial value (C#). -
Swift:
let pulse be pulse()calls the functionpulseinstead of binding the new local as a Handler, and an alias of
a Handler binding keeps its signature, so a call through it with a mismatched label yieldsnothing, as in C#. -
:Number(0, "s")and other literal time units are accepted as send delays. -
Floating Range selectors (take/drop first/last, highest/lowest,
:reverse,:sort) return exactly the items of the
materialized List; when no Range reproduces them, they return a List. -
:sort,:order byand:take/:drop highest/lowestorder integers beyond 2^53 exactly, as<and>do. -
parserecognizes Record constructors whose names start withVectororPoint, such as:VectorClock(1). -
Message JSON readers reject
\uescapes that are not exactly four ASCII hex digits, such as\u+061. -
Generated models read a document union as the alternative its schema check chose, also inside explicit
:Listand
:Recordforms. -
Swift generation with
--modelsno longer fails on an optional union without a:Nothingalternative, and the Swift
direct wire-to-model conversion keeps an absent field absent when it defaults to a sibling. -
C#
--bindingscode for packed models compiles. -
An empty packed schema generates compiling C# and Swift code, and a packed root field named like a wire member, such as
encoded, isgenerate.nameCollision. -
Packed models report a value outside a field's range as
wire.outOfRangeat the field's path in both languages. -
A
.gesdfile reference:Schema('file.gess')selects a single recursive root schema. -
Program validation takes linear time for call graphs with many repeated calls (C#) and for source maps with many
archived sources (Swift). -
Program validation rejects a message-name handler binding whose argument names are not exactly
messagewith
InvalidProgram, instead of reading such a.gesbfile without error.
Migrating from 0.4.0
- Upgrade the GES libraries together and recompile scripts with the matching
Compiler and Runtime. GESB remains V1; the tested 0.4.0 upgrade covers selected
consumers and frozen fixtures, not arbitrary old Programs. - Replace the optional highlighter packages with the Syntax module and apply the
renamed public types listed under Breaking; the C# and Swift ports now use
the same names for corresponding types. - Perform a clean rebuild of C# consumers after updating packages.