-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Backport "Work around sbt#8376 and re-enable shapeless-3 community build" to 3.8.0
#24795
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
Conversation
[Cherry-picked 3bda057]
This was already the case for the select rule optimization in recheckSelection
but was missing for the corresponding rule for applications.
This caused one regression in the standard library, here:
```
private def eagerHeadConcatIterators[A](it: Iterator[collection.Iterable[A]^]^): LazyListIterable[A]^{it} =
if !it.hasNext then Empty
else
eagerHeadPrependIterator
(it.next().iterator)
(eagerHeadConcatIterators(it))
```
Previously the access to `it.next()` was considered to have type `it` by applying the apply rule
incorrectly. It should be `it*`. This means we now have `it*` instead of `it` in the result type
and we also have an illegal use of `it*` leaking outside `eagerHeadConcatIterators`. The second
problem was fixed by adding an unsafe escape hatch `unsafeDiscardUses` that suppressed use recording.
This leads to:
```
private def eagerHeadConcatIterators[A](it: Iterator[collection.Iterable[A]^]^): LazyListIterable[A]^{it*} =
if !it.hasNext then Empty
else
eagerHeadPrependIterator
(caps.unsafe.unsafeDiscardUses(it.next()).iterator)
(eagerHeadConcatIterators(it))
```
This also did not compile since it claimed that the `it @reachCapability` was not a legal element of a capture set.
The root cause was that we forced some definitions already in parser, which can lead to confusion when compiling the
standard library itself. We now refrain from doing that and build the references to these annotations as untyped
trees all the way down.
[Cherry-picked 7bf957d]
88d4b7d to
c0e4701
Compare
…24709) - works around sbt/sbt#8376 / coursier/coursier#3520 - kudos to @eed3si9n for suggesting this, as per coursier/coursier#3520 (comment) - re-enables tests disabled in #24477 (comment) [Cherry-picked 577721f]
e7cb876 to
0d48002
Compare
…s with unresolved `org.scala-lang/scala-reflect/3.8.0-RC3-bin-SNAPSHOT` (no such problem on main)
| Dependencies.compilerInterface, | ||
| "com.github.sbt" % "junit-interface" % "0.13.3" % Test, | ||
| ("io.get-coursier" %% "coursier" % "2.0.16" % Test).cross(CrossVersion.for3Use2_13), | ||
| ("io.get-coursier" %% "coursier" % "2.0.16" % Test).cross(CrossVersion.for3Use2_13).excludeAll(("org.scala-lang" % "scala-reflect")), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was no needed on main, FYI @hamzaremmal
It's mostly due to version of artifacts we're using:
For 3.8.0-RCs: scalaVersion := referenceVersion,
For main : scalaVersion := dottyNonBootstrappedVersion
Change introduced in 1ea06a4 not backported as it didn't seem to be crucial
Required to workaround:
[error] (scala3-compiler-bootstrapped-new / update) sbt.librarymanagement.ResolveException: Error downloading org.scala-lang:scala-reflect:3.8.0-RC3-bin-SNAPSHOT
[error] Not found
[error] Not found
[error] not found: /Users/wmazur/.ivy2/local/org.scala-lang/scala-reflect/3.8.0-RC3-bin-SNAPSHOT/ivys/ivy.xml
[error] not found: https://repo1.maven.org/maven2/org/scala-lang/scala-reflect/3.8.0-RC3-bin-SNAPSHOT/scala-reflect-3.8.0-RC3-bin-SNAPSHOT.pom
[error] not found: https://repo.scala-lang.org/artifactory/fat-jar/org/scala-lang/scala-reflect/3.8.0-RC3-bin-SNAPSHOT/scala-reflect-3.8.0-RC3-bin-SNAPSHOT.pom
[error] Total time: 4 s, completed Dec 21, 2025, 7:04:16 PM
Backports #24709 to the 3.8.0-RC4.
PR submitted by the release tooling.
[skip ci]