Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
202 commits
Select commit Hold shift + click to select a range
765591c
Sync to origin/release/656
hgoldstein Jan 10, 2025
a0ed331
Merge branch 'upstream' into merge
hgoldstein Jan 10, 2025
ba71ff1
Explicitly cast size_t to uint64_t in buffer_readbits / buffer_writebits
hgoldstein Jan 10, 2025
aaaeae5
Sync to upstream/release/657
vrn-sn Jan 17, 2025
790dc17
Merge branch 'master' into merge
vrn-sn Jan 17, 2025
c6e2b53
Merge branch 'upstream' into merge
vrn-sn Jan 17, 2025
76e0958
Include <algorithm> and <vector> in IrUtils.cpp
vrn-sn Jan 17, 2025
23241e2
Sync to upstream/release/658
ayoungbloodrbx Jan 24, 2025
6167275
Merge branch 'master' into merge
ayoungbloodrbx Jan 24, 2025
ec5643d
Merge branch 'upstream' into merge
ayoungbloodrbx Jan 24, 2025
768a3a2
Remove duplicate flag
ayoungbloodrbx Jan 24, 2025
c31654d
Move duplicate flag back
ayoungbloodrbx Jan 24, 2025
072195b
Merge branch 'master' into merge
menarulalam Feb 1, 2025
5f0bd2f
Sync to upstream/release/659
menarulalam Feb 1, 2025
a699a21
Merge branch 'upstream' into merge
menarulalam Feb 1, 2025
a3630ef
Merge branch 'upstream' into merge
menarulalam Feb 1, 2025
df60533
Sync to upstream/release/659
menarulalam Feb 1, 2025
7199da8
Sync to upstream/release/660
Feb 7, 2025
fd9b8b0
Merge branch 'master' into merge
Feb 7, 2025
198c1f7
Merge branch 'upstream' into merge
Feb 7, 2025
6b30374
Cast types appropriately to fix compilation error.
Feb 7, 2025
d17d70d
Merge branch 'upstream' into merge
Feb 7, 2025
c9a4113
Explicitly enable FFlags in interpolated string Transpiler tests
Feb 8, 2025
587cf13
Sync to upstream/release/661
Vighnesh-V Feb 14, 2025
aab18f3
Merge branch 'master' into merge
Vighnesh-V Feb 14, 2025
1d001c4
Merge branch 'upstream' into merge
Vighnesh-V Feb 14, 2025
69afd59
Correctly apply unsigned casting patch to merge branch
Vighnesh-V Feb 14, 2025
279e15a
Sync to upstream/release/662
vegorov-rbx Feb 21, 2025
1c3720a
Merge branch 'master' into merge
vegorov-rbx Feb 21, 2025
4717228
Merge branch 'upstream' into merge
vegorov-rbx Feb 21, 2025
6a8da81
Merge fix
vegorov-rbx Feb 21, 2025
b6ca2a0
Sync to upstream/release/663
aatxe Feb 28, 2025
4b3b32a
Merge branch 'master' into merge
aatxe Feb 28, 2025
f43ebc2
Merge branch 'upstream' into merge
aatxe Feb 28, 2025
7568957
Sync to upstream/release/664
vegorov-rbx Mar 7, 2025
a0fad72
Merge branch 'master' into merge
vegorov-rbx Mar 7, 2025
23bc546
Merge branch 'upstream' into merge
vegorov-rbx Mar 7, 2025
af20253
Sync to upstream/release/665
hgoldstein Mar 14, 2025
df92b6c
Merge branch 'master' into merge
hgoldstein Mar 14, 2025
de3f3d2
Merge branch 'upstream' into merge
hgoldstein Mar 14, 2025
2eefa3f
Sync to upstream/release/666
vrn-sn Mar 21, 2025
a371d16
Merge branch 'master' into merge
vrn-sn Mar 21, 2025
716f524
Merge branch 'upstream' into merge
vrn-sn Mar 21, 2025
d4c2c64
Sync to upstream/release/667
ayoungbloodrbx Mar 28, 2025
9ae5f37
Merge branch 'master' into merge
ayoungbloodrbx Mar 28, 2025
08f07a1
Merge branch 'upstream' into merge
ayoungbloodrbx Mar 28, 2025
d9e8ded
Sync to upstream/release/668
Apr 4, 2025
f85407b
Merge branch 'master' into merge
Apr 4, 2025
6e90f90
Merge branch 'upstream' into merge
Apr 4, 2025
d2969f0
Disable failing tests until fixes have been found.
Apr 4, 2025
7a6b561
Sync to upstream/release/669
menarulalam Apr 11, 2025
c3f6c48
Merge branch 'master' into merge
menarulalam Apr 11, 2025
567876e
Merge branch 'upstream' into merge
menarulalam Apr 11, 2025
afaceca
Add missing MIT License header
vrn-sn Apr 11, 2025
8f61efb
Make RequireNavigator depend on Config (hacky, will improve later)
vrn-sn Apr 12, 2025
217c14d
Sync to upstream/release/670
Vighnesh-V Apr 18, 2025
3d1ac20
Merge branch 'master' into merge
Vighnesh-V Apr 18, 2025
2f6fb98
Merge branch 'upstream' into merge
Vighnesh-V Apr 18, 2025
500f8d4
update test cases to use NonReentrantGeneralization2
Vighnesh-V Apr 18, 2025
2b7a89d
Sync to upstream/release/671
andyfriesen Apr 25, 2025
e9ef63d
Merge branch 'master' into merge
andyfriesen Apr 25, 2025
1b78172
Merge branch 'upstream' into merge
andyfriesen Apr 25, 2025
18b36c1
Delete .clang-tidy
andyfriesen Apr 25, 2025
3adf258
Sync to upstream/release/672
aatxe May 2, 2025
7d27130
Merge branch 'master' into merge
aatxe May 2, 2025
27a8fd0
Merge branch 'upstream' into merge
aatxe May 2, 2025
335ec70
Sync to upstream/release/673
andyfriesen May 9, 2025
0e65d3f
Merge branch 'master' into merge
andyfriesen May 9, 2025
209ae16
Merge branch 'upstream' into merge
andyfriesen May 9, 2025
7975c23
Sync to upstream/release/674
hgoldstein May 16, 2025
514848a
Merge branch 'master' into merge
hgoldstein May 16, 2025
bd532d1
Merge branch 'upstream' into merge
hgoldstein May 16, 2025
aecc30f
Disable non-reentrant generalization in 'fuzz_propagate_normalization…
hgoldstein May 16, 2025
74fac86
Just disable 'fuzz_propagate_normalization_failures' for now
hgoldstein May 16, 2025
2d961d6
Also disable 'fuzz_limit_function_intersection_complexity', for now
hgoldstein May 16, 2025
f85750a
Sync to upstream/release/675
vrn-sn May 22, 2025
93b10c9
Merge branch 'master' into merge
vrn-sn May 22, 2025
ce8c20f
Merge branch 'upstream' into merge
vrn-sn May 22, 2025
1e15ce5
Update eager generalization flags in tests
vrn-sn May 22, 2025
42fc566
Bump extremely_large_table timeout (2.0 -> 3.0)
vrn-sn May 22, 2025
73ba7ec
Disable failing tests (for now)
hgoldstein May 27, 2025
de3da78
Sync to upstream/release/676
ayoungbloodrbx May 30, 2025
41f0b4b
Merge branch 'master' into merge
ayoungbloodrbx May 30, 2025
907b3a5
Merge branch 'upstream' into merge
ayoungbloodrbx May 30, 2025
4622415
Sync to upstream/release/677
vegorov-rbx Jun 6, 2025
e14c3d6
Merge branch 'master' into merge
vegorov-rbx Jun 6, 2025
d98241b
Merge branch 'upstream' into merge
vegorov-rbx Jun 6, 2025
1234321
Sync to upstream/release/678
andyfriesen Jun 13, 2025
6c272ce
Merge branch 'master' into merge
andyfriesen Jun 13, 2025
2a98788
Merge branch 'upstream' into merge
andyfriesen Jun 13, 2025
3efc353
Sync to upstream/release/679
menarulalam Jun 20, 2025
ff2963b
Merge branch 'master' into merge
menarulalam Jun 20, 2025
cc4f26a
Merge branch 'upstream' into merge
menarulalam Jun 20, 2025
ff810a7
Sync to upstream/release/680
Vighnesh-V Jun 27, 2025
12f8e01
Merge branch 'master' into merge
Vighnesh-V Jun 27, 2025
5cc182b
Merge branch 'upstream' into merge
Vighnesh-V Jun 27, 2025
03d68a5
Bump refinements_table_intersection_limits timeout to 1.0s
Vighnesh-V Jun 27, 2025
f108876
Sync to upstream/release/681
Vighnesh-V Jul 4, 2025
2f9bb78
Merge branch 'master' into merge
Vighnesh-V Jul 4, 2025
cda3cb0
Merge branch 'upstream' into merge
Vighnesh-V Jul 4, 2025
9a18552
Sync to upstream/release/682
hgoldstein Jul 11, 2025
3abf08d
Merge branch 'master' into merge
hgoldstein Jul 11, 2025
d1a16e3
Merge branch 'upstream' into merge
hgoldstein Jul 11, 2025
565cbdf
Sync to upstream/release/683
vrn-sn Jul 18, 2025
b88e624
Merge branch 'master' into merge
vrn-sn Jul 18, 2025
3b4a304
Merge branch 'upstream' into merge
vrn-sn Jul 18, 2025
d2f47d4
Sync to upstream/release/684
ayoungbloodrbx Jul 25, 2025
9c0cab0
Merge branch 'master' into merge
ayoungbloodrbx Jul 25, 2025
b057e0c
Merge branch 'upstream' into merge
ayoungbloodrbx Jul 25, 2025
00f9139
Fix test
ayoungbloodrbx Jul 25, 2025
7c31f03
Fix other test timeout
ayoungbloodrbx Jul 25, 2025
6e3303a
Sync to upstream/release/685
vrn-sn Aug 1, 2025
b24f503
Merge branch 'master' into merge
vrn-sn Aug 1, 2025
d591270
Merge branch 'upstream' into merge
vrn-sn Aug 1, 2025
79e8398
Sync to upstream/release/686
Vighnesh-V Aug 8, 2025
100ff15
Merge branch 'master' into merge
Vighnesh-V Aug 8, 2025
b08ba83
Merge branch 'upstream' into merge
Vighnesh-V Aug 8, 2025
122e876
Sync to upstream/release/687
vegorov-rbx Aug 15, 2025
0b3882f
Merge branch 'master' into merge
vegorov-rbx Aug 15, 2025
208f3a2
Merge branch 'upstream' into merge
vegorov-rbx Aug 15, 2025
12657f2
Increase the test timeout
vegorov-rbx Aug 15, 2025
b7a8ceb
Sync to upstream/release/688
aatxe Aug 22, 2025
b607072
Merge branch 'master' into merge
aatxe Aug 22, 2025
be269b2
Merge branch 'upstream' into merge
aatxe Aug 22, 2025
4e6525e
Sync to upstream/release/689
andyfriesen Aug 29, 2025
89fcdd1
Merge branch 'master' into merge
andyfriesen Aug 29, 2025
8100bef
Merge branch 'upstream' into merge
andyfriesen Aug 29, 2025
bd16b21
Disable this warning for now.
andyfriesen Aug 29, 2025
b418b3b
Typo.
andyfriesen Aug 29, 2025
721ad74
Fix a test.
andyfriesen Aug 29, 2025
da7d391
Double this timeout because GitHub is apparently running our tests on…
andyfriesen Aug 29, 2025
2221dd4
Sync to upstream/release/690
hgoldstein Sep 5, 2025
8dea2a3
Merge branch 'master' into merge
hgoldstein Sep 5, 2025
7fa2dbc
Merge branch 'upstream' into merge
hgoldstein Sep 5, 2025
73882c8
Sync to upstream/release/691
menarulalam Sep 12, 2025
e2b2bbb
Merge branch 'master' into merge
menarulalam Sep 13, 2025
42404ad
Merge branch 'upstream' into merge
menarulalam Sep 13, 2025
b3dd867
Disabled test due to stackoverflow, added ticket to investigate
menarulalam Sep 15, 2025
5a25edc
Sync to upstream/release/692
vrn-sn Sep 19, 2025
738b9ff
Merge branch 'master' into merge
vrn-sn Sep 19, 2025
be839ff
Merge branch 'upstream' into merge
vrn-sn Sep 19, 2025
1dd2409
Temporarily disable txnlog_checks_for_occurrence_before_self_binding_…
vrn-sn Sep 19, 2025
d4bce08
Sync to upstream/release/693
hgoldstein Sep 26, 2025
9dbc601
Merge branch 'master' into merge
hgoldstein Sep 26, 2025
25e35a9
Merge branch 'upstream' into merge
hgoldstein Sep 26, 2025
52bd853
Bump time limit for subtyping_should_cache_pairs_in_seen_set
hgoldstein Sep 26, 2025
6f35da3
Bump time limit for Signal_exerpt
hgoldstein Sep 26, 2025
453eeac
Sync to upstream/release/694
vegorov-rbx Oct 3, 2025
fb044aa
Merge branch 'master' into merge
vegorov-rbx Oct 3, 2025
694bd14
Merge branch 'upstream' into merge
vegorov-rbx Oct 3, 2025
68caf6b
Sync to upstream/release/695
aatxe Oct 10, 2025
f1bf48e
Merge branch 'master' into merge
aatxe Oct 11, 2025
08e7209
Merge branch 'upstream' into merge
aatxe Oct 11, 2025
c710640
fix conformance test suite
aatxe Oct 11, 2025
ae6f617
Sync to upstream/release/696
andyfriesen Oct 17, 2025
52317ce
Merge branch 'master' into merge
andyfriesen Oct 17, 2025
efdf464
Merge branch 'upstream' into merge
andyfriesen Oct 17, 2025
7d184ab
Sync to upstream/release/697
hgoldstein Oct 24, 2025
0e66629
Merge branch 'master' into merge
hgoldstein Oct 24, 2025
63f05f5
Merge branch 'upstream' into merge
hgoldstein Oct 24, 2025
2efcb44
Explicitly cast to PULONG_PTR
hgoldstein Oct 24, 2025
1d725f9
Explicitly cast uintptr_t to int in Fixture
hgoldstein Oct 24, 2025
4874123
Sync to upstream/release/698
vrn-sn Oct 30, 2025
e21caaf
Merge branch 'master' into merge
vrn-sn Oct 30, 2025
076d1c3
Merge branch 'upstream' into merge
vrn-sn Oct 30, 2025
b5e57b8
Sync to upstream/release/699
hgoldstein Nov 7, 2025
8afcef3
Merge branch 'master' into merge
hgoldstein Nov 7, 2025
9f8cc16
Merge branch 'upstream' into merge
hgoldstein Nov 7, 2025
62598dc
Put $(COMMON_TARGET) after dependents in Makefile
hgoldstein Nov 7, 2025
8b48b1d
Sync to upstream/release/700
SPY Nov 14, 2025
7c69247
Merge branch 'master' into merge
SPY Nov 14, 2025
d317aba
Merge branch 'upstream' into merge
SPY Nov 14, 2025
908c42a
Fix web build
SPY Nov 14, 2025
3d39af8
Sync to upstream/release/701
vegorov-rbx Nov 21, 2025
9369881
Merge branch 'master' into merge
vegorov-rbx Nov 21, 2025
db6f681
Merge branch 'upstream' into merge
vegorov-rbx Nov 21, 2025
1174333
Disable flaky test
vegorov-rbx Nov 21, 2025
bdb958e
Sync to upstream/release/702
andyfriesen Dec 2, 2025
2294037
Merge branch 'master' into merge
andyfriesen Dec 2, 2025
017ca39
Merge branch 'upstream' into merge
andyfriesen Dec 2, 2025
217d754
Sync to upstream/release/703
hgoldstein Dec 12, 2025
dc0bf78
Merge branch 'master' into merge
hgoldstein Dec 12, 2025
dddd94a
Merge branch 'upstream' into merge
hgoldstein Dec 12, 2025
03715ed
Missing license notice in new files.
hgoldstein Dec 12, 2025
341c21b
Add guard for checking other targets in IrLowering test.
hgoldstein Dec 12, 2025
bff51da
Sync to upstream/release/704
vegorov-rbx Jan 9, 2026
7c44855
Merge branch 'master' into merge
vegorov-rbx Jan 9, 2026
e7ee161
Merge branch 'upstream' into merge
vegorov-rbx Jan 9, 2026
c0b010c
Sync to upstream/release/705
aatxe Jan 16, 2026
f120168
Merge branch 'master' into merge
aatxe Jan 16, 2026
17d902a
Merge branch 'upstream' into merge
aatxe Jan 16, 2026
7761cb9
fixup that didn't make it in before cutoff, annoyingly
aatxe Jan 16, 2026
a63a3c8
win32 version of countrz
aatxe Jan 16, 2026
a3b2ba1
oops, forgot to add 32
aatxe Jan 16, 2026
f3ec9ec
typo, rl, not r
aatxe Jan 16, 2026
6394bb2
Sync to upstream/release/706
andyfriesen Jan 23, 2026
4cc83ca
Merge branch 'master' into merge
andyfriesen Jan 23, 2026
e97f62f
Merge branch 'upstream' into merge
andyfriesen Jan 23, 2026
c134681
Windows fixes.
andyfriesen Jan 23, 2026
56ebb18
Sync to upstream/release/707
hgoldstein Jan 30, 2026
09252ae
Merge branch 'master' into merge
hgoldstein Jan 30, 2026
8323c86
Merge branch 'upstream' into merge
hgoldstein Jan 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions Analysis/include/Luau/FileResolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,8 @@ struct RequireNode
return {};
}

// TODO: resolvePathToNode() can ultimately be replaced with a call into
// require-by-string's path resolution algorithm. This will first require
// generalizing that algorithm to work with a virtual file system.
// Resolve a path relative to the current node. The Luau.Require library
// provides utilities that can help with implementing this logic.
virtual std::unique_ptr<RequireNode> resolvePathToNode(const std::string& path) const = 0;

// Get children of this node, if any (if this node represents a directory).
Expand Down
2 changes: 0 additions & 2 deletions Analysis/include/Luau/Module.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,6 @@ struct Module
// Once a module has been typechecked, we clone its public interface into a
// separate arena. This helps us to force Type ownership into a DAG rather
// than a DCG.
void clonePublicInterface_DEPRECATED(NotNull<BuiltinTypes> builtinTypes, InternalErrorReporter& ice);

void clonePublicInterface(NotNull<BuiltinTypes> builtinTypes, InternalErrorReporter& ice, SolverMode mode);

bool constraintGenerationDidNotComplete = true;
Expand Down
2 changes: 0 additions & 2 deletions Analysis/include/Luau/Subtyping.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,6 @@ struct SubtypingEnvironment
NotNull<InternalErrorReporter> iceReporter
);

// TODO: Clip with LuauTryFindSubstitutionReturnOptional
const TypeId* tryFindSubstitution_DEPRECATED(TypeId ty) const;
std::optional<TypeId> tryFindSubstitution(TypeId ty) const;
const SubtypingResult* tryFindSubtypingResult(std::pair<TypeId, TypeId> subAndSuper) const;

Expand Down
8 changes: 0 additions & 8 deletions Analysis/include/Luau/TypeUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,6 @@ struct InConditionalContext

using ScopePtr = std::shared_ptr<struct Scope>;

std::optional<Property> findTableProperty(
NotNull<BuiltinTypes> builtinTypes,
ErrorVec& errors,
TypeId ty,
const std::string& name,
Location location
);

std::optional<TypeId> findMetatableEntry(
NotNull<BuiltinTypes> builtinTypes,
ErrorVec& errors,
Expand Down
7 changes: 3 additions & 4 deletions Analysis/src/BuiltinDefinitions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@

LUAU_FASTFLAG(LuauSolverV2)
LUAU_FASTFLAGVARIABLE(LuauTableCloneClonesType4)
LUAU_FASTFLAG(LuauUseWorkspacePropToChooseSolver)
LUAU_FASTFLAGVARIABLE(LuauCloneForIntersectionsUnions)
LUAU_FASTFLAG(LuauStorePolarityInline)
LUAU_FASTFLAGVARIABLE(LuauTableFreezeCheckIsSubtype)
Expand Down Expand Up @@ -1156,9 +1155,9 @@ TypeId makeStringMetatable(NotNull<BuiltinTypes> builtinTypes, SolverMode mode)
const TypePackId oneStringPack = arena->addTypePack({stringType});
const TypePackId anyTypePack = builtinTypes->anyTypePack;

const TypePackId variadicTailPack = (FFlag::LuauUseWorkspacePropToChooseSolver && mode == SolverMode::New) ? builtinTypes->unknownTypePack
: FFlag::LuauSolverV2 ? builtinTypes->unknownTypePack
: anyTypePack;
const TypePackId variadicTailPack = mode == SolverMode::New ? builtinTypes->unknownTypePack
: FFlag::LuauSolverV2 ? builtinTypes->unknownTypePack
: anyTypePack;
const TypePackId emptyPack = arena->addTypePack({});
const TypePackId stringVariadicList = arena->addTypePack(TypePackVar{VariadicTypePack{stringType}});
const TypePackId numberVariadicList = arena->addTypePack(TypePackVar{VariadicTypePack{numberType}});
Expand Down
22 changes: 5 additions & 17 deletions Analysis/src/ConstraintGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,8 @@ LUAU_FASTINTVARIABLE(LuauPrimitiveInferenceInTableLimit, 500)
LUAU_FASTFLAG(LuauExplicitTypeInstantiationSyntax)
LUAU_FASTFLAG(LuauExplicitTypeInstantiationSupport)
LUAU_FASTFLAGVARIABLE(LuauNumericUnaryOpsDontProduceNegationRefinements)
LUAU_FASTFLAGVARIABLE(LuauTypeFunctions)
LUAU_FASTFLAG(LuauPushTypeConstraintLambdas3)
LUAU_FASTFLAGVARIABLE(LuauAvoidMintingMultipleBlockedTypesForGlobals)
LUAU_FASTFLAGVARIABLE(LuauUseIterativeTypeVisitor)
LUAU_FASTFLAGVARIABLE(LuauPropagateTypeAnnotationsInForInLoops)
LUAU_FASTFLAGVARIABLE(LuauStorePolarityInline)
LUAU_FASTFLAGVARIABLE(LuauDontIncludeVarargWithAnnotation)
Expand Down Expand Up @@ -587,13 +585,12 @@ namespace
* FindSimplificationBlockers to recognize these typeArguments and defer the
* simplification until constraint solution.
*/
template<typename BaseVisitor>
struct FindSimplificationBlockers : BaseVisitor
struct FindSimplificationBlockers : IterativeTypeVisitor
{
bool found = false;

FindSimplificationBlockers()
: BaseVisitor("FindSimplificationBlockers", /* skipBoundTypes */ true)
: IterativeTypeVisitor("FindSimplificationBlockers", /* skipBoundTypes */ true)
{
}

Expand Down Expand Up @@ -635,18 +632,9 @@ struct FindSimplificationBlockers : BaseVisitor

bool mustDeferIntersection(TypeId ty)
{
if (FFlag::LuauUseIterativeTypeVisitor)
{
FindSimplificationBlockers<IterativeTypeVisitor> bts;
bts.run(ty);
return bts.found;
}
else
{
FindSimplificationBlockers<TypeOnceVisitor> bts;
bts.traverse(ty);
return bts.found;
}
FindSimplificationBlockers bts;
bts.run(ty);
return bts.found;
}
} // namespace

Expand Down
96 changes: 26 additions & 70 deletions Analysis/src/ConstraintSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,12 @@ LUAU_FASTFLAGVARIABLE(DebugLuauAssertOnForcedConstraint)
LUAU_FASTFLAGVARIABLE(DebugLuauLogSolver)
LUAU_FASTFLAGVARIABLE(DebugLuauLogSolverIncludeDependencies)
LUAU_FASTFLAGVARIABLE(DebugLuauLogBindings)
LUAU_FASTFLAGVARIABLE(LuauDontDynamicallyCreateRedundantSubtypeConstraints)
LUAU_FASTFLAG(LuauExplicitTypeInstantiationSupport)
LUAU_FASTFLAG(LuauInstantiationUsesGenericPolarity2)
LUAU_FASTFLAG(LuauPushTypeConstraintLambdas3)
LUAU_FASTFLAG(LuauMarkUnscopedGenericsAsSolved)
LUAU_FASTFLAGVARIABLE(LuauUseFastSubtypeForIndexerWithName)
LUAU_FASTFLAGVARIABLE(LuauUnifyWithSubtyping)
LUAU_FASTFLAG(LuauUseIterativeTypeVisitor)
LUAU_FASTFLAGVARIABLE(LuauDoNotUseApplyTypeFunctionToClone)
LUAU_FASTFLAGVARIABLE(LuauReworkInfiniteTypeFinder)

Expand Down Expand Up @@ -333,16 +331,15 @@ struct InstantiationQueuer : TypeOnceVisitor
}
};

template<typename BaseVisitor>
struct InfiniteTypeFinder : BaseVisitor
struct InfiniteTypeFinder : IterativeTypeVisitor
{
NotNull<ConstraintSolver> solver;
const InstantiationSignature& signature;
NotNull<Scope> scope;
bool foundInfiniteType = false;

explicit InfiniteTypeFinder(ConstraintSolver* solver, const InstantiationSignature& signature, NotNull<Scope> scope)
: BaseVisitor("InfiniteTypeFinder", /* skipBoundTypes */ true)
: IterativeTypeVisitor("InfiniteTypeFinder", /* skipBoundTypes */ true)
, solver(solver)
, signature(signature)
, scope(scope)
Expand Down Expand Up @@ -1192,37 +1189,18 @@ bool ConstraintSolver::tryDispatch(const NameConstraint& c, NotNull<const Constr
c.typePackParameters,
};

if (FFlag::LuauUseIterativeTypeVisitor)
{
InfiniteTypeFinder<IterativeTypeVisitor> itf{this, signature, constraint->scope};
itf.run(target);
InfiniteTypeFinder itf{this, signature, constraint->scope};
itf.run(target);

if (itf.foundInfiniteType)
{
if (FFlag::LuauReworkInfiniteTypeFinder)
constraint->scope->invalidTypeAliases[c.name] = constraint->location;
else
constraint->scope->invalidTypeAliasNames_DEPRECATED.insert(c.name);
shiftReferences(target, builtinTypes->errorType);
emplaceType<BoundType>(asMutable(target), builtinTypes->errorType);
return true;
}
}
else
if (itf.foundInfiniteType)
{
InfiniteTypeFinder<TypeOnceVisitor> itf{this, signature, constraint->scope};
itf.traverse(target);

if (itf.foundInfiniteType)
{
if (FFlag::LuauReworkInfiniteTypeFinder)
constraint->scope->invalidTypeAliases[c.name] = constraint->location;
else
constraint->scope->invalidTypeAliasNames_DEPRECATED.insert(c.name);
shiftReferences(target, builtinTypes->errorType);
emplaceType<BoundType>(asMutable(target), builtinTypes->errorType);
return true;
}
if (FFlag::LuauReworkInfiniteTypeFinder)
constraint->scope->invalidTypeAliases[c.name] = constraint->location;
else
constraint->scope->invalidTypeAliasNames_DEPRECATED.insert(c.name);
shiftReferences(target, builtinTypes->errorType);
emplaceType<BoundType>(asMutable(target), builtinTypes->errorType);
return true;
}
}

Expand Down Expand Up @@ -1360,37 +1338,18 @@ bool ConstraintSolver::tryDispatch(const TypeAliasExpansionConstraint& c, NotNul
// https://github.com/luau-lang/luau/pull/68 for the RFC responsible for
// this. This is a little nicer than using a recursion limit because we can
// catch the infinite expansion before actually trying to expand it.
if (FFlag::LuauUseIterativeTypeVisitor)
{
InfiniteTypeFinder<IterativeTypeVisitor> itf{this, signature, constraint->scope};
itf.run(tf->type);
InfiniteTypeFinder itf{this, signature, constraint->scope};
itf.run(tf->type);

if (itf.foundInfiniteType)
{
// TODO (CLI-56761): Report an error.
bindResult(builtinTypes->errorType);
if (FFlag::LuauReworkInfiniteTypeFinder)
constraint->scope->invalidTypeAliases[petv->name.value] = constraint->location;
else
reportError(GenericError{"Recursive type being used with different parameters"}, constraint->location);
return true;
}
}
else
if (itf.foundInfiniteType)
{
InfiniteTypeFinder<TypeOnceVisitor> itf{this, signature, constraint->scope};
itf.traverse(tf->type);

if (itf.foundInfiniteType)
{
// TODO (CLI-56761): Report an error.
bindResult(builtinTypes->errorType);
if (FFlag::LuauReworkInfiniteTypeFinder)
constraint->scope->invalidTypeAliases[petv->name.value] = constraint->location;
else
reportError(GenericError{"Recursive type being used with different parameters"}, constraint->location);
return true;
}
// TODO (CLI-56761): Report an error.
bindResult(builtinTypes->errorType);
if (FFlag::LuauReworkInfiniteTypeFinder)
constraint->scope->invalidTypeAliases[petv->name.value] = constraint->location;
else
reportError(GenericError{"Recursive type being used with different parameters"}, constraint->location);
return true;
}

// FIXME: this does not actually implement instantiation properly, it puts
Expand Down Expand Up @@ -3894,13 +3853,10 @@ bool ConstraintSolver::isBlocked(NotNull<const Constraint> constraint) const
NotNull<Constraint> ConstraintSolver::pushConstraint(NotNull<Scope> scope, const Location& location, ConstraintV cv)
{
std::optional<SubtypeConstraintRecord> scr;
if (FFlag::LuauDontDynamicallyCreateRedundantSubtypeConstraints)
{
if (auto sc = cv.get_if<SubtypeConstraint>())
scr.emplace(SubtypeConstraintRecord{sc->subType, sc->superType, SubtypingVariance::Covariant});
else if (auto ec = cv.get_if<EqualityConstraint>())
scr.emplace(SubtypeConstraintRecord{ec->assignmentType, ec->resultType, SubtypingVariance::Invariant});
}
if (auto sc = cv.get_if<SubtypeConstraint>())
scr.emplace(SubtypeConstraintRecord{sc->subType, sc->superType, SubtypingVariance::Covariant});
else if (auto ec = cv.get_if<EqualityConstraint>())
scr.emplace(SubtypeConstraintRecord{ec->assignmentType, ec->resultType, SubtypingVariance::Invariant});

if (scr)
{
Expand Down
3 changes: 0 additions & 3 deletions Analysis/src/FileResolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ static RequireSuggestions makeSuggestionsFromNode(std::unique_ptr<RequireNode> n
RequireSuggestion parentSuggestion;
parentSuggestion.label = "..";

// TODO: after exposing require-by-string's path normalization API, this
// if-else can be replaced. Instead, we can simply normalize the result
// of inserting ".." at the end of the current path.
if (lastSlashInPath >= 2 && path.substr(lastSlashInPath - 2, 3) == "../")
{
parentSuggestion.fullPath = path.substr(0, lastSlashInPath + 1);
Expand Down
15 changes: 2 additions & 13 deletions Analysis/src/FragmentAutocomplete.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ LUAU_FASTINT(LuauTypeInferIterationLimit);
LUAU_FASTINT(LuauTarjanChildLimit)

LUAU_FASTFLAGVARIABLE(DebugLogFragmentsFromAutocomplete)
LUAU_FASTFLAG(LuauUseWorkspacePropToChooseSolver)
LUAU_FASTFLAGVARIABLE(LuauFragmentRequiresCanBeResolvedToAModule)

namespace Luau
Expand Down Expand Up @@ -756,14 +755,6 @@ void cloneTypesFromFragment(
destScope->returnType = Luau::cloneIncremental(staleScope->returnType, *destArena, cloneState, destScope);
}

static FrontendModuleResolver& getModuleResolver_DEPRECATED(Frontend& frontend, std::optional<FrontendOptions> options)
{
if (FFlag::LuauSolverV2 || !options)
return frontend.moduleResolver;

return options->forAutocomplete ? frontend.moduleResolverForAutocomplete : frontend.moduleResolver;
}

static FrontendModuleResolver& getModuleResolver(Frontend& frontend, std::optional<FrontendOptions> options)
{
if ((frontend.getLuauSolverMode() == SolverMode::New) || !options)
Expand Down Expand Up @@ -1298,8 +1289,7 @@ FragmentTypeCheckResult typecheckFragment__DEPRECATED(
DataFlowGraph dfg = DataFlowGraphBuilder::build(root, NotNull{&incrementalModule->defArena}, NotNull{&incrementalModule->keyArena}, iceHandler);
reportWaypoint(reporter, FragmentAutocompleteWaypoint::DfgBuildEnd);

FrontendModuleResolver& resolver =
FFlag::LuauUseWorkspacePropToChooseSolver ? getModuleResolver(frontend, opts) : getModuleResolver_DEPRECATED(frontend, opts);
FrontendModuleResolver& resolver = getModuleResolver(frontend, opts);
std::shared_ptr<Scope> freshChildOfNearestScope = std::make_shared<Scope>(nullptr);
/// Contraint Generator
ConstraintGenerator cg{
Expand Down Expand Up @@ -1416,8 +1406,7 @@ std::pair<FragmentTypeCheckStatus, FragmentTypeCheckResult> typecheckFragment(
if (!frontend.allModuleDependenciesValid(moduleName, opts && opts->forAutocomplete))
return {FragmentTypeCheckStatus::SkipAutocomplete, {}};

FrontendModuleResolver& resolver =
FFlag::LuauUseWorkspacePropToChooseSolver ? getModuleResolver(frontend, opts) : getModuleResolver_DEPRECATED(frontend, opts);
FrontendModuleResolver& resolver = getModuleResolver(frontend, opts);
ModulePtr module = resolver.getModule(moduleName);
if (!module)
{
Expand Down
13 changes: 2 additions & 11 deletions Analysis/src/Frontend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ LUAU_FASTFLAGVARIABLE(DebugLuauLogSolverToJsonFile)
LUAU_FASTFLAGVARIABLE(DebugLuauForbidInternalTypes)
LUAU_FASTFLAGVARIABLE(DebugLuauForceStrictMode)
LUAU_FASTFLAGVARIABLE(DebugLuauForceNonStrictMode)
LUAU_FASTFLAGVARIABLE(LuauUseWorkspacePropToChooseSolver)
LUAU_FASTFLAGVARIABLE(DebugLuauAlwaysShowConstraintSolvingIncomplete)
LUAU_FASTFLAG(LuauStandaloneParseType)

Expand Down Expand Up @@ -449,12 +448,7 @@ void Frontend::setLuauSolverMode(SolverMode mode)

SolverMode Frontend::getLuauSolverMode() const
{
if (FFlag::LuauUseWorkspacePropToChooseSolver)
return useNewLuauSolver.load();
else if (FFlag::LuauSolverV2)
return SolverMode::New;
else
return SolverMode::Old;
return useNewLuauSolver.load();
}

void Frontend::parse(const ModuleName& name)
Expand Down Expand Up @@ -1664,10 +1658,7 @@ ModulePtr check(


unfreeze(module->interfaceTypes);
if (FFlag::LuauUseWorkspacePropToChooseSolver)
module->clonePublicInterface(builtinTypes, *iceHandler, SolverMode::New);
else
module->clonePublicInterface_DEPRECATED(builtinTypes, *iceHandler);
module->clonePublicInterface(builtinTypes, *iceHandler, SolverMode::New);

// It would be nice if we could freeze the arenas before doing type
// checking, but we'll have to do some work to get there.
Expand Down
Loading