Releases: luau-lang/luau
Releases · luau-lang/luau
0.522
Analysis changes
- Improve type checking stability for programs with module cycles in case when modules are being changed and rechecked in an IDE
- Fix type checking of array literals when the type is supposed to be a dictionary (#423)
- Improve syntax error message when
...
is used after a type unexpectedly
Runtime changes
- Improve branch optimizations when the branch condition is
X and Y
orX or Y
where X is known at compile time
Community contributions
None this week; PRs are always welcome!
0.521
Analysis changes
- Fix type checking of function definitions that define a table field that was declared via a type annotation
- Fix AST line/column information for type aliases followed by a comment
Runtime changes
luau_load
now requires the bytecode version 2 (enabled since 0.509); old bytecode blobs need to be recompiled from source- Tables now maintain a new boundary invariant: when #t != 0, element #t is located inside the array part of the table. This results in a more consistent iteration order with pairs, and allows for better optimizations in various parts of the runtime in the future. As part of this, computing #t is now worst-case O(logn), amortized O(1).
Community contributions
None this week; PRs are always welcome!
0.520
Analysis changes
- Improve type errors when types from different modules have the same name
- Improve type errors for argument count mismatch when the function is variadic
- Improve type error explanation for table indexer type mismatches
- Remove legacy Roblox-specific warnings from UnknownType lint
- Significantly improve type checking performance for programs that have type errors with complex types
Runtime changes
- Slightly reduce the GC overhead by excluding metrics collection by default
- Significantly improve pcall/resume performance on macOS when LUA_USE_LONGJMP is used (#425)
Community contributions
None this week; PRs are always welcome!
0.519
Analysis changes
- Fix pointer identity issues with declared global types (fixes #409)
- Improve autocomplete for self calls (via
:
) - Fix type checking of function definitions when extending a table with string indexer
- Fix some cases when
any
type wasn't treated as optional by the type checker - Fix some interactions with discriminable unions during type checking
- Improve type checking stability
Runtime changes
- Add C API to access memory category information (
lua_setmemcat
andlua_totalbytes
) for memory profiling - Fix
typeof()
semantics for untagged host-exposed user data: nowtypeof()
returns__type
metafield for all host-exposed userdata (but not userdata created vianewproxy()
) - Fix definition of
lua_clonefunction
whenLUA_API
was customized in the build process (fixes #411) - Fix 32-bit Windows builds when using clang-cl (fixes #421)
- Optimize table rehashing (~15% faster dictionary table resize on average)
Community contributions
- Support yielding from interrupt callbacks #287 by @morgoth990 in #413
0.518
Analysis changes
- Fix crashes when typechecking some
setmetatable
calls - Fix incorrect line number in "duplicate type" type error
- Fix incorrect type errors in certain variadic/generic functions like
pcall
- Improve error messages for argument count mismatches in variadic functions
- Improve type checking stability
Runtime changes
- Remove
LUAI_GC*
parameters fromluaconf.h
; applications that need to tune them must do so by callinglua_gc
luaL_typename
now follows the logic oftypeof
(which means it supports__type
metafields for userdata); to get a string-based representation of a type, uselua_type
to get an integer representation andlua_typename
to convert it to a string
Community contributions
None this week; PRs are always welcome!
0.517
Analysis changes
- Fix type definition for
table.freeze
to be more generic - Fix an edge case when type checking result was dependent on the type pointer values
- Fix a bug in type checking that would sometimes lead to modification of generic type definitions
- Fix a bug in type checking that could lead to extension of sealed tables in rare cases
- Improve "global is used as local" lint to flag uses of global values that are contained to a function more often
Runtime changes
- Implement
table.clone
(#362) - Add
lua_stackdepth
C API to query the number of entries in the call stack - Improve performance of freeing tables (~5% lift on some GC benchmarks)
Community contributions
None this week; PRs are always welcome!
0.516
Analysis changes
- Fix type checking in branches when values were compared to string literals
- Fix type checking for property access of unions of tables in some cases
Runtime changes
- Fully enable the new paged sweeper, which improves GC sweeping throughput by 2-3x and reduces allocation overhead by 16 bytes/object on 64-bit platforms
Community contributions
- Fix grammar documentation by @TheGreatSageEqualToHeaven in #379
- Lua API: add return types to table getters by @petrihakkinen in #389
Breaking changes
This release introduces a small breaking change in lua.h (only relevant for embedders) to improve compatibility with Lua/LuaJIT:
- Remove
lua_State*
argument fromlua_Alloc
callback (used bylua_newstate
)
0.515
Analysis changes
- Add CommentDirective lint to warn on misspelled directives (comments that start with !)
- Fix return type annotation for
table.move
- Fix type checker hanging due to recursive metatables (#365)
Runtime changes
- Reduce size of coroutines by 24 bytes
- Optimize
coroutine.close
to skip stack reallocation in certain cases - Fix unity (amalgamated) builds (#262)
- Add .natvis files for easier VM debugging in Visual Studio
CLI changes
- Implement support for metatables in Repl Tab completion
- Fix function line numbers in code coverage reports
Community contributions
None this week; PRs are always welcome!
0.514
Analysis changes
- Implement MisleadingAndOr lint to detect cases where and-or expression always evaluates to the last argument
- Improve detection of deprecated APIs for table members
- Improve stability and performance of cross-module type checking for large graphs
- Fix type checking of type aliases that have been forward declared
- Fix type checking of method calls on string literal types
Runtime changes
- Fix an off-by-one bug in
select(_, ...)
optimization - Fix heap dump interaction with paged sweeper
CLI changes
- Add -gN argument to luau CLI to specify debug information level
- Fix stack/heap leaks in Tab completion in CLI
Community contributions
- Add a build option to link with the static CRT by @mikejsavage in #343
0.513
Analysis changes
- Type checker now knows that
assert(x)
can't returnnil
(#336) - Fixes incorrect reuse of generic types across different function declarations (#332)
- Improve type checker stability when working with multiple modules
- Improve type checker stability for deeply nested expressions and complex type hierarchies
Runtime changes
- Fix the optimization for
select(_, ...)
to work for negative indices
CLI changes
- Repl now uses isocline which supports better color output and improves editing experience
Community contributions
None this week; PRs are always welcome!