-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
area:typeritype:bugregressionThis worked in a previous version but doesn't anymoreThis worked in a previous version but doesn't anymore
Description
Based on the OpenCB failure in gnieh/fs2-data - build logs
Might affect most of the typelevel ecosystem.
Problem exists when using com.disneystreaming::weaver-cats:0.8.4 , but it's absent when using org.typelevel::weaver-cats:0.11.2 (probably was fixed in 0.9.0)
Compiler version
Last good release: 3.8.0-RC1-bin-20251103-714f3b6-NIGHTLY
First bad release: 3.8.0-RC1-bin-20251104-b83b3d9-NIGHTLY
Bisect points to one of:
f3aea49
5b03dca
Both are commits from #24231
Not present in 3.8.0-RCs, merged after 3.8.0 cutoff, but before change of build developed version
Minimized code
Requires split of sources into 2 stages, it can reproduced the most easily using
scala compile --test repro.scala repro.test.scala (test targets are a separate compilation unit)
// repro.scala
trait Show[T]
object Show:
given [A: Show]: Show[List[A]] = ???
trait Eq[A] extends Any, Serializable
object Eq:
def fromUniversalEquals[A]: Eq[A] = ???
object expect:
def same[A](expected: A, found: A)(using
eqA: Eq[A] = Eq.fromUniversalEquals[A],
showA: Show[A]
): Unit = ???
sealed trait XmlEvent
object XmlEvent:
given Show[XmlEvent] = ???// repro.test.scala
def test(input: Option[List[XmlEvent]]) =
val works =
expect.same(List.empty[XmlEvent], input.get)
val fails = input.map: tokens =>
expect.same(List.empty[XmlEvent], tokens)Output
> scala compile --test test.scala test.test.scala -S 3.nightly
Compiling project (Scala 3.8.1-RC1-bin-20251207-68396ca-NIGHTLY, JVM (21))
Compiled project (Scala 3.8.1-RC1-bin-20251207-68396ca-NIGHTLY, JVM (21))
Compiling project (test, Scala 3.8.1-RC1-bin-20251207-68396ca-NIGHTLY, JVM (21))
[error] ./test.test.scala:5:48
[error] Found: Show[List[A]]
[error] Required: Show[List[XmlEvent]]
[error] expect.same(List.empty[XmlEvent], tokens)
[error] ^
Error compiling project (test, Scala 3.8.1-RC1-bin-20251207-68396ca-NIGHTLY, JVM (21))
Compilation failedExpectation
Should compile
Metadata
Metadata
Assignees
Labels
area:typeritype:bugregressionThis worked in a previous version but doesn't anymoreThis worked in a previous version but doesn't anymore