Skip to content

Releases: luau-lang/luau

0.542

25 Aug 23:41
e84bccc
Compare
Choose a tag to compare

Analysis changes

  • Fix DeprecatedGlobal warning text in cases when the global is deprecated without a suggested alternative
  • Fix an off-by-one error in type error text for incorrect use of string.format
  • Reduce stack consumption further during parsing, hopefully eliminating stack overflows during parsing/compilation

Runtime changes

  • Simplify garbage collection treatment of upvalues, reducing cache misses during sweeping stage and reducing the cost of upvalue assignment (SETUPVAL)
  • Simplify garbage collection treatment of sleeping and alive threads, reducing cache misses during sweeping stage
  • Simplify management of string buffers, removing redundant linked list operations

Community contributions

Note on interpolated strings

Support for interpolated strings is marked as experimental in this release as the syntax is being validated for compatibility with editors and future proposals; to use it in command-line tools, pass --fflags=LuauInterpolatedStringBaseSupport to enable it early.

0.541

18 Aug 22:10
be2769a
Compare
Choose a tag to compare

Analysis changes

  • Fix autocomplete not suggesting globals defined after the cursor (fixes #622)
  • Improve type checker stability

Runtime changes

  • Reduce parser C stack consumption which fixes some stack overflow crashes on deeply nested sources
  • Improve performance of bit32.extract/replace when width is implied (~3% faster chess)
  • Improve performance of bit32.extract when field/width are constants (~10% faster base64)
  • Heap dump now annotates thread stacks with local variable/function names

Community contributions

  • Fix lint.md formatting by @Mactavsin in #637
  • Prevent overflow in lua_newuserdatadtor by @XmiliaH in #639

0.540

11 Aug 21:25
8b390a3
Compare
Choose a tag to compare

Analysis changes

  • Add ComparisonPrecedence lint to warn about erroneous use of not with comparisons, e.g not a == b where a ~= b was intended
  • Several stability and performance improvements in the type checker

Runtime changes

  • Bytecode compiler now emits optimized instruction sequences for multiple assignments, accelerating some benchmarks by 10%
  • Fix reachability analysis for weak keys/values in heapgraph.py
  • Fix CodeGen test failures on big endian architectures

Community contributions

0.539

04 Aug 22:44
1b20fcd
Compare
Choose a tag to compare

Analysis changes

  • Introduce IntegerParsing lint that warns on uses of integer literals that exceed 2^64 (fixes #518)
  • Fix minor inconsistencies in synthesized names for types with metatables

Runtime changes

  • Comparisons with constants are now significantly faster when using clang as a compiler (10-50% gains on internal benchmarks)
  • Luau compiler now emits bytecode with version 3; version 2 is still supported but will be removed in about a month
  • When calling non-existent methods on tables or strings, foo:bar now produces a more precise error message (fixes #255)

Community contributions

0.538

29 Jul 04:33
d3b566c
Compare
Choose a tag to compare

Analysis changes

  • Improve autocomplete behavior in certain cases for : calls

Runtime changes

  • Fix warnings on Xcode 14 beta due to use of sprintf
  • Improve debug.traceback performance by 1.15-1.75x depending on the platform
  • Fix a corner case with table assignment semantics when key didn't exist in the table and __newindex was defined: we now use Lua 5.2 semantics and call __newindex, which results in less wasted space, support for NaN keys in __newindex path and correct support for frozen tables (see #380, #565)

Community contributions

0.537

21 Jul 21:48
b1cfaf5
Compare
Choose a tag to compare

Analysis changes

  • Disable lower bounds calculation mode by default as we're fixing some underlying problems induced by it
  • Disable precise computation of returned types in non-strict mode as it makes non-strict mode too strict
  • Fix type checker stability with upcoming lower bounds calculation mode
  • Fix type checking false positives with optionals & nested tables (fixes #596)
  • Fix type checking false positives in non-strict mode when using generalized iteration

Runtime changes

  • Optimize local reassignment (eg local foo = bar :: type) which is now free if neither local is mutated
  • Minor cleanup in error messages for table operations

Community contributions

0.536

14 Jul 23:03
5b2e39c
Compare
Choose a tag to compare

Analysis changes

  • Fix bugs in type normalization of self-recursive union types
  • Fix interaction between never types and operator type inference
  • Fix type widening for functions that return a union of singleton string types
  • string.match/string.find now return a more precise type if the match pattern is a string literal
  • Type checker now supports passing strings to functions that use a string-like API even if the argument types aren't annotated.

Runtime changes

  • Add support for --!optimize to be able to control optimization level from source
  • Compiler now replaces some calls to builtin functions with a constant if all arguments are known when using -O2
  • Compiler now recognizes builtin calls for the purpose of cost modeling, which improves inlining/unrolling of functions with builtin calls
  • lua_breakpoint can now place the breakpoint after the requested line at the earliest executable location; it returns the line where the breakpoint was placed, or -1 on error.
  • lua_Callbacks::useratom is now called lazily when the atom is requested via lua_tostringatom/lua_namecallatom, instead of eagerly during string construction.

Community contributions

  • Improve description of bit32.extract. by @Anaminus in #585
  • Add lua_setuserdatatag to update userdata tags by @khvzak in #588

0.535

08 Jul 01:36
Compare
Choose a tag to compare

Analysis changes

  • Implement support for unknown / never types (RFC #434)
  • Improve type inference for higher order generic functions
  • Improve type checking for combinations of intersections and generics
  • Fix a bug where type arena ownership invariant could be violated, causing stability issues
  • Fix a bug where internal type error could be presented to the user
  • string.gmatch now infers returned types based on the pattern when using a literal

Runtime changes

  • Fix a bug with negative zero in vector components when using vectors as table keys
  • Slightly reduce interpreter I$ footprint

Community contributions

0.534

01 Jul 00:09
6467c85
Compare
Choose a tag to compare

Analysis changes

  • Fix a bug in parser that erroneously permitted type packs with named elements in generic types, e.g. Foo<(a: number, b: number)> isn't valid syntax
  • Fix a bug in parser that erroneously truncated hexadecimal or binary literals that are longer than 64-bit; these literals are now rejected (#518)

Runtime changes

  • Implement support for __len metamethod for tables, and a rawlen builtin function (RFC #536)
  • Improve performance of iteration through tables

Community contributions

0.533

24 Jun 02:03
e91d80e
Compare
Choose a tag to compare

Analysis changes

  • Fix cases when an internal module name is used in type errors instead of a human-readable equivalent

Runtime changes

  • Add LUAU_EXTERN_C CMake option to simplify uses of Luau via C API from other languages

Community contributions

  • Correct string.find and string.match return types by @Qualadore in #554