Releases: luau-lang/luau
Releases · luau-lang/luau
0.542
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
- Pass environment scope to autocomplete typechecker by @JohnnyMorganz in #610
- String interpolation by @Kampfkarren in #614
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
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
0.540
Analysis changes
- Add ComparisonPrecedence lint to warn about erroneous use of
not
with comparisons, e.gnot a == b
wherea ~= 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
- Add autocomplete context to result by @JohnnyMorganz in #611
0.539
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
- Add Ctrl-C handling to the REPL by @jaykru in #537
- Add %* format specifier by @Kampfkarren in #619
0.538
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
- Store AstExprFunction in astTypes for stats by @JohnnyMorganz in #612
0.537
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
- Documentation of round tie-breaking by @memery-rbx in #602
0.536
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 vialua_tostringatom
/lua_namecallatom
, instead of eagerly during string construction.
Community contributions
0.535
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
- Fix op used when stringifying AstExprIndexName by @JohnnyMorganz in #572
- Store resolved types in
astResolvedTypes
by @JohnnyMorganz in #574 - Use syntheticName for stringified MetatableTypeVar by @JohnnyMorganz in #563
0.534
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 arawlen
builtin function (RFC #536) - Improve performance of iteration through tables
Community contributions
0.533
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