scala / scala-dev

Scala 2 team issues. Not for user-facing bugs or directly actionable user-facing improvements. For build/test/infra and for longer-term planning and idea tracking. Our bug tracker is at https://github.com/scala/bug/issues
Apache License 2.0
130 stars 15 forks source link

Possible 2.13.15 regression in community build: difflicious #876

Closed SethTisue closed 1 month ago

SethTisue commented 1 month ago

https://scala-ci.typesafe.com/job/scala-2.13.x-jdk23-integrate-community-build/148/artifact/logs/difflicious-build.log

[difflicious] [error] Failed tests:
[difflicious] [error]   difflicioustest.DifferAutoDerivationSpec

this didn't come up sooner because it came up when I advanced the project SHAs, rather than from bumping the Scala version

the problem is reproducible outside of dbuild by cloning jatcwang/difflicious, then applying this patch:

diff --git build.sbt build.sbt
index f140204..2c66096 100644
--- build.sbt
+++ build.sbt
-    compilerPlugin("org.typelevel" %% "kind-projector" % "0.13.3" cross CrossVersion.full),
+    compilerPlugin("org.typelevel" % "kind-projector_2.13.14" % "0.13.3"),

then doing:

set ThisBuild / resolvers += "int" at "https://scala-ci.typesafe.com/artifactory/scala-integration/"
++2.13.15-bin-6e2b765!
coretest/test

the test passes on 2.13.14

SethTisue commented 1 month ago

I've assigned @lrytz, but this might interest @som-snytt too. (it interests me as well, but I'm very short on work hours this week)

lrytz commented 1 month ago

Doesn't look too bad, a test comparing a compiler error.

image

Somehow it expected the splain formatting but got the plain.

lrytz commented 1 month ago

i don't find -Vimplicits or -Xlog-implicits in the project, but maybe it's sbt-tpolecat?

lrytz commented 1 month ago

Yeah it must be something with sbt-tpolecat.

The project uses addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.20"), see https://github.com/jatcwang/difflicious/blob/master/project/plugins.sbt. I don't know what variant of the plugin this is, but when I switch to the "official" addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.2"), the test fails in the same way on 2.13.14.

SethTisue commented 1 month ago

@jatcwang wdyt?

jatcwang commented 1 month ago

"io.github.davidgregory084" % "sbt-tpolecat" % "0.1.20" is the old plugin coordinate before it was migrated under the typelevel umbrella. I'll take a look closer to see what compiler options are in use that can trigger this issue.

lrytz commented 1 month ago

Running sbt:difflicious> show coretest/scalacOptions in sbt with an unmodified checkout, we see it includes -Vimplicits. After ++2.13.15-bin-6e2b765!, that compiler option is no longer there.

When switching to org.typelevel sbt-tpolecat and staying on 2.13.14, the flag is also not there.

jatcwang commented 1 month ago

@lrytz Yes the plugin version I'm using adds -Vimplicits. It didn't recognize compiler version 2.13.15-bin-6e2b765 so it didn't add -Vimplicits. I'm working on upgrading the plugin & some other fixes which should solve the problem. Thanks for digging!

jatcwang commented 1 month ago

Should be all fixed on the latest commit 221d6fe!

SethTisue commented 1 month ago

cool, thanks for updating us