Backport "Work around sbt#8376 and re-enable shapeless-3 community build" to 3.8.0#24795
Merged
WojciechMazur merged 4 commits intorelease-3.8.0from Dec 22, 2025
Merged
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]
Base automatically changed from
release-3.8.0_backport-24704
to
release-3.8.0_backport-24273
December 21, 2025 17:21
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)
WojciechMazur
commented
Dec 21, 2025
| 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")), |
Contributor
Author
There was a problem hiding this comment.
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
Gedochao
approved these changes
Dec 22, 2025
Base automatically changed from
release-3.8.0_backport-24273
to
release-3.8.0
December 22, 2025 10:52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backports #24709 to the 3.8.0-RC4.
PR submitted by the release tooling.
[skip ci]