Skip to content

Releases: luau-lang/luau

0.507

10 Dec 23:27
f2e6a8f
Compare
Choose a tag to compare

Analysis changes

  • Type ascription (::) now permits casts between related types in both directions, allowing to refine or loosen the type (RFC #56)
  • Fix type definition for tonumber to return number? since the input string isn't guaranteed to contain a valid number
  • Fix type refinements for field access via []
  • Many stability fixes for type checker
  • Provide extra information in error messages for type mismatches in more cases
  • Improve performance of type checking for large unions when union members are string literals

Runtime changes

  • Fix some C APIs like lua_equal or lua_getfield triggering GC assertions in presence of metatables
  • Add lua_getcoverage API for code coverage collection
  • Improve performance of truthiness checks in some cases, particularly on Apple M1, resulting in 10-25% perf gains on qsort benchmark depending on the CPU/compiler
  • Fix support for little-endian systems; IBM s390x here we go!

CLI changes

  • Add coverage reporting support to Repl (--coverage command line argument)
  • Add shebang support by @Rerumu in #149
  • Work around code signing issues during Makefile builds on macOS

Community contributions

0.506

03 Dec 06:58
32fb6d1
Compare
Choose a tag to compare

Changes

  • Fix some cases where type checking would overflow the native stack
  • Improve autocomplete behavior when assigning a partially written function call (not currently exposed through command line tools)
  • Improve autocomplete type inference feedback for some expressions where previously the type would not be known
  • Improve quantification performance during type checking for large types
  • Improve type checking for table literals when the expected type of the table is known because of a type annotation
  • Fix type checking errors in cases where required module has errors in the resulting type
  • Fix debug line information for multi-line chained call sequences (#255)
  • lua_ref can no longer be used with LUA_REGISTRYINDEX to prevent mistakes when migrating Lua FFI (#247)
  • Fix assertions and possible crashes when executing script code indirectly via metatable dispatch from lua_equal/lua_lessthan/lua_getfield/etc. (#259)
  • Fix flamegraph scripts to run under Python 2

Community contributions

Breaking changes

This release introduces a small breaking change in lua.h (only relevant for embedders) to improve compatibility with Lua/LuaJIT:

  • lua_newuserdata now takes 2 arguments; lua_newuserdatatagged should be used if the third argument was non-0.

0.505

19 Nov 16:14
3f1508c
Compare
Choose a tag to compare

Changes

  • Improve error recovery during type checking
  • Initial (not fully complete) implementation for singleton types (RFC #37)
  • Implement a C-friendly interface for compiler (luacode.h)
  • Remove C++ features from lua.h (removed default arguments from luau_load and lua_pushcfunction)
  • Fix lua_breakpoint behavior when enabled=false
  • Implement coroutine.close (RFC #88)

Community Contributions

Breaking changes

This release introduces small breaking changes in lua.h (only relevant for embedders):

  • luau_load env argument is now required, pass an extra 0
  • lua_pushcfunction now must be called with 3 arguments; if you were calling it with 2 arguments, pass an extra NULL; if you were calling it with 4, use lua_pushcclosure.

These changes are necessary to make sure lua.h can be used from pure C - the future release will make it possible by adding an option to luaconf.h to change function name mangling to be C-compatible. We don't anticipate breaking the FFI interface in the future, but this change was necessary to restore C compatibility.

0.504

12 Nov 15:08
d11e827
Compare
Choose a tag to compare

Changes

  • Type mismatch errors now show detailed information for compound types, highlighting the mismatching component
  • Fix string.pack bug on ARM when packing negative numbers using unsigned formats (#171)
  • Implement bit32.countlz/countrz (RFC #89)
  • Minor compiler throughput optimization (~2% faster compilation)
  • Improve transpiler behavior for edge cases and better test coverage (not exposed through CLI at the moment)
  • Improve error recovery when parsing invalid assignments
  • Build fixes for fuzzing targets
  • Add lua_getthreaddata/lua_setthreaddata to be able to associate custom data with coroutines

Community contributions

0.503

05 Nov 16:23
279855d
Compare
Choose a tag to compare

Changes

  • Support for time tracing for analysis/compiler (not currently exposed through CLI)
  • Support for type pack arguments in type aliases (RFC: Type alias type packs #83)
  • Basic support for require(path) in luau-analyze
  • Add a lint warning for table.move with 0 index as part of TableOperation lint
  • Remove last STL dependency from Luau.VM
  • Minor VS2022 performance tuning
  • Major optimizations to type checking performance on complex programs/types (up to two orders of magnitude speedup for programs
    involving huge tagged unions)
  • Fix a few issues encountered by UBSAN
  • Fix gcc-11 test builds
  • Fix a rare corner case where luau_load wouldn't wake inactive threads which could result in a use-after-free due to GC

Community contributions

0.501

03 Nov 16:48
e997a4c
Compare
Choose a tag to compare

First open-source release 🎉