You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to migrate a project to Scala 3 and am following the migration guide. At the migrateTypes step, I'm running into this error:
[info] Defining scalaVersion
[info] The new value will be used by Compile / bspBuildTarget, Compile / dependencyTreeCrossProjectId and 71 others.
[info] Run `last` for details.
[info] Reapplying settings...
[info] set current project to <redacted> (in build file:<redacted>)
[info]
[info] Migrating types in <redacted> / Compile
[info]
bad option '-Ymacro-annotations' was ignored
bad option '-Xsource:3' was ignoredeTypes 1s
missing argument for option -Wunused
scalac -help gives more information
[error] Migration of <redacted> / compile failed.
[error] stack trace is suppressed; run last internalMigrateTypes for the full output
[error] (internalMigrateTypes) java.util.NoSuchElementException: None.get
[error] Total time: 3 s, completed 12 Jan 2024, 5:05:32 pm
[info] Defining scalaVersion
[info] The new value will be used by Compile / bspBuildTarget, Compile / dependencyTreeCrossProjectId and 71 others.
[info] Run `last` for details.
[info] Reapplying settings...
[info] set current project to <redacted> (in build file:<redacted>)
[error] Migration of <redacted> failed.
So as suggested, I ran the command given:
sbt:<redacted>> last internalMigrateTypes
[error] java.util.NoSuchElementException: None.get
[error] at scala.None$.get(Option.scala:627)
[error] at scala.None$.get(Option.scala:626)
[error] at migrate.compiler.interfaces.Scala3Driver.setup(Scala3Driver.java:22)
[error] at migrate.compiler.interfaces.Scala3Driver.setupCompiler(Scala3Driver.java:18)
[error] at migrate.compiler.interfaces.Scala3Compiler.setup(Scala3Compiler.java:46)
[error] at migrate.Scala3Migrate.$anonfun$setupScala3Compiler$2(Scala3Migrate.scala:89)
[error] at scala.util.Try$.apply(Try.scala:210)
[error] at migrate.Scala3Migrate.setupScala3Compiler(Scala3Migrate.scala:89)
[error] at migrate.Scala3Migrate.migrate(Scala3Migrate.scala:49)
[error] at migrate.interfaces.MigrateImpl.$anonfun$migrate$15(MigrateImpl.scala:54)
[error] at scala.util.Success.flatMap(Try.scala:258)
[error] at migrate.interfaces.MigrateImpl.$anonfun$migrate$13(MigrateImpl.scala:40)
[error] at scala.util.Success.flatMap(Try.scala:258)
[error] at migrate.interfaces.MigrateImpl.$anonfun$migrate$12(MigrateImpl.scala:39)
[error] at scala.util.Success.flatMap(Try.scala:258)
[error] at migrate.interfaces.MigrateImpl.$anonfun$migrate$11(MigrateImpl.scala:38)
[error] at scala.util.Success.flatMap(Try.scala:258)
[error] at migrate.interfaces.MigrateImpl.$anonfun$migrate$8(MigrateImpl.scala:36)
[error] at scala.util.Success.flatMap(Try.scala:258)
[error] at migrate.interfaces.MigrateImpl.$anonfun$migrate$5(MigrateImpl.scala:34)
[error] at scala.util.Success.flatMap(Try.scala:258)
[error] at migrate.interfaces.MigrateImpl.$anonfun$migrate$4(MigrateImpl.scala:33)
[error] at scala.util.Success.flatMap(Try.scala:258)
[error] at migrate.interfaces.MigrateImpl.$anonfun$migrate$2(MigrateImpl.scala:32)
[error] at scala.util.Success.flatMap(Try.scala:258)
[error] at migrate.interfaces.MigrateImpl.migrate(MigrateImpl.scala:31)
[error] at migrate.TypeInferenceMigration$.$anonfun$migrateConfig$4(TypeInferenceMigration.scala:51)
[error] at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
[error] at scala.util.Try$.apply(Try.scala:213)
[error] at migrate.TypeInferenceMigration$.$anonfun$migrateConfig$1(TypeInferenceMigration.scala:40)
[error] at migrate.TypeInferenceMigration$.$anonfun$migrateConfig$1$adapted(TypeInferenceMigration.scala:29)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:63)
[error] at sbt.std.Transform$$anon$4.work(Transform.scala:69)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
[error] at sbt.Execute.work(Execute.scala:292)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
[error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
[error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[error] at java.base/java.lang.Thread.run(Thread.java:833)
[error] (internalMigrateTypes) java.util.NoSuchElementException: None.get
This is unfortunately not useful to the user.
It turns out, when you look a bit more closely at the output, there is a hint at what is actually the problem:
missing argument for option -Wunused
I removed the option and it works. It would be great if this message is shown in the [error] output instead of the exception.
The version of the plugin I used is 0.6.2.
The text was updated successfully, but these errors were encountered:
I'm trying to migrate a project to Scala 3 and am following the migration guide. At the migrateTypes step, I'm running into this error:
So as suggested, I ran the command given:
This is unfortunately not useful to the user.
It turns out, when you look a bit more closely at the output, there is a hint at what is actually the problem:
I removed the option and it works. It would be great if this message is shown in the
[error]
output instead of the exception.The version of the plugin I used is 0.6.2.
The text was updated successfully, but these errors were encountered: