Skip to content

Upgrade to Scala 3.3.1. #2

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

Merged
merged 5 commits into from
Sep 6, 2023
Merged

Upgrade to Scala 3.3.1. #2

merged 5 commits into from
Sep 6, 2023

Conversation

sjrd
Copy link
Contributor

@sjrd sjrd commented Aug 9, 2023

The second commit is best reviewed ignoring whitespace change.

sjrd added 2 commits August 9, 2023 11:02
`inline` parameters can be evaluated several times, and therefore
are not stable paths, so they cannot be used in path-dependent
types.

Checking this was fixed in Scala 3.3.0.
See scala/scala3#15511
Scala 3.3.0 does not allow the `extends` clause of a class to
refer to constructor parameters. It was shown to be unsound.
See scala/scala3#16270

However, we can depend on paths that enclose the class definition.
So we introduce a container class `TreeMaps` that takes the `q: Q`
as parameter, and move the classes that extend `q.reflect.TreeMap`
inside that container.
sjrd added 3 commits September 6, 2023 11:41
We cannot use 3.3.0 because of scala/scala3#16706
but that issue is fixed in 3.3.1.
This addresses an infinite loop warning.
The error was:

    Exception occurred while executing macro expansion.
    scala.quoted.runtime.impl.ScopeException:
    Expression created in a splice was used outside of that splice.
    Created in: .../inlineHkdGeneric.scala:575 at column 24
    Used in: .../inlineHkdGeneric.scala:564 at column 30
    Expr: i

    Creation stack:
       .../inlineHkdGeneric.scala:575 at column 24
       .../inlineHkdGeneric.scala:761 at column 7

    Use stack:
       .../inlineHkdGeneric.scala:564 at column 30
       .../inlineHkdGeneric.scala:761 at column 7

    Hint: A common reason for this to happen is when a `def` that creates a `'{...}`
          captures an outer instance of `Quotes`. If this `def` is called in a splice
          it will not track the `Quotes` provided by that particular splice.
          To fix it add a `given Quotes` to this `def`.
@sjrd sjrd changed the title Upgrade to Scala 3.3.1-RC4. Upgrade to Scala 3.3.1. Sep 6, 2023
@sjrd
Copy link
Contributor Author

sjrd commented Sep 6, 2023

Updated for 3.3.1 final, now that it is released.

@Katrix Katrix merged commit ec19c41 into Katrix:master Sep 6, 2023
@Katrix
Copy link
Owner

Katrix commented Sep 6, 2023

Sorry for forgetting about this

@sjrd sjrd deleted the scala-3.3.1-RC4 branch September 6, 2023 10:02
anatoliykmetyuk added a commit to scala/scala3 that referenced this pull request Sep 7, 2023
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