Skip to content

Conversation

@SPY
Copy link
Contributor

@SPY SPY commented Nov 14, 2025

We have reached release 700!

Analysis

  • table.isfrozen and table.clear use {} instead of generic table type to make it work with union of table types.
  • Relax typing definitions for types.newtable to make it easier to specify read-only table properties
  • Do not drop explicit generic type packs. Hopefully fixes New solver: Can't seem to accept function of arbitrary return type #2075
  • Added protection against stack overflows to more spots in Unifier2
  • Improved bidirectionally inferring lambdas. When performing inference on a lambda, check right before we attempt to emplace a free type whether there's a generic.
  • Reworked overload resolution interface. OverloadResolver::resolveOverload was introduced to abstract and unify existing resolving machinery.
  • instantiation2 selects more useful bounds.
    • If we have positive or negative polarity, blindly use the upper/lower bounds respectively.
    • Otherwise, attempt to find a reasonable bound by first avoiding picking never or unknown, then doing a subtype test to try to pick a tight bound.
  • Added protection against stack overflows to the non-strict type checker
  • Luau-syntax configuration extraction can now be timed out during analysis. See CLI/src/Analyze.cpp for an example.

Require

Autocomplete

  • Do not recommend generic types for anonymous functions being passed as arguments

Co-authored-by: Andy Friesen afriesen@roblox.com
Co-authored-by: Annie Tang annietang@roblox.com
Co-authored-by: Ariel Weiss arielweiss@roblox.com
Co-authored-by: Hunter Goldstein hgoldstein@roblox.com
Co-authored-by: Varun Saini vsaini@roblox.com

hgoldstein and others added 30 commits January 10, 2025 09:13
Note: Fixed conflicts by hand in:
- Analysis/src/ConstraintGenerator.cpp
- CodeGen/src/OptimizeConstProp.cpp
- VM/src/lmathlib.cpp
- tests/Conformance.test.cpp
a03c92095f6 #unflagged CLI-141149 Added lua_clonetable (#97902)
d66c43f36aa #flagged CLI-140903: Do not crash on duplicate keys in table literals (#97833)
8a2687f1690 #nonprod Luau: fix a test configuration issue breaking OSS CI. (#97878)
7add6d9dde9 #nojira CI-debugger revert #unflagged CLI-132461 Luau: refactor subtyping to also include the generic mapping it came up with. (#97872)
0c731fd3cc4 #flag-removal Clip `LuauNewSolverVisitErrorExprLvalues` (#96942)
2fe783b9615 #unflagged CLI-132461 Luau: refactor subtyping to also include the generic mapping it came up with. (#97803)
0cc41a0afae #unflagged CLI-141053 Luau buffer readbits/writebits implementation for big endian machines (#97826)
ae50bf04f99 #nonprod CLI-140027 Simplify require-by-string path resolution, fix bug when running CLI tools on unprefixed path (#97468)
77004599a6f #flag-removal Cleanup Luau VM and Compiler flags (#97799)
86777e269dd #flag-removal Remove LuauUserTypeFunPrintToError, LuauUserTypeFunNoExtraConstraint, LuauUserTypeFunUpdateAllEnvs, LuauUserTypeFunThreadBuffer and LuauUserTypeFunExportedAndLocal (#97624)
349b133fdc4 #nojira CI-debugger revert #unflagged CLI-132461 Luau: refactor subtyping to also include the generic mapping it came up with. (#97759)
2e820646ffa #flagged CLI-139615: Treat user defined type functions as opaque in eqSatSimplify (#96897)
c0845205e37 #flag-removal CLI-140688 Clean up `FFlagLuauIntersectNormalsNeedsToTrackResourceLimits` as `true`. (#97719)
3e07876a043 #flagged CLI-140571: Track interior free table types generated during constraint solving (#97498)
199b558dc36 #unflagged CLI-132461 Luau: refactor subtyping to also include the generic mapping it came up with. (#95646)
fd9255f62d3 #nonprod CLI-140762 unittest for fragment ac crash (#97669)
e9c710e017f #flag-removal FFlagLuauStoreCommentsForDefinitionFiles (#93359)
b184b940d55 CLI-140702 #unflagged Fix most clang-tidy warnings in TypeChecker2 (#97604)
1fc857f1bb3 CLI-140489 #unflagged Fix a potential hash collision bug in StringCache. (#97539)
58f62f900a2 #nonprod Some new unit testing macros for Luau tests. (#97336)
ab43a354b25 #flag-removal Remove LuauVectorMetatable and LuauVectorDefinitionsExtra (#97528)
c4c28694390 #flagged CLI-140485 Do not retain the Def/RefinementKey arenas when retainFullTypeGraphs is false (#97422)
This test fails due to a bad interaction when `FFlagLuauStoreCSTData` is
enabled, whilst `FFlagLexerFixInterpStringStart` is disabled.
The OSS test suite, when run with `--fflags=true`, enables all
flags starting with a `Luau` prefix, but does not enable any other flag.

To resolve this, we explicitly enable both fflags for the failing
interpolated string test cases. As a consequence, we technically lose
the check that these tests pass when all flags are disabled.
vegorov-rbx and others added 24 commits October 3, 2025 17:00
Hello all! Another week, another release!

* Fixed `table.clone` in the old solver to ensure intersections of tables were being entirely cloned: prior only the _first_ table in the intersection would be copied:
```
type FIRST = { some: string }
type SECOND = FIRST & { thing: string }
local b: SECOND
-- c's type used to be FIRST, but should be the full type of SECOND
local c = table.clone(b)
```
* Fixed `table.clone` in the old solver to be more permissive and treat a variadic return as having _at least_ one element. This works around some unfortunate behavior in the old solver version of nonstrict mode, see:
```
-- A.luau
--!nonstrict
return function()
    return {}
end
-- B.luau
local A = require("A")
-- This line would previously error as `A` has type `() -> (...any)`, so
-- we might not be providing enough parameters to `table.clone`.
local _ = table.clone(A())
```
* Fixed a bug in the new solver where error suppression was not kicking in for indexing, as in:
```
local function f(value: any)
    if value ~= nil then
        for k = 1, #value do
            -- Previously this would not error, claiming you cannot index into a `*error-type* | ~nil`
            local _ = value[k]
        end
    end
end
```
* Fix `getmetatable` in the new solver to accept `*error-type*` and `table` as valid type inputs.
* Changed how error reporting for invalid `for ... in` loops works: for now this may result in slightly worse error messages (see the example below), but should mean error suppression is more consistent going forward:
```
function my_iter(state: string, index: number)
    return state, index
end
local my_state = {}
local first_index = "first"
-- Prior we would claim `my_state` and `first_index` are the incorrect types,
-- now we claim that `my_iter` is of the incorrect type, which is still true
-- but less helpful.
for a, b in my_iter, my_state, first_index do
end
```

* Introduced `lua_rawgetptagged` and `lua_rawsetptagged`, as well as Lua 5.2+ compatibility macros `lua_rawgetp` and `lua_rawsetp`, to be able to perform lookups into tables using tagged or untagged `lightuserdata` without additional calls and stack manipulation. This enables a more efficient lookup way for `lightuserdata` keys similar to how `lua_rawgetfield` and `lua_rawgeti` avoid extra operations for their corresponding types.
@SPY SPY requested review from hgoldstein and vrn-sn November 14, 2025 20:39
@SPY SPY merged commit 282ddfa into master Nov 14, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

luau-lsp 1.56.0 hangs when resolving .config.luau files that do not complete New solver: Can't seem to accept function of arbitrary return type

10 participants