Skip to content

Conversation

@vrn-sn
Copy link
Member

@vrn-sn vrn-sn commented Oct 15, 2025

Enables iterative resolution of chained aliases.

@vrn-sn
Copy link
Member Author

vrn-sn commented Oct 16, 2025

Also want to add that cycle detection is relatively simple and inexpensive.

This stems from the fact that dependency aliases must always be defined in the same or a higher-level .luaurc than dependent aliases. If defined higher, however, it is impossible to "complete" the cycle, as the higher-defined aliases cannot depend on aliases defined at lower levels (follows directly from the search semantics).

From that, it's easy to see that the only way for a cycle to occur is if all aliases in the cycle are defined in the same .luaurc file.

@aatxe aatxe merged commit 3a4aab1 into luau-lang:master Oct 30, 2025
SPY added a commit to luau-lang/luau that referenced this pull request 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 #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
* Support chained aliases with built-in cycle detection:
luau-lang/rfcs#145.
* Resolve JohnnyMorganz/luau-lsp#1246.

# 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>
@vrn-sn
Copy link
Member Author

vrn-sn commented Nov 15, 2025

This is implemented in the latest version of Luau! https://github.com/luau-lang/luau/releases/tag/0.700

@vrn-sn vrn-sn deleted the vrn-sn/aliases-can-point-to-other-aliases branch November 15, 2025 00:36
theoparis pushed a commit to tinted-software/luau-ng that referenced this pull request Dec 7, 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 #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
* Support chained aliases with built-in cycle detection:
luau-lang/rfcs#145.
* Resolve JohnnyMorganz/luau-lsp#1246.

# 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>
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.

2 participants