-
Notifications
You must be signed in to change notification settings - Fork 73
Amendment: Allow require aliases to reference other aliases #145
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
Amendment: Allow require aliases to reference other aliases #145
Conversation
|
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 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 |
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>
|
This is implemented in the latest version of Luau! https://github.com/luau-lang/luau/releases/tag/0.700 |
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>
Enables iterative resolution of chained aliases.