problem with `-Xsource:3` and Scala 2.13.12
xuwei-k opened this issue · 2 comments
xuwei-k commented
build.sbt
scalaVersion := "2.13.12"
scalacOptions ++= Seq("-Xsource:3")
Compile / PB.targets := Seq(
scalapb.gen() -> (Compile / sourceManaged).value / "scalapb"
)
libraryDependencies ++= Seq(
"com.thesamet.scalapb" %% "scalapb-runtime" % scalapb.compiler.Version.scalapbVersion
)
project/build.properties
sbt.version=1.9.4
project/plugins.sbt
addSbtPlugin("com.thesamet" % "sbt-protoc" % "1.0.6")
libraryDependencies += "com.thesamet.scalapb" %% "compilerplugin" % "0.11.13"
src/main/protobuf/x.proto
syntax = "proto3";
package example;
enum X {
Z = 0;
A = 1;
B = 2;
C = 3;
}
sbt compile
target/scala-2.13/src_managed/main/scalapb/example/x/X.scala:52:12: under -Xsource:3, inferred Seq[example.x.X] instead of Seq[example.x.X.Recognized] [quickfixable]
[error] Scala 3 migration messages are errors under -Xsource:3. Use -Wconf / @nowarn to filter them or add -Xmigration to demote them to warnings.
[error] Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=scala3-migration, site=example.x.X.values
[error] lazy val values = scala.collection.immutable.Seq(Z, A, B, C)
[error] ^
[error] one error found
[error] (Compile / compileIncremental) Compilation failed
note
Emit migration warnings under -Xsource:3 as fatal warnings, not errors; -Xmigration disables fatality
aalbul commented
Hi! Is there a way to overcome this issue? Are there any plans to fix any time soon?
thesamet commented
I am actively working on merging this one. Anticipating a resolution soon.