Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: luau-lang/luau
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.703
Choose a base ref
...
head repository: luau-lang/luau
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.704
Choose a head ref
  • 2 commits
  • 135 files changed
  • 9 contributors

Commits on Dec 14, 2025

  1. Allow two-argument explicit constructor for RequireAlias (#2149)

    The latest sync to 703 (#2146)
    added an explicit constructor to `Luau::RequireAlias`. However, this is
    only a single argument constructor for the alias, and does not handle
    setting the tags.
    
    This broke luau-lsp compilation of code that did
    `Luau::RequireAlias{alias, {"tagname"}}`, and now our only option is to
    first construct the RequireAlias into a separate local, and then set the
    tags afterwards, then pass the require alias to where we were using it
    originally.
    
    For simplicity, this PR adds a two-argument explicit constructor to also
    set the tags
    JohnnyMorganz authored Dec 14, 2025
    Configuration menu
    Copy the full SHA
    5db7682 View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2026

  1. Sync to upstream/release/704 (#2180)

    Hello everyone and a happy New Year!
    The first sync of 2026 is already here with improvements to new type
    solver and native code generation.
    
    # Analysis
    
    * Explicit type instantiation is now ready for production use (Fixes
    #2114, Fixes #2144, Fixes #2113, and Fixes #2119)
    * When subtyping extern types and tables, we now check indexers as well
    as properties, which fixes a soundness bug where tables without
    properties but clearly incompatible indexers were considered super types
    of extern types:
    ```luau
    local function f(c: Color3): { Color3 }
        return c -- This used to not error and now does
    end
    
    ```
    * Using bound generics as type annotations on nested functions or
    lambdas now no longer leak into the quantified generics of said lambda /
    inner function:
    ```luau
    local function makeApplier<A..., R...>(f: (A...) -> (R...))
        return function (... : A...): R...
            f(...)
        end
    end
    local function add(x: number, y: number): number return x + y end
    -- Prior, `f` would have the (incorrect) type of `<A..., R...>(A...) -> (R...)`, as it
    -- erroneously picked up the generics from `makeApplier`. Now it will have 
    -- the correct type of `(number, number) -> number`
    local f = makeApplier(add)
    ```
    * Lambda bidirectional inference is now slightly less sensitive to
    generics; prior _any_ generic in the lambda type would prevent "pushing
    in" the type, but now this is restricted to potentially unbound generics
    that are from the function type we are pushing in, as in:
    ```luau
    type testsuite = { case: (self: testsuite, <T>(T) -> T) -> () }
    local test1: { suite: (string, (testsuite) -> ()) -> () } = nil :: any
    -- Prior we would error on the _entire_ lambda ...
    test1.suite("LuteTestCommand", function(suite)
        -- but now we only error here
        suite:case(42)
    end)
    ```
    * Generic polarity inference has been reworked to be significantly
    faster, especially for large mutually recursive type aliases
    * Generic type packs now more consistently infer the correct type for
    function calls, most importantly for `pcall` and its siblings. (Fixes
    #2109. Fixes #2143)
    ```luau
    local function makestr(n: number): string
    	return tostring(n)
    end
    
    -- `s` now has type `string` and not `unknown`
    local success, s = pcall(makestr, 42)
    ```
    * Bidirectional inference of constants (especially booleans) should be
    more consistent, such as in:
    ```luau
    type Good = { success: true, result: string }
    type Bad = { success: false, error: string }
    type Result = Good | Bad
    -- This errors before and after, but we now recognize that you 
    -- meant this to be `Bad` and will note the lack of the `error` member
    local a: Result = { success = false, result = 'something' }
    ```
    * The mechanism for generating "Recursive type being used with different
    parameters" has been reworked. This should mean less false positives,
    and we will now consistently highlight the erroneous type alias
    instance, but we now adhere closer to the [very strict
    RFC](https://rfcs.luau.org/recursive-type-restriction.html).
    ```luau
    -- Not only did this line error, but it errored even in nonstrict mode
    type A = { B<any> }
    type B<T> = { method: (B<T>) -> () }
    
    -- This used to _not_ error under the new solver but now does, despite being fairly benign
    type B<T = number> = { B<number> }
    ```
    
    # Native Codegen
    
    * `vector` library operations are now performed with 32-bit
    floating-point precision, matching the results of the interpreter and
    improving performance by skipping unnecessary 32-bit to 64-bit
    conversions
    * 2-argument `vector.create` constructor will now use native lowering
    instead of calling out to a slower C++ fastcall function
    * Added native support for vector flooring division operator `//`
    instead of calling out to a slower C++ VM utility function
    * Identical calls to the math library (`math.cos`, `math.sin` and many
    others) are now eliminated
    * A larger set of identical operations on vector values are now
    eliminated
    * Buffer length checks are now merged together when possible
    ```luau
    -- only one range check
    return buffer.readf64(b, i) * buffer.readf64(b, i + 8) * buffer.readf64(b, i + 16)
    
    -- when stride multiplier is used, it still produces only a single range check
    return buffer.readf64(b, i * 8) * buffer.readf64(b, (i + 1) * 8) * buffer.readf64(b, (i + 2) * 8)
    ```
    * Fixed missing constant fold of `TRUNCATE_UINT` which could cause a
    lowering failure under 'LuauCodegenNumIntFolds2' flag
    
    # Autocomplete
    
    * Fixed a crash when indexing write-only properties
    
    # Internal Contributors
    
    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>
    Co-authored-by: Vighnesh Vijay <vvijay@roblox.com>
    Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com>
    8 people authored Jan 9, 2026
    Configuration menu
    Copy the full SHA
    dc955d6 View commit details
    Browse the repository at this point in the history
Loading