Closed WojciechMazur closed 1 year ago
The build failures of ohze/akka-guice
, ohze/couchbase-scala
, and ohze/sd-util
are all due to the use of the sbt plugin "com.sandinh" % "sd-devops-oss"
. That plugin checks the value of CrossVersion.scalaApiVersion(scalaVersion)
:
which has this behavior:
CrossVersion.scalaApiVersion("3.1.0") // Some((3,1))
CrossVersion.scalaApiVersion("3.1.3") // Some((3,1))
CrossVersion.scalaApiVersion("3.1.0-RC1") // None
CrossVersion.scalaApiVersion("3.1.3-RC1") // Some((3,1))
CrossVersion.scalaApiVersion("3.2.0") // Some((3,2))
CrossVersion.scalaApiVersion("3.2.0-RC2") // None <---- this is our failing case
CrossVersion.scalaApiVersion("3.2.1-RC2") // Some((3,2))
I'm not sure if this scalaApiVersion
method is intended to be used with Scala 3 versioning (all the test cases are for Scala 2), but it seems the issue here is either with the plugin or sbt.
Btw, I'm looking into my own project on that list. I don't think it's a regression, even the current main
doesn't seem to be compiling locally even though CI is green. So something weird going on.
@armanbilge technically, that is called a weird regression.
Some of the other build failures are not regressions per se, but expected based on changes from 3.1 to 3.2.
Examples:
indoorvivants/subatomic
and mvv/typine
apparently use non-local returns, which are no longer supportedshiftleftsecurity/codepropertygraph
has pattern binding narrowing (this now warns and it appears they are using fatal warnings)zengularity/benji
uses refutable extractors (these now warn, and fatal warnings seem to be enabled)gchudnov/swearwolf
triggers a new deprecation warning ':' after symbolic operator is deprecated; use backticks around operator instead
and appears to be using fatal warningsI offer CI evidence that my project is fine on 3.2.0-RC2. https://github.com/armanbilge/saslprep/runs/7294875650?check_suite_focus=true
I don't know what's magic about CI. Seems to go badly wrong basically everywhere else, not just Scala 3 but Scala 2 as well.
Here's a reproducer for the tinkoff/phobos
failure:
import scala.quoted.*
class ProductTypeField(using val quotes: Quotes)(val name: String)
def foo(using Quotes): ProductTypeField = ProductTypeField()("")
-- Error: ptf.scala:5:58 -------------------------------------------------------
5 |def foo(using Quotes): ProductTypeField = ProductTypeField()("")
| ^^^^^^^^^^^^^^^^^^
|missing argument for parameter name of constructor ProductTypeField in class ProductTypeField: (name: String): ProductTypeField
However if I understand correctly this is caused by an intentional source breaking change in #14840?
Btw, I'm looking into my own project [saslprep] on that list. I don't think it's a regression, even the current
main
doesn't seem to be compiling locally even though CI is green. So something weird going on.
I cloned it and built and tested locally on 3.2.0-RC2 and it was fine, so :shrug:
@griggt great hob. The failure in shiftleftsecurity/codepropertygraph
in theory should be handled as we do apply -source:3.2-migration
flag if logs show us it could fix the build, the problem was caused by the fact of combination -Xfatal-warnings
or -Wconf:e:any
flag which do elevate warning about possible rewrite, into an error (https://github.com/lampepfl/dotty/pull/15589)
@armanbilge I can confirm that the issue with your project is only happening in our testing environment due to a more strict resource policy (limited memory inside the container) though due to reduced -Xss leading to StackOverflowError. It can re reproduced when using the scala-cli script listed at the begging of the issue (without --locally flag). It can be ignored
I took a look at jcouyang/meow
:
3.1.3-RC3
. The compilation result changed since 3.1.3-RC3
, but with 3.2.0-RC1
it gives an error on test-compile
, and with 3.1.3-RC3
it crashed on compile
.3.0.0
. However, versions 3.0.1
- 3.0.2
can be fixed by changing IO
to be covariant.3.2.0-RC1
gives additional compilation errors related to implicit resolution. Issue: #15656 When it comes to losizm/little-sql
the error is caused by difference in java version. (deprecation of java method + -Werror
)
Similarly eikek/binny
fails due to usage of method missing in Java 8.
Sidenote: open community build picks the lowest version of Java version defined in github workflows, otherwise it defaults to Java 11. Config both of the failing projects due to this issue was overridden.
Failures observed in @gzoller /scala-reflection are not regressions either. Scala 3.1.3 introduced a bug fix, which prevented access to the protected constructor of case class. Code snippet from this project fails starting at that version and it is correct behavior (however it's not ok that it was introduced in a patch release, next minor would be more suitable):
case class SealedTraitInfo protected(
name: String,
children: Array[RType]
)
Adding a public apply method in the companion object or making the primary constructor public would fix the problem.
Seeing that we're releasing 3.3.0 and many of the build urls now 404, are we ok just to close this @WojciechMazur?
Each table contains a list of projects that failed to compile with Scala 3.2.0-RC2, but was successfully built with the given previous version. A summary is based only on final and released candidate versions of Scala 3. Information about the last Scala version used for the last successful build might not always be correct, due to lack of data (lack of build for that project with given Scala version)
Open community build might have applied
-source:X-migration
flag if it is detected it could possibly fix the build. Summary only contains projects that failed when compiling source or test files of at least 1 sub-project.All tested projects: 818 Open Community build run: Build #17 - 3.2.0-RC2-all-projects
Notes for issue reproducers: To reproduce builds locally you can use:
BUILD ID can be found in the BUILD_URL columns (eg.
Open CB #BUILD_ID
) Helpful options for reproducer scripts:--scalaVersion VERSION
run build with the selected version of Scala (to check if the problem existed in given release)--withUpstream
- build also all upstream dependencies of failing project--locally
- checkout and build the project locally, without this flag it would try to start a minikube cluster to make the reproduction environment exactly the same as in the Open Community Build run (eg. to compile with the same version of the JDK)erikerlandson/coulombgchudnov/swearwolfh8io/borschtindoorvivants/subatomicmvv/typineohze/akka-guiceohze/couchbase-scalaohze/sd-utilrssh/cps-async-connectshiftleftsecurity/codepropertygraphtabdulradi/happypathtinkoff/phoboszengularity/benjizio/zio-configshiftleftsecurity/codepropertygraphdisneystreaming/smithy4seikek/binnykevin-lee/extraslosizm/little-sqljcouyang/meowhedgehogqa/scala-hedgehogcaspercommunityio/casper-scala-sdkearogov/ordsetgzoller/scala-reflectionlorandszakacs/sproutnrinaudo/kantan.replnme.REPL_NAME
) removed in #14021scala-tessella/ring-seqzygfryd/scala-zygf-cement2m/yabai-scalaopen trait
+-Xfatal-warnings
armanbilge/saslpreparturopala/gitignorebenhutchison/scalaswingcontribdelimobil/fs2-hbasegiabao/asm-flowjbwheatley/pact4s-Wconf
flagskatrix/minejsonsciss/soundprocessesvirtuslab/pretty-stacktracesisTupleType
renamed in #https://github.com/lampepfl/dotty/pull/13384vladkopanev/cats-saga