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: scala/scala3-lts
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: lts-3.3
Choose a base ref
...
head repository: scala/scala3-lts
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: backport-lts-3.3-23757
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 15 commits
  • 38 files changed
  • 10 contributors

Commits on Sep 26, 2025

  1. Fix issues after merging

    dwijnand authored and tgodzik committed Sep 26, 2025
    Configuration menu
    Copy the full SHA
    b3d8ef3 View commit details
    Browse the repository at this point in the history
  2. Move makePackageObjPrefixExplicit to TypeUtils

    [Cherry-picked f9145d7][modified]
    tgodzik committed Sep 26, 2025
    Configuration menu
    Copy the full SHA
    c08bf10 View commit details
    Browse the repository at this point in the history
  3. Fix pkg obj prefix of opaque tp ext meth

    There is use of `makePackageObjPrefixExplicit` within `accessibleType`,
    which is called on the result of findRef in typedIdent.  But in
    `tryExtension` it's no such use.  We could fix it in the usage of the
    results in `tryExtension`, but I thought perhaps we could fix it for all
    call sites, by handling it within findRef.
    
    [Cherry-picked 7db83c5]
    dwijnand authored and tgodzik committed Sep 26, 2025
    Configuration menu
    Copy the full SHA
    a706a86 View commit details
    Browse the repository at this point in the history
  4. Add addendum to private val parameter variance error message

    [Cherry-picked e6c474d]
    mbovel authored and tgodzik committed Sep 26, 2025
    Configuration menu
    Copy the full SHA
    f94a33e View commit details
    Browse the repository at this point in the history
  5. fix: correctly require a ClassTag when building a multidimensional …

    …`Array`
    
    [Cherry-picked 9da1fcb]
    hamzaremmal authored and tgodzik committed Sep 26, 2025
    Configuration menu
    Copy the full SHA
    abc370b View commit details
    Browse the repository at this point in the history
  6. Porting XRayModeHints (scala#23891)

    Porting scalameta/metals#7639
    
    Co-authored-by: Henry Parker <[email protected]>
    [Cherry-picked 1315eda]
    2 people authored and tgodzik committed Sep 26, 2025
    Configuration menu
    Copy the full SHA
    992cb05 View commit details
    Browse the repository at this point in the history
  7. Improve symbol order in completions provided by the presentation comp…

    …iler (scala#23888)
    
    Extension methods that are not in the same file are placed after all
    Product methods and even after extension methods like "ensuring". This
    PR penalizes the following methods, so that they are no longer at the
    top of the suggestions:
    - scala.Product.*
    - scala.Equals.*
    - scala.Predef.ArrowAssoc.*
    - scala.Predef.Ensuring.*
    - scala.Predef.StringFormat.*
    - scala.Predef.nn
    - scala.Predef.runtimeChecked
    
    Resolves scalameta/metals#7642
    Perl99 authored and tgodzik committed Sep 26, 2025
    Configuration menu
    Copy the full SHA
    920500a View commit details
    Browse the repository at this point in the history
  8. Improve symbol order in completions provided by the presentation comp…

    …iler (scala#23888)
    
    Extension methods that are not in the same file are placed after all
    Product methods and even after extension methods like "ensuring". This
    PR penalizes the following methods, so that they are no longer at the
    top of the suggestions:
    - scala.Product.*
    - scala.Equals.*
    - scala.Predef.ArrowAssoc.*
    - scala.Predef.Ensuring.*
    - scala.Predef.StringFormat.*
    - scala.Predef.nn
    - scala.Predef.runtimeChecked
    
    Resolves scalameta/metals#7642
    [Cherry-picked 7d27633][modified]
    tgodzik committed Sep 26, 2025
    Configuration menu
    Copy the full SHA
    6e45d24 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    90c0cb6 View commit details
    Browse the repository at this point in the history
  10. Prevent opaque types leaking from transparent inline methods

    Before this PR, every transparent inline call returning an opaque type
    would actually be typed with an intersection type `DECLARED & ACTUAL`,
    where `DECLARED` was the declared return type of the transparent method,
    and `ACTUAL` was the type actually returned in the expansion, with every
    opaque type alias then dealiased. There was no way to guard against this
    dealiasing. With the changes in this PR, users are now able to manually
    ensure that they receive the types they want, although they might have
    to manually annotate the returned type inside of the transparent inline
    method body (as described in the added documentation section).
    
    The previous dealiasing was caused by the proxy mechanism in inlining,
    which would effectively deals every opaque type, that is transparent
    from the perspective of the original method declaration. Now, we try to
    map the results of the transparent inline back to the original (opaque)
    types.
    
    However all of this is only true for the outermost transparent inline
    method calls. Nested calls will not be affected by this change. This is
    because the type checker in the original context of the method will see
    the opaque type as transparent (so it will type the rest of the method
    according to that), and that typing must still hold after inlining the
    method e.g.:
    ```
    object Time:
      opaque type Time = String
      transparent inline makeTime(): Time = "1h"
      transparent inline listTime(): List[Time] = List[String](makeTime())
        // mapping the results of makeTime() back into opaque types outside
        // of the scope of Time will cause an inlining compilation error
        // (which we are generally trying to avoid, and which would be
        // considered a bug in the compiler).
    ```
    This might cause the aliased type to still leak in a manner that may
    feel unexpected. In the above example, even if the List does not have
    an explicit type parameter, the type inference will still decide on
    `String`, causing any call to listTime to leak that type. This is also
    touched upon in the added docs.
    
    This PR might cause some source/library incompatibilities connected to
    the changed returned types (but I doubt it’s many, considering the
    additional required effort of ignoring type inference if we want the
    outputted type to be different).
    jchyb authored and tgodzik committed Sep 26, 2025
    Configuration menu
    Copy the full SHA
    b60ade9 View commit details
    Browse the repository at this point in the history
  11. Prevent opaque types leaking from transparent inline methods

    Before this PR, every transparent inline call returning an opaque type
    would actually be typed with an intersection type `DECLARED & ACTUAL`,
    where `DECLARED` was the declared return type of the transparent method,
    and `ACTUAL` was the type actually returned in the expansion, with every
    opaque type alias then dealiased. There was no way to guard against this
    dealiasing. With the changes in this PR, users are now able to manually
    ensure that they receive the types they want, although they might have
    to manually annotate the returned type inside of the transparent inline
    method body (as described in the added documentation section).
    
    The previous dealiasing was caused by the proxy mechanism in inlining,
    which would effectively deals every opaque type, that is transparent
    from the perspective of the original method declaration. Now, we try to
    map the results of the transparent inline back to the original (opaque)
    types.
    
    However all of this is only true for the outermost transparent inline
    method calls. Nested calls will not be affected by this change. This is
    because the type checker in the original context of the method will see
    the opaque type as transparent (so it will type the rest of the method
    according to that), and that typing must still hold after inlining the
    method e.g.:
    ```
    object Time:
      opaque type Time = String
      transparent inline makeTime(): Time = "1h"
      transparent inline listTime(): List[Time] = List[String](makeTime())
        // mapping the results of makeTime() back into opaque types outside
        // of the scope of Time will cause an inlining compilation error
        // (which we are generally trying to avoid, and which would be
        // considered a bug in the compiler).
    ```
    This might cause the aliased type to still leak in a manner that may
    feel unexpected. In the above example, even if the List does not have
    an explicit type parameter, the type inference will still decide on
    `String`, causing any call to listTime to leak that type. This is also
    touched upon in the added docs.
    
    This PR might cause some source/library incompatibilities connected to
    the changed returned types (but I doubt it’s many, considering the
    additional required effort of ignoring type inference if we want the
    outputted type to be different).
    
    [Cherry-picked c6245ed][modified]
    tgodzik committed Sep 26, 2025
    Configuration menu
    Copy the full SHA
    b1676da View commit details
    Browse the repository at this point in the history
  12. Fix additional test case

    Certain macros could return nodes typed with incorrect ThisTypes, which
    would reference module types outside of their scope.
    
    We remap those problematic nodes to TermRefs pointing to objects, and
    then possibly manually cast the returned node to the remapped type, as the
    ensureConforms method would just leave the previous incorrect type after
    confirming that the remapped type is a subtype of the previous incorrect
    one.
    
    [Cherry-picked 6771a79]
    jchyb authored and tgodzik committed Sep 26, 2025
    Configuration menu
    Copy the full SHA
    8efbdcd View commit details
    Browse the repository at this point in the history
  13. Add more docs and examples

    [Cherry-picked e611110]
    jchyb authored and tgodzik committed Sep 26, 2025
    Configuration menu
    Copy the full SHA
    74aafdc View commit details
    Browse the repository at this point in the history
  14. Remove unused code

    som-snytt authored and tgodzik committed Sep 26, 2025
    Configuration menu
    Copy the full SHA
    61cdcae View commit details
    Browse the repository at this point in the history
  15. Remove unused code

    [Cherry-picked b0595c7][modified]
    tgodzik committed Sep 26, 2025
    Configuration menu
    Copy the full SHA
    4de57e7 View commit details
    Browse the repository at this point in the history
Loading