luau/VM/src
Hunter Goldstein e0b55a9cb1
Sync to upstream/release/665 (#1732)
Hello all! Another week, another Luau release!

# Change to `lua_setuserdatametatable`

This release fixes #1710: `lua_setuserdatametatable` is being changed so
that it _only_ operates on the top of the stack: the `idx` parameter is
being removed. Prior to this, `lua_setuserdatametable` would set the
metatable of the value in the stack at `idx`, but _always_ pop the top
of the stack. The old behavior is available in this release as
`lua_setuserdatametatable_DEPRECATED`.

# General

This release exposes a generalized implementation of require-by-string's
autocomplete logic. `FileResolver` can now be optionally constructed
with a `RequireSuggester`, which provides an interface for converting a
given module to a `RequireNode`. Consumers of this new API implement a
`RequireNode` to define how modules are represented in their embedded
context, and the new API manages the logic specific to
require-by-string, including providing suggestions for require aliases.
This enhancement moves toward integrating require-by-string's semantics
into the language itself, rather than merely providing a specification
for community members to implement themselves.

# New Type Solver
* Fixed a source of potential `Luau::follow detected a Type cycle`
internal compiler exceptions when assigning a global to itself.
* Fixed an issue whereby `*no-refine*` (a type which should not be
visible at the end of type checking) was not being properly elided,
causing inference of class-like tables to become unreadable / induce
crashes in autocomplete.
* Fixed a case of incomplete constraint solving when performing basic
math in a loop

# Fragment Autocomplete
* Fixed several crashes related to not properly filling in scope
information for the fragments
* Fixed a source of memory corruption by isolating the return type of a
fragment when it is type checked.
* Improved performance by opting not to clone persistent types for the
fragment (e.g.: built in types)
 
# Internal Contributors
Co-authored-by: Andy Friesen <afriesen@roblox.com>
Co-authored-by: Hunter Goldstein <hgoldstein@roblox.com>
Co-authored-by: Talha Pathan <tpathan@roblox.com>
Co-authored-by: Varun Saini <vsaini@roblox.com>
Co-authored-by: Vighnesh Vijay <vvijay@roblox.com>
Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com>

---------

Co-authored-by: Varun Saini <61795485+vrn-sn@users.noreply.github.com>
Co-authored-by: Alexander Youngblood <ayoungblood@roblox.com>
Co-authored-by: Menarul Alam <malam@roblox.com>
Co-authored-by: Aviral Goel <agoel@roblox.com>
Co-authored-by: Vighnesh <vvijay@roblox.com>
Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com>
Co-authored-by: Ariel Weiss <aaronweiss@roblox.com>
2025-03-14 13:11:24 -07:00
..
lapi.cpp Sync to upstream/release/665 (#1732) 2025-03-14 13:11:24 -07:00
lapi.h Sync to upstream/release/501 (#20) 2021-11-01 14:52:34 -07:00
laux.cpp Sync to upstream/release/661 (#1664) 2025-02-14 13:57:46 -08:00
lbaselib.cpp Sync to upstream/release/539 (#625) 2022-08-04 15:35:33 -07:00
lbitlib.cpp Sync to upstream/release/637 (#1354) 2024-08-02 07:30:04 -07:00
lbuffer.cpp Sync to upstream/release/600 (#1076) 2023-10-20 18:10:30 -07:00
lbuffer.h Sync to upstream/release/600 (#1076) 2023-10-20 18:10:30 -07:00
lbuflib.cpp Sync to upstream/release/663 (#1699) 2025-02-28 14:42:30 -08:00
lbuiltins.cpp Sync to upstream/release/663 (#1699) 2025-02-28 14:42:30 -08:00
lbuiltins.h Sync to upstream/release/551 (#727) 2022-10-28 03:37:29 -07:00
lbytecode.h Sync to upstream/release/529 (#505) 2022-05-26 15:08:16 -07:00
lcommon.h Sync to upstream/release/539 (#625) 2022-08-04 15:35:33 -07:00
lcorolib.cpp Sync to upstream/release/655 (#1563) 2024-12-13 13:02:30 -08:00
ldblib.cpp Sync to upstream/release/659 (#1637) 2025-01-31 18:58:36 -08:00
ldebug.cpp Sync to upstream/release/658 (#1625) 2025-01-24 12:15:19 -08:00
ldebug.h Sync to upstream/release/658 (#1625) 2025-01-24 12:15:19 -08:00
ldo.cpp Sync to upstream/release/656 (#1612) 2025-01-10 11:34:39 -08:00
ldo.h Sync to upstream/release/656 (#1612) 2025-01-10 11:34:39 -08:00
lfunc.cpp Sync to upstream/release/657 (#1619) 2025-01-17 14:55:39 -08:00
lfunc.h Sync to upstream/release/657 (#1619) 2025-01-17 14:55:39 -08:00
lgc.cpp Sync to upstream/release/657 (#1619) 2025-01-17 14:55:39 -08:00
lgc.h Sync to upstream/release/657 (#1619) 2025-01-17 14:55:39 -08:00
lgcdebug.cpp Sync to upstream/release/657 (#1619) 2025-01-17 14:55:39 -08:00
linit.cpp Sync to upstream/release/650 (#1502) 2024-11-01 12:06:07 -07:00
lmathlib.cpp Sync to upstream/release/663 (#1699) 2025-02-28 14:42:30 -08:00
lmem.cpp Sync to upstream/release/657 (#1619) 2025-01-17 14:55:39 -08:00
lmem.h Sync to upstream/release/622 (#1232) 2024-04-19 14:48:02 -07:00
lnumprint.cpp Sync to upstream/release/615 (#1175) 2024-03-01 10:45:26 -08:00
lnumutils.h Sync to upstream/release/650 (#1502) 2024-11-01 12:06:07 -07:00
lobject.cpp Sync to upstream/release/652 (#1525) 2024-11-15 14:29:30 -08:00
lobject.h Sync to upstream/release/657 (#1619) 2025-01-17 14:55:39 -08:00
loslib.cpp Sync to upstream/release/603 (#1097) 2023-11-10 13:10:07 -08:00
lperf.cpp Make os.clock use clock_gettime on FreeBSD (#1364) 2024-08-14 08:31:59 -07:00
lstate.cpp Sync to upstream/release/656 (#1612) 2025-01-10 11:34:39 -08:00
lstate.h Sync to upstream/release/657 (#1619) 2025-01-17 14:55:39 -08:00
lstring.cpp Sync to upstream/release/611 (#1160) 2024-02-02 13:32:42 -08:00
lstring.h Sync to upstream/release/539 (#625) 2022-08-04 15:35:33 -07:00
lstrlib.cpp Sync to upstream/release/661 (#1664) 2025-02-14 13:57:46 -08:00
ltable.cpp Sync to upstream/release/657 (#1619) 2025-01-17 14:55:39 -08:00
ltable.h Sync to upstream/release/657 (#1619) 2025-01-17 14:55:39 -08:00
ltablib.cpp Sync to upstream/release/657 (#1619) 2025-01-17 14:55:39 -08:00
ltm.cpp Sync to upstream/release/657 (#1619) 2025-01-17 14:55:39 -08:00
ltm.h Sync to upstream/release/657 (#1619) 2025-01-17 14:55:39 -08:00
ludata.cpp Add lua_getuserdatadtor (#870) 2023-04-11 12:46:55 -07:00
ludata.h Sync to upstream/release/539 (#625) 2022-08-04 15:35:33 -07:00
lutf8lib.cpp Sync to upstream/release/637 (#1354) 2024-08-02 07:30:04 -07:00
lveclib.cpp Sync to upstream/release/663 (#1699) 2025-02-28 14:42:30 -08:00
lvm.h Sync to upstream/release/657 (#1619) 2025-01-17 14:55:39 -08:00
lvmexecute.cpp Sync to upstream/release/657 (#1619) 2025-01-17 14:55:39 -08:00
lvmload.cpp Sync to upstream/release/657 (#1619) 2025-01-17 14:55:39 -08:00
lvmutils.cpp Sync to upstream/release/657 (#1619) 2025-01-17 14:55:39 -08:00