Skip to content

v2.1.0

Latest

Choose a tag to compare

@Frotty Frotty released this 27 Oct 11:40
· 44 commits to master since this release
e9363a9

Highlights

  • Faster editor checks after function-body edits and less repeated work during supported Lua compilations.
  • Fix Jass builds with local optimizations and improve Lua generic and callback correctness.

Editor and compiler improvements

Editor checks can reuse unchanged declarations after function-body edits. Supported Lua body edits also reuse compiler artifacts, reducing repeated compilation work while retaining comparisons with fresh builds.

Compiler fixes

  • Keep the trailing returns and required assignments that Jass validation needs after non-exiting loops when local optimizations run. Fixes #1577.
  • Improve Lua generic method dispatch, closure and callback identity, and error stack cleanup.
  • Improve diagnostics when a map command fails, and retain the configured run arguments during hot-reload builds.

Experimental hot reload: limitations

Lua hot reload remains an experimental, opt-in development feature. It is not being announced as ready for everyday use. The latest callback-registration and cumulative-payload changes passed automated tests, but have not yet completed an in-game Warcraft validation run. Stock Lua tests and fresh-output comparisons do not establish engine or preload-channel behavior.

Some callback groups remain ambiguous and require a restart. Existing closure captures and live state cannot always be migrated; arbitrary initialization changes, removed engine effects, per-unit state, and object-data edits can require a restart or retain old state. Only eligible independent initialization registrations can be added automatically. Multiplayer hot-reload delivery is not supported. An accepted payload, even without warnings, is not proof that every behavioral change in a commit took effect.

See the hot-reload guide for supported cases and restart diagnostics. Ordinary builds and runs do not require enabling hot reload.

What's Changed

  • Check in unit tests that live Lua code uses no erased generic static by @Frotty in #1500
  • Run 21 executing tests on Lua too, backlog the Lua-only findings by @Frotty in #1501
  • Keep the toIndex of a generic argument on Lua by @Frotty in #1502
  • Lua: keep the ids of compile-time objects by @Frotty in #1504
  • Add the Lua test-runtime natives executing tests call, and run five more tests on Lua by @Frotty in #1503
  • Test Lua's targeted generic specialisation against Jass, bounded-exhaustively by @Frotty in #1505
  • Lower a direct wurstKeyOf call on Lua by @Frotty in #1506
  • Lua: give a static inner class its generic owner's instantiation by @Frotty in #1509
  • Lua: tell the instantiations of a generic class apart in instanceof by @Frotty in #1507
  • Type a method call on an inherited generic method with the superclass's type arguments by @Frotty in #1510
  • Lua: implement the Reflection natives by @Frotty in #1508
  • Run every executing test on Lua on master CI (-PallBackends) by @Frotty in #1511
  • Lua: allocate an instantiation whose members need its type argument from its specialised class by @Frotty in #1512
  • Accept a closure passed to a generic parameter again by @Frotty in #1514
  • Backlog: drop the Lua defects #1510 and #1512 fixed, run their stale exemptions on Lua by @Frotty in #1513
  • Lua: tell the instantiations apart in an instanceof written in a closure by @Frotty in #1515
  • Lua: call the enumeration natives and their getters directly by @Frotty in #1517
  • Give a closure written inside another closure its owner's type parameters by @Frotty in #1518
  • Fix Jass field instanceof/typeId in generic classes, stable compile-time type ids, Reflection parity by @Frotty in #1519
  • Lua: key a null class instance to 0 in wurstKeyOf by @Frotty in #1523
  • Bind an inherited generic method's type parameters through the superclasses in the interpreter by @Frotty in #1524
  • Interpreter: an object read back from an old generic is that object by @Frotty in #1525
  • Give a read of an inherited generic field its superclass's type arguments by @Frotty in #1526
  • Keep a compile-time object of a new-generic class out of its class's statics by @Frotty in #1528
  • Type a static inner class's members in that class's context, through nested owners by @Frotty in #1529
  • Lua: run an interface default method for the implementing class's instantiation by @Frotty in #1527
  • Substitute type arguments into the element type of an array field by @Frotty in #1530
  • Give a member reached through an old-generic value its class's type arguments by @Frotty in #1531
  • Jass: keep the ids of compile-time objects of new-generic classes by @Frotty in #1532
  • Let a sub-interface default implement the super-interface's method by @Frotty in #1533
  • Let a class implement and override a method with type parameters of its own by @Frotty in #1534
  • Give the macOS arm64 CI runner two test forks, keeping it inside its time limit by @Frotty in #1535
  • Collect each dispatch group's slot names once per Lua class table by @Frotty in #1539
  • Convert a unary expression handed to an old generic once on Lua by @Frotty in #1536
  • Lua: give a class's own allocator as a plain function, not a class-table method by @Frotty in #1537
  • Build override error messages only where they are reported by @Frotty in #1538
  • Document and pin how an object with a reused id starts on each target by @Frotty in #1540
  • Lua: skip the nil test of a native's enum argument which is a common.j constant by @Frotty in #1541
  • LSP: check only the edited unit when an edit changes nothing but bodies by @Frotty in #1542
  • Propagate nullness through branches and inlined enum arguments by @Frotty in #1544
  • Lua: opt-in hot reload of function bodies by @Frotty in #1543
  • Lua hot reload: name declarations from their identity by @Frotty in #1546
  • Reuse specialization demand with a pass-local worklist by @Frotty in #1547
  • Lua hot reload: structural payloads (new functions, globals, fields, classes, lambdas, packages) by @Frotty in #1548
  • Lua hot reload: preserve named closure identities across sibling additions by @Frotty in #1549
  • Lua hot reload: tuned constants take their new values; fixes from an in-game run by @Frotty in #1550
  • Name flatten temporaries the same in every function by @Frotty in #1552
  • Lua hot reload: callbacks told apart by their order reload, @onHotReload hooks, smaller payloads by @Frotty in #1551
  • Lua hot reload: real edits (constants first read, array literals, new generic specialisations); maps without InitBlizzard by @Frotty in #1553
  • Lua stack traces: a raising callback, package init or payload leaves no frames behind by @Frotty in #1554
  • Lua hot reload: dispatch slots and closure owners named by what they name by @Frotty in #1555
  • Lua hot reload: removed closures, classes and callbacks apply with a warning by @Frotty in #1556
  • Lua hot reload docs: in-game results of the last changes; what reloads, for map authors by @Frotty in #1557
  • Map commands: an editor's failed request carries its own text, not "Internal error." by @Frotty in #1558
  • Lua hot reload: a -build -luaHotReload takes the run arguments, not the build-only ones by @Frotty in #1559
  • Lua hot reload: a callback's error handler reloads like its target by @Frotty in #1560
  • Lua hot reload: a reload no longer rewrites the 75 MB baseline or the build's manifest by @Frotty in #1561
  • Lua hot reload: positions sort as numbers; a class's changed supertypes reload by @Frotty in #1564
  • Lua hot reload: a closure keeps its name when a later call of its chain changes by @Frotty in #1565
  • Lua hot reload: randomised differential test, and the defects it found by @Frotty in #1566
  • Lua hot reload: reconcile remaining work and validation gaps by @Frotty in #1567
  • Lua hot reload: materialize new compile-time object snapshots by @Frotty in #1563
  • Lua hot reload: reconcile backlog after integration by @Frotty in #1568
  • Lua hot reload: bind shared field stores to canonical declarations by @Frotty in #1569
  • Lua hot reload: stage CLI sessions until Warcraft launch succeeds by @Frotty in #1570
  • Lua hot reload: honor workspace mode before selecting build arguments by @Frotty in #1571
  • Lua hot reload: warn when existing closures gain captures by @Frotty in #1572
  • Lua hot reload: pack initializer order checks into one string by @Frotty in #1573
  • Lua hot reload: preserve bridge owners and fresh closure tables by @Frotty in #1574
  • Preserve shared snapshot ownership during Lua hot reload by @Frotty in #1575
  • Prune unread snapshot globals from hot reload metadata by @Frotty in #1576
  • Reuse pre-lowering IM for Lua hot reload body edits by @Frotty in #1578
  • Compile only changed scalar functions during Lua hot reload by @Frotty in #1579
  • Incrementally compile scalar Lua locals and control flow by @Frotty in #1580
  • Incrementally emit Lua scalar locals spilling and loop demotion by @Frotty in #1581
  • Use the organization-maintained AST generator by @Frotty in #1583
  • Replay real map commits with hot reload correctness and work oracles by @Frotty in #1582
  • Adopt generator graph contracts and IM type adapters by @Frotty in #1584
  • Reuse ordinary Lua function artifacts after fresh compile-time execution by @Frotty in #1585
  • Preserve Jass returns after non-exiting loops by @Frotty in #1586
  • Support common callback edits and added event registrations in hot reload by @Frotty in #1588
  • Prepare compiler release 2.1.0 by @Frotty in #1587

Full Changelog: v2.0.4...v2.1.0