I suppose I know the error, but I have no idea how to solve it. Following is my sbt project build file.
ThisBuild / version := "0.1.0-SNAPSHOT" ThisBuild / scalaVersion := "3.4.1" lazy val myprj = (project in file("myprj")) .settings( scalaVersion := "3.4.1", libraryDependencies := Seq( "dev.zio" %% "zio" % "2.1.13", "dev.zio" %% "zio-http" % "3.0.1", "dev.zio" %% "zio-test" % "2.1.13" % Test, "dev.zio" %% "zio-test-sbt" % "2.1.13" % Test ) ) lazy val root = (project in file(".")).aggregate(myprj)
When executing sbt myprj/run, sbt throws errors
unhandled exception while running MegaPhase{protectedAccessors, extmethods, uncacheGivenAliases, checkStatic, elimByName, hoistSuperArgs, forwardDepChecks, specializeApplyMethods, tryCatchPatterns, patternMatcher} on /path/to/my/scala/code/zio2/http/src/main/scala/myprj/JWTApp.scala An unhandled exception was thrown in the compiler. Please file a crash report here: https://github.com/scala/scala3/issues/new/choose For non-enriched exceptions, compile with -Yno-enrich-error-messages. while compiling: /path/to/my/scala/code/zio2/http/src/main/scala/http/JWTApp.scala during phase: MegaPhase{protectedAccessors, extmethods, uncacheGivenAliases, checkStatic, elimByName, hoistSuperArgs, forwardDepChecks, specializeApplyMethods, tryCatchPatterns, patternMatcher} mode: Mode(ImplicitsEnabled) library version: version 2.13.14 compiler version: version 3.4.1 settings: -classpath .../home/userA/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.13.14/scala-library-2.13.14.jar...
I notice that in the classpath it contains scala version 2.13.14. I tried removing coursier cache, cs uninstall --all , and cs uninstall coursier. But the library version error still persists. How can I fix this problem? Thanks
submitted by /u/scalausr
[link] [comments]