Open unkarjedy opened 3 years ago
I've encountered the error message after migration to Scala 3, when using indentation syntax:
indented definitions expected, ... found
.
I could fix it by commenting out the sbt-scala3-migrate
plugin in project/plugins.sbt
.
...
// addSbtPlugin("ch.epfl.scala" % "sbt-scala3-migrate" % "0.5.1")
...
Then reload sbt project, then recompile project.
The error message indented definitions expected, ... found
disappeared.
I hope this helps :-)
Ref.: ID_RPWLKJQM4JSM
Started sbt-typelevel
project with scala3 as the base scala version, for some reason getting the same error in the common sbt-crossproject setup for automerge-scala
So
val Scala2Version = "2.13.10"
val Scala3Version = "3.2.0"
ThisBuild / crossScalaVersions := Seq(Scala2Version, Scala3Version)
ThisBuild / scalaVersion := Scala3Version
Gives me indented definitions expected, ... found
errors
while
val Scala3Version = "3.2.0"
ThisBuild / scalaVersion := Scala3Version
...does not
So, it's something sbt-crossproject
related.
Compiler version
Minimized code
create simple file with indentation-based syntax for template definition of package definition
or
Output
Compile the code, see the compiler message:
The message misleads:
def foo
is the one-no-indent
is providedExpectation
The compiler should say something like
OR
OR
OR something else...