When using sbt 1.11.7, I think scala 2.12.20 is used with -Xsource:3option. I am confused about what Scala 3 source features can be used. Wildcard imports work fine:
import scala.util.chaining.*
This does not:
assembly / assemblyMergeStrategy := {
case PathList(path*) if path.last == "module-info.class" => MergeStrategy.discard
case x => (assembly / assemblyMergeStrategy).value(x)
}
The second fragment fails with error:
bad simple pattern: use _* to match a sequence
Why? When using -Xsource:3 with normal Scala source, both constructs can be compiled, when not using it, none of them is accepted. What settings does sbt use that one is accepted and the other not?
The PathList in assembly plugin looks simple enough:
object PathList {
def unapplySeq(path: String): Option[Seq[String]] = ???
}
See also https://youtrack.jetbrains.com/issue/SCL-24570/Wrong-inspection-about-syntax-in-SBT-files