Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync to upstream/release/663 #1699

Merged
merged 34 commits into from
Feb 28, 2025
Merged

Sync to upstream/release/663 #1699

merged 34 commits into from
Feb 28, 2025

Conversation

aatxe
Copy link
Collaborator

@aatxe aatxe commented Feb 28, 2025

Hey folks, another week means another Luau release! This one features a number of bug fixes in the New Type Solver including improvements to user-defined type functions and a bunch of work to untangle some of the outstanding issues we've been seeing with constraint solving not completing in real world use. We're also continuing to make progress on crashes and other problems that affect the stability of fragment autocomplete, as we work towards delivering consistent, low-latency autocomplete for any editor environment.

New Type Solver

  • Fix a bug in user-defined type functions where print would incorrectly insert \1 a number of times.
  • Fix a bug where attempting to refine an optional generic with a type test will cause a false positive type error (fixes Type function instance intersect<T?, ~(false?)> is uninhabited #1666)
  • Fix a bug where the refine type family would not skip over *no-refine* discriminants (partial resolution for Solver fails in case of narrowing known type against truthy values #1424)
  • Fix a constraint solving bug where recursive function calls would consistently produce cyclic constraints leading to incomplete or inaccurate type inference.
  • Implement readparent and writeparent for class types in user-defined type functions, replacing the incorrectly included parent method.
  • Add initial groundwork (under a debug flag) for eager free type generalization, moving us towards further improvements to constraint solving incomplete errors.

Fragment Autocomplete

  • Ease up some assertions to improve stability of mixed-mode use of the two type solvers (i.e. using Fragment Autocomplete on a type graph originally produced by the old type solver)
  • Resolve a bug with type compatibility checks causing internal compiler errors in autocomplete.

Lexer and Parser

  • Improve the accuracy of the roundtrippable AST parsing mode by correctly placing closing parentheses on type groupings.
  • Add a getter for offset in the Lexer by @aduermael in Lexer: add offset getter #1688
  • Add a second entry point to the parser to parse an expression, parseExpr

Internal Contributors

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: James McNellis [email protected]
Co-authored-by: Talha Pathan [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.
@aatxe aatxe merged commit 640ebbc into master Feb 28, 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.

Type function instance intersect<T?, ~(false?)> is uninhabited
8 participants