Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@vrn-sn
Copy link
Member

@vrn-sn vrn-sn commented May 22, 2025

General

  • Introduce Frontend::parseModules for parsing a group of modules at once.
  • Support chained function types in the CST.

New Type Solver

  • Enable write-only table properties (described in this RFC).
  • Disable singleton inference for large tables to improve performance.
  • Fix a bug that occurs when we try to expand a type alias to itself.
  • Catch cancelation during the type-checking phase in addition to during constraint solving.
  • Fix stringification of the empty type pack: ().
  • Improve errors for calls being rejected on the primitive function type.
  • Rework generalization: We now generalize types as soon as the last constraint relating to them is finished. We think this will reduce the number of cases where type inference fails to complete and reduce the number of instances where *blocked* types appear in the inference result.

VM/Runtime

  • Dynamically disable native execution for functions that incur a slowdown (relative to bytecode execution).
  • Improve names for thread/closure/proto in the Luau heap dump.

Co-authored-by: Andy Friesen [email protected]
Co-authored-by: Ariel Weiss [email protected]
Co-authored-by: Aviral Goel [email protected]
Co-authored-by: Hunter Goldstein [email protected]
Co-authored-by: Talha Pathan [email protected]
Co-authored-by: Varun Saini [email protected]
Co-authored-by: Vighnesh Vijay [email protected]
Co-authored-by: Vyacheslav Egorov [email protected]

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.
vrn-sn and others added 26 commits April 11, 2025 17:24
\# General

* Expose an optional `get_alias` API as an alternative to `get_config` in Luau.Require and Luau.RequireNavigator.
* Improve the Luau CLI's virtual filesystem implementation to fix bugs related to `init.luau`. Fixes #1816

\# New Type Solver

* Avoid double reporting errors when erroneous arguments are provided to
  type functions.
* Fix some instances of unresovable cyclic type functions in loops by only considering the first loop cycles. This results in some type inference inaccuracies when the type of a variable in loop through multiple iterations. Fixes #1413.
* Better generalize free types that have meaningful lower and upper bounds, especially for table indexers.
* Instead of highling the entire table, we now report more specific errors when assigning or returning table literal types.
* Inference for functions with generic type packs is greatly improved.
* Fix some internal compiler exceptions when using type-stating functions like `table.freeze` in `if _ then _ else _` expressions and short circuiting binary operations.
* More consistently simplify unions of primitive types, especially in array-like and dictionary-like tables.
* Fix a crash when type checking an erroneous type alias containing `typeof` with a type assertion expression, as in:
  ```
  type MyTable = {}
  -- This will error at type checking time as it's a duplicate
  type MyTable = typeof(setmetatable(SomeTable :: {}, SomeMetaTable));
  ```
* Fix a crash when inferring the type of an index expression where the indexee is invalid (e.g. `nil`).

\# Runtime
* Avoid throwing an exception from `luau_load` if we run out of memory.
* Type functions are no longer compiled and included in bytecode.
* Fix some instances of Luau C API functions reading invalid debug information (generally when the first or last instruction of a block was being inspected).
* Avoid potential signed integer overflow when doing bounds checks on tables.
* Support 16 byte aligned userdata objects when system allocation alignment is also 16 bytes
@hgoldstein hgoldstein merged commit 5965818 into master May 27, 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

Development

Successfully merging this pull request may close these issues.

9 participants