sbt gets stuck and goes OutOfMemory - scala

sbt gets stuck when trying to compile this project (snowplow/snowplow, branch sbt_issue) and goes OutOfMemory:
$ sbt compile
[info] Loading settings for project global-plugins from metals.sbt ...
[info] Loading global plugins from /home/ben/.sbt/1.0/plugins
[info] Loading settings for project beam-enrich-build from plugins.sbt ...
[info] Loading project definition from /home/ben/code/snowplow/3-enrich/beam-enrich/project
[info] Loading settings for project beam-enrich from build.sbt ...
[info] Set current project to beam-enrich (in build file:/home/ben/code/snowplow/3-enrich/beam-enrich/)
[info] Executing in batch mode. For better performance use sbt's shell
[info] Compiling 5 Scala sources to /home/ben/code/snowplow/3-enrich/beam-enrich/target/scala-2.12/classes
[error] ## Exception when compiling 5 sources to /home/ben/code/snowplow/3-enrich/beam-enrich/target/scala-2.12/classes
[error] Java heap space
[error] scala.reflect.api.Trees$Transformer.transformTrees(Trees.scala:2567)
[error] scala.reflect.internal.Trees.itransform(Trees.scala:1410)
[error] scala.reflect.internal.Trees.itransform$(Trees.scala:1372)
[error] scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:27)
[error] scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:27)
[error] scala.reflect.api.Trees$Transformer.transform(Trees.scala:2563)
[error] scala.reflect.internal.Trees$Duplicator.transform(Trees.scala:1706)
[error] scala.reflect.internal.Trees$Duplicator.transform(Trees.scala:1703)
[error] scala.reflect.internal.Trees.$anonfun$itransform$1(Trees.scala:1393)
[error] scala.reflect.internal.Trees$$Lambda$3568/531009023.apply(Unknown Source)
[error] scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2608)
[error] scala.reflect.internal.Trees.itransform(Trees.scala:1392)
[error] scala.reflect.internal.Trees.itransform$(Trees.scala:1372)
[error] scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:27)
[error] scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:27)
[error] scala.reflect.api.Trees$Transformer.transform(Trees.scala:2563)
[error] scala.reflect.internal.Trees$Duplicator.transform(Trees.scala:1706)
[error] scala.reflect.internal.Trees$Duplicator.transform(Trees.scala:1703)
[error] scala.reflect.api.Trees$Transformer.transformValDef(Trees.scala:2578)
[error] scala.reflect.api.Trees$Transformer.$anonfun$transformValDefs$1(Trees.scala:2581)
[error] scala.reflect.api.Trees$Transformer.transformValDefs(Trees.scala:2581)
[error] scala.reflect.api.Trees$Transformer.$anonfun$transformValDefss$1(Trees.scala:2584)
[error] scala.reflect.api.Trees$Transformer.transformValDefss(Trees.scala:2584)
[error] scala.reflect.internal.Trees.$anonfun$itransform$2(Trees.scala:1398)
[error] scala.reflect.internal.Trees$$Lambda$3566/671842794.apply(Unknown Source)
[error] scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2608)
[error] scala.reflect.internal.Trees.itransform(Trees.scala:1397)
[error] scala.reflect.internal.Trees.itransform$(Trees.scala:1372)
[error] scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:27)
[error] scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:27)
[error] scala.reflect.api.Trees$Transformer.transform(Trees.scala:2563)
[error] scala.reflect.internal.Trees$Duplicator.transform(Trees.scala:1706)
[error]
[error] java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space
[error] at java.util.concurrent.FutureTask.report(FutureTask.java:122)
[error] at java.util.concurrent.FutureTask.get(FutureTask.java:192)
[error] at sbt.ConcurrentRestrictions$$anon$4.take(ConcurrentRestrictions.scala:213)
[error] at sbt.Execute.next$1(Execute.scala:110)
[error] at sbt.Execute.processAll(Execute.scala:113)
[error] at sbt.Execute.runKeep(Execute.scala:90)
[error] at sbt.EvaluateTask$.liftedTree1$1(EvaluateTask.scala:420)
[error] at sbt.EvaluateTask$.run$1(EvaluateTask.scala:419)
[error] at sbt.EvaluateTask$.runTask(EvaluateTask.scala:438)
[error] at sbt.internal.Aggregation$.$anonfun$timedRun$4(Aggregation.scala:99)
[error] at sbt.EvaluateTask$.withStreams(EvaluateTask.scala:355)
[error] at sbt.internal.Aggregation$.timedRun(Aggregation.scala:97)
[error] at sbt.internal.Aggregation$.runTasks(Aggregation.scala:111)
[error] at sbt.internal.Aggregation$.$anonfun$applyTasks$1(Aggregation.scala:67)
[error] at sbt.Command$.$anonfun$applyEffect$2(Command.scala:137)
[error] at sbt.internal.Aggregation$.$anonfun$evaluatingParser$11(Aggregation.scala:212)
[error] at sbt.internal.Act$.$anonfun$actParser0$3(Act.scala:435)
[error] at sbt.Command$.process(Command.scala:181)
[error] at sbt.MainLoop$.processCommand(MainLoop.scala:151)
[error] at sbt.MainLoop$.$anonfun$next$2(MainLoop.scala:139)
[error] at sbt.State$$anon$1.runCmd$1(State.scala:246)
[error] at sbt.State$$anon$1.process(State.scala:250)
[error] at sbt.MainLoop$.$anonfun$next$1(MainLoop.scala:139)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] at sbt.MainLoop$.next(MainLoop.scala:139)
[error] at sbt.MainLoop$.run(MainLoop.scala:132)
[error] at sbt.MainLoop$.$anonfun$runWithNewLog$1(MainLoop.scala:110)
[error] at sbt.io.Using.apply(Using.scala:22)
[error] at sbt.MainLoop$.runWithNewLog(MainLoop.scala:104)
[error] at sbt.MainLoop$.runAndClearLast(MainLoop.scala:59)
[error] at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:44)
[error] at sbt.MainLoop$.runLogged(MainLoop.scala:35)
[error] at sbt.StandardMain$.runManaged(Main.scala:138)
[error] at sbt.xMain.run(Main.scala:89)
[error] at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:111)
[error] at xsbt.boot.Launch$.withContextLoader(Launch.scala:130)
[error] at xsbt.boot.Launch$.run(Launch.scala:111)
[error] at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:37)
[error] at xsbt.boot.Launch$.launch(Launch.scala:119)
[error] at xsbt.boot.Launch$.apply(Launch.scala:20)
[error] at xsbt.boot.Boot$.runImpl(Boot.scala:56)
[error] at xsbt.boot.Boot$.main(Boot.scala:18)
[error] at xsbt.boot.Boot.main(Boot.scala)
[error] Caused by: java.lang.OutOfMemoryError: Java heap space
[error] at scala.reflect.api.Trees$Transformer.transformTrees(Trees.scala:2567)
[error] at scala.reflect.internal.Trees.itransform(Trees.scala:1410)
[error] at scala.reflect.internal.Trees.itransform$(Trees.scala:1372)
[error] at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:27)
[error] at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:27)
[error] at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2563)
[error] at scala.reflect.internal.Trees$Duplicator.transform(Trees.scala:1706)
[error] at scala.reflect.internal.Trees$Duplicator.transform(Trees.scala:1703)
[error] at scala.reflect.internal.Trees.$anonfun$itransform$1(Trees.scala:1393)
[error] at scala.reflect.internal.Trees$$Lambda$3568/531009023.apply(Unknown Source)
[error] at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2608)
[error] at scala.reflect.internal.Trees.itransform(Trees.scala:1392)
[error] at scala.reflect.internal.Trees.itransform$(Trees.scala:1372)
[error] at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:27)
[error] at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:27)
[error] at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2563)
[error] at scala.reflect.internal.Trees$Duplicator.transform(Trees.scala:1706)
[error] at scala.reflect.internal.Trees$Duplicator.transform(Trees.scala:1703)
[error] at scala.reflect.api.Trees$Transformer.transformValDef(Trees.scala:2578)
[error] at scala.reflect.api.Trees$Transformer.$anonfun$transformValDefs$1(Trees.scala:2581)
[error] at scala.reflect.api.Trees$Transformer.transformValDefs(Trees.scala:2581)
[error] at scala.reflect.api.Trees$Transformer.$anonfun$transformValDefss$1(Trees.scala:2584)
[error] at scala.reflect.api.Trees$Transformer.transformValDefss(Trees.scala:2584)
[error] at scala.reflect.internal.Trees.$anonfun$itransform$2(Trees.scala:1398)
[error] at scala.reflect.internal.Trees$$Lambda$3566/671842794.apply(Unknown Source)
[error] at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2608)
[error] at scala.reflect.internal.Trees.itransform(Trees.scala:1397)
[error] at scala.reflect.internal.Trees.itransform$(Trees.scala:1372)
[error] at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:27)
[error] at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:27)
[error] at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2563)
[error] at scala.reflect.internal.Trees$Duplicator.transform(Trees.scala:1706)
[error] java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space
[error] Use 'last' for the full log.
It was compiling well and quickly and the problem occured after I changed some return types of a few functions.
The issue first occurred on:
Debian Stretch
scala 2.12.8
sbt 1.2.8
java 1.8 (both openjdk and oracle jdk)
I tried several versions of Scala and sbt but same problem. The bug could be reproduced on Travis and on Mac OS.
I don't think that memory is the problem here, as I allocated plenty:
export SBT_OPTS="-Xms4G -Xmx8G -Xss8M -XX:MaxMetaspaceSize=2G -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC"
Any idea what could be wrong or how I could troubleshoot this?

Related

Swagger integration with scala and play 2.7 framework and sbt 1.5

I am trying to integrate swagger with my sbt scala project
I am using
Sbt - 1.5.1
Play - 2.7.3
Scala - 2.13
I am getting the following error
not found: https://jcenter.bintray.com/com/iheart/play-swagger_2.13/0.10.4/play-swagger_2.13-0.10.4.pom
[error] at lmcoursier.CoursierDependencyResolution.unresolvedWarningOrThrow(CoursierDependencyResolution.scala:258)
[error] at lmcoursier.CoursierDependencyResolution.$anonfun$update$38(CoursierDependencyResolution.scala:227)
[error] at scala.util.Either$LeftProjection.map(Either.scala:573)
[error] at lmcoursier.CoursierDependencyResolution.update(CoursierDependencyResolution.scala:227)
[error] at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:60)
[error] at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:59)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:133)
[error] at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:73)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$20(LibraryManagement.scala:146)
[error] at scala.util.control.Exception$Catch.apply(Exception.scala:228)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:146)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:127)
[error] at sbt.util.Tracked$.$anonfun$inputChangedW$1(Tracked.scala:219)
[error] at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:160)
[error] at sbt.Classpaths$.$anonfun$updateTask0$1(Defaults.scala:3667)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] at sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error] at sbt.Execute.work(Execute.scala:291)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
[error] at java.base/java.lang.Thread.run(Thread.java:832)
Tried multiple versions of swagger. Any suggestions?
You can check available versions on Maven central at https://mvnrepository.com/artifact/com.iheart/play-swagger
You'll see that there is no version published for Play 2.7 and Scala 2.13.
You may want to open an issue on the GitHub of this project to ask for such a release.

How to resolve [error] bad option: '-Ybackend-parallelism'?

I am trying to run sbt publishLocal on the spotify scio project following https://spotify.github.io/scio/Getting-Started.html guide. However, I receive the following error log:
PS C:\tools\scio> sbt publishLocal
[info] welcome to sbt 1.4.7 (Amazon.com Inc. Java 1.8.0_265)
[info] loading global plugins from C:\Users\ROCKEM\.sbt\1.0\plugins
[info] loading settings for project scio-build from plugins.sbt ...
[info] loading project definition from C:\tools\scio\project
[warn] There may be incompatibilities among your library dependencies; run 'evicted' to see detailed eviction warnings.
[info] loading settings for project scio from apache.sbt,build.sbt ...
[info] resolving key references (35839 settings) ...
[info] set current project to scio (in build file:/C:/tools/scio/)
[info] Wrote C:\tools\scio\scio-sql\target\scala-2.13\scio-sql_2.13-0.10.0-beta3+6-bb551a41-SNAPSHOT.pom
[info] Wrote C:\tools\scio\scio-avro\target\scala-2.13\scio-avro_2.13-0.10.0-beta3+6-bb551a41-SNAPSHOT.pom
[info] Wrote C:\tools\scio\scio-core\target\scala-2.13\scio-core_2.13-0.10.0-beta3+6-bb551a41-SNAPSHOT.pom
[info] Wrote C:\tools\scio\scio-macros\target\scala-2.13\scio-macros_2.13-0.10.0-beta3+6-bb551a41-SNAPSHOT.pom
[info] Wrote C:\tools\scio\scio-test\target\scala-2.13\scio-test_2.13-0.10.0-beta3+6-bb551a41-SNAPSHOT.pom
[info] Wrote C:\tools\scio\scio-parquet\target\scala-2.13\scio-parquet_2.13-0.10.0-beta3+6-bb551a41-SNAPSHOT.pom
[info] Wrote C:\tools\scio\scio-tensorflow\target\scala-2.13\scio-tensorflow_2.13-0.10.0-beta3+6-bb551a41-SNAPSHOT.pom
[info] Wrote C:\tools\scio\scio-smb\target\scala-2.13\scio-smb_2.13-0.10.0-beta3+6-bb551a41-SNAPSHOT.pom
[info] Wrote C:\tools\scio\scio-elasticsearch\es7\target\scala-2.13\scio-elasticsearch7_2.13-0.10.0-beta3+6-bb551a41-SNAPSHOT.pom
[info] Wrote C:\tools\scio\scio-redis\target\scala-2.13\scio-redis_2.13-0.10.0-beta3+6-bb551a41-SNAPSHOT.pom
[info] Wrote C:\tools\scio\scio-cassandra\cassandra3\target\scala-2.13\scio-cassandra3_2.13-0.10.0-beta3+6-bb551a41-SNAPSHOT.pom
[info] Wrote C:\tools\scio\scio-jdbc\target\scala-2.13\scio-jdbc_2.13-0.10.0-beta3+6-bb551a41-SNAPSHOT.pom
[info] Wrote C:\tools\scio\scio-google-cloud-platform\target\scala-2.13\scio-google-cloud-platform_2.13-0.10.0-beta3+6-bb551a41-SNAPSHOT.pom
[info] Wrote C:\tools\scio\scio-elasticsearch\es6\target\scala-2.13\scio-elasticsearch6_2.13-0.10.0-beta3+6-bb551a41-SNAPSHOT.pom
[info] Wrote C:\tools\scio\scio-extra\target\scala-2.13\scio-extra_2.13-0.10.0-beta3+6-bb551a41-SNAPSHOT.pom
[info] Main Scala API documentation to C:\tools\scio\scio-macros\target\scala-2.13\api...
[info] Wrote C:\tools\scio\scio-repl\target\scala-2.13\scio-repl_2.13-0.10.0-beta3+6-bb551a41-SNAPSHOT.pom
[info] Main Scala API documentation to C:\tools\scio\scio-core\target\scala-2.13\api...
[error] invalid setting for -Ybackend-parallelism must be between 1 and 16
[error] invalid setting for -Ybackend-parallelism must be between 1 and 16
[error] bad option: '-Ybackend-parallelism'
[error] bad option: '-Ybackend-parallelism'
[info] Main Scala API documentation to C:\tools\scio\scio-elasticsearch\es7\target\scala-2.13\api...
[info] Main Scala API documentation to C:\tools\scio\scio-sql\target\scala-2.13\api...
[error] invalid setting for -Ybackend-parallelism must be between 1 and 16
[error] bad option: '-Ybackend-parallelism'
[info] Main Scala API documentation to C:\tools\scio\scio-cassandra\cassandra3\target\scala-2.13\api...
[error] invalid setting for -Ybackend-parallelism must be between 1 and 16
[error] bad option: '-Ybackend-parallelism'
[info] Main Scala API documentation to C:\tools\scio\scio-redis\target\scala-2.13\api...
[error] invalid setting for -Ybackend-parallelism must be between 1 and 16
[error] bad option: '-Ybackend-parallelism'
[error] invalid setting for -Ybackend-parallelism must be between 1 and 16
[info] Main Scala API documentation to C:\tools\scio\scio-smb\target\scala-2.13\api...
[error] bad option: '-Ybackend-parallelism'
[info] Main Scala API documentation to C:\tools\scio\scio-avro\target\scala-2.13\api...
[error] invalid setting for -Ybackend-parallelism must be between 1 and 16
[error] bad option: '-Ybackend-parallelism'
[error] invalid setting for -Ybackend-parallelism must be between 1 and 16
[error] bad option: '-Ybackend-parallelism'
[info] Main Scala API documentation to C:\tools\scio\scio-google-cloud-platform\target\scala-2.13\api...
[error] invalid setting for -Ybackend-parallelism must be between 1 and 16
[error] bad option: '-Ybackend-parallelism'
[info] compiling 66 Scala sources and 7 Java sources to C:\tools\scio\scio-google-cloud-platform\target\scala-2.13\classes ...
[info] Main Scala API documentation to C:\tools\scio\scio-elasticsearch\es6\target\scala-2.13\api...
[error] invalid setting for -Ybackend-parallelism must be between 1 and 16
[error] bad option: '-Ybackend-parallelism'
[info] Main Scala API documentation to C:\tools\scio\scio-jdbc\target\scala-2.13\api...
[error] invalid setting for -Ybackend-parallelism must be between 1 and 16
[error] bad option: '-Ybackend-parallelism'
[info] Main Scala API documentation to C:\tools\scio\scio-parquet\target\scala-2.13\api...
[error] invalid setting for -Ybackend-parallelism must be between 1 and 16
[error] bad option: '-Ybackend-parallelism'
[info] Main Scala API documentation to C:\tools\scio\scio-tensorflow\target\scala-2.13\api...
[error] invalid setting for -Ybackend-parallelism must be between 1 and 16
[error] bad option: '-Ybackend-parallelism'
[info] Main Scala API documentation to C:\tools\scio\scio-test\target\scala-2.13\api...
[error] invalid setting for -Ybackend-parallelism must be between 1 and 16
[error] bad option: '-Ybackend-parallelism'
[error] Symbol 'type com.spotify.scio.bigquery.syntax.ScioContextSyntax' is missing from the classpath.
[error] This symbol is required by 'package com.spotify.scio.bigquery.package'.
[error] Make sure that type ScioContextSyntax is in your classpath and check for conflicting dependencies with `-Ylog-classpath`.
[error] A full rebuild may help if 'package.class' was compiled against an incompatible version of com.spotify.scio.bigquery.syntax.
[error] Symbol 'type com.spotify.scio.bigquery.syntax.TableRowSyntax' is missing from the classpath.
[error] This symbol is required by 'package com.spotify.scio.bigquery.package'.
[error] Make sure that type TableRowSyntax is in your classpath and check for conflicting dependencies with `-Ylog-classpath`.
[error] A full rebuild may help if 'package.class' was compiled against an incompatible version of com.spotify.scio.bigquery.syntax.
[error] Symbol 'type com.spotify.scio.bigquery.syntax.TableReferenceSyntax' is missing from the classpath.
[error] This symbol is required by 'package com.spotify.scio.bigquery.package'.
[error] Make sure that type TableReferenceSyntax is in your classpath and check for conflicting dependencies with `-Ylog-classpath`.
[error] A full rebuild may help if 'package.class' was compiled against an incompatible version of com.spotify.scio.bigquery.syntax.
[error] three errors found
[error] Scaladoc generation failed
[error] at xsbt.Runner.run(ScaladocBridge.scala:50)
[error] at xsbt.ScaladocBridge.run(ScaladocBridge.scala:21)
[error] at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:155)
[error] at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:134)
[error] at sbt.Doc$.$anonfun$scaladoc$1(Doc.scala:52)
[error] at sbt.Doc$.$anonfun$scaladoc$1$adapted(Doc.scala:40)
[error] at sbt.RawCompileLike$.$anonfun$prepare$1(RawCompileLike.scala:79)
[error] at sbt.RawCompileLike$.$anonfun$prepare$1$adapted(RawCompileLike.scala:72)
[error] at sbt.RawCompileLike$.$anonfun$cached$4(RawCompileLike.scala:63)
[error] at sbt.RawCompileLike$.$anonfun$cached$4$adapted(RawCompileLike.scala:61)
[error] at sbt.util.Tracked$.$anonfun$inputChangedW$1(Tracked.scala:219)
[error] at sbt.RawCompileLike$.$anonfun$cached$1(RawCompileLike.scala:68)
[error] at sbt.RawCompileLike$.$anonfun$cached$1$adapted(RawCompileLike.scala:52)
[error] at sbt.Defaults$.$anonfun$docTaskSettings$3(Defaults.scala:1978)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] at sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error] at sbt.Execute.work(Execute.scala:291)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
[error] Scaladoc generation failed
[error] at xsbt.Runner.run(ScaladocBridge.scala:50)
[error] at xsbt.ScaladocBridge.run(ScaladocBridge.scala:21)
[error] at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:155)
[error] at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:134)
[error] at sbt.Doc$.$anonfun$scaladoc$1(Doc.scala:52)
[error] at sbt.Doc$.$anonfun$scaladoc$1$adapted(Doc.scala:40)
[error] at sbt.RawCompileLike$.$anonfun$prepare$1(RawCompileLike.scala:79)
[error] at sbt.RawCompileLike$.$anonfun$prepare$1$adapted(RawCompileLike.scala:72)
[error] at sbt.RawCompileLike$.$anonfun$cached$4(RawCompileLike.scala:63)
[error] at sbt.RawCompileLike$.$anonfun$cached$4$adapted(RawCompileLike.scala:61)
[error] at sbt.util.Tracked$.$anonfun$inputChangedW$1(Tracked.scala:219)
[error] at sbt.RawCompileLike$.$anonfun$cached$1(RawCompileLike.scala:68)
[error] at sbt.RawCompileLike$.$anonfun$cached$1$adapted(RawCompileLike.scala:52)
[error] at sbt.Defaults$.$anonfun$docTaskSettings$3(Defaults.scala:1978)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] at sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error] at sbt.Execute.work(Execute.scala:291)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
[error] Scaladoc generation failed
[error] at xsbt.Runner.run(ScaladocBridge.scala:50)
[error] at xsbt.ScaladocBridge.run(ScaladocBridge.scala:21)
[error] at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:155)
[error] at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:134)
[error] at sbt.Doc$.$anonfun$scaladoc$1(Doc.scala:52)
[error] at sbt.Doc$.$anonfun$scaladoc$1$adapted(Doc.scala:40)
[error] at sbt.RawCompileLike$.$anonfun$prepare$1(RawCompileLike.scala:79)
[error] at sbt.RawCompileLike$.$anonfun$prepare$1$adapted(RawCompileLike.scala:72)
[error] at sbt.RawCompileLike$.$anonfun$cached$4(RawCompileLike.scala:63)
[error] at sbt.RawCompileLike$.$anonfun$cached$4$adapted(RawCompileLike.scala:61)
[error] at sbt.util.Tracked$.$anonfun$inputChangedW$1(Tracked.scala:219)
[error] at sbt.RawCompileLike$.$anonfun$cached$1(RawCompileLike.scala:68)
[error] at sbt.RawCompileLike$.$anonfun$cached$1$adapted(RawCompileLike.scala:52)
[error] at sbt.Defaults$.$anonfun$docTaskSettings$3(Defaults.scala:1978)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] at sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error] at sbt.Execute.work(Execute.scala:291)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
[error] Scaladoc generation failed
[error] at xsbt.Runner.run(ScaladocBridge.scala:50)
[error] at xsbt.ScaladocBridge.run(ScaladocBridge.scala:21)
[error] at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:155)
[error] at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:134)
[error] at sbt.Doc$.$anonfun$scaladoc$1(Doc.scala:52)
[error] at sbt.Doc$.$anonfun$scaladoc$1$adapted(Doc.scala:40)
[error] at sbt.RawCompileLike$.$anonfun$prepare$1(RawCompileLike.scala:79)
[error] at sbt.RawCompileLike$.$anonfun$prepare$1$adapted(RawCompileLike.scala:72)
[error] at sbt.RawCompileLike$.$anonfun$cached$4(RawCompileLike.scala:63)
[error] at sbt.RawCompileLike$.$anonfun$cached$4$adapted(RawCompileLike.scala:61)
[error] at sbt.util.Tracked$.$anonfun$inputChangedW$1(Tracked.scala:219)
[error] at sbt.RawCompileLike$.$anonfun$cached$1(RawCompileLike.scala:68)
[error] at sbt.RawCompileLike$.$anonfun$cached$1$adapted(RawCompileLike.scala:52)
[error] at sbt.Defaults$.$anonfun$docTaskSettings$3(Defaults.scala:1978)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] at sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error] at sbt.Execute.work(Execute.scala:291)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
[error] Scaladoc generation failed
[error] at xsbt.Runner.run(ScaladocBridge.scala:50)
[error] at xsbt.ScaladocBridge.run(ScaladocBridge.scala:21)
[error] at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:155)
[error] at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:134)
[error] at sbt.Doc$.$anonfun$scaladoc$1(Doc.scala:52)
[error] at sbt.Doc$.$anonfun$scaladoc$1$adapted(Doc.scala:40)
[error] at sbt.RawCompileLike$.$anonfun$prepare$1(RawCompileLike.scala:79)
[error] at sbt.RawCompileLike$.$anonfun$prepare$1$adapted(RawCompileLike.scala:72)
[error] at sbt.RawCompileLike$.$anonfun$cached$4(RawCompileLike.scala:63)
[error] at sbt.RawCompileLike$.$anonfun$cached$4$adapted(RawCompileLike.scala:61)
[error] at sbt.util.Tracked$.$anonfun$inputChangedW$1(Tracked.scala:219)
[error] at sbt.RawCompileLike$.$anonfun$cached$1(RawCompileLike.scala:68)
[error] at sbt.RawCompileLike$.$anonfun$cached$1$adapted(RawCompileLike.scala:52)
[error] at sbt.Defaults$.$anonfun$docTaskSettings$3(Defaults.scala:1978)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] at sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error] at sbt.Execute.work(Execute.scala:291)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
[error] Scaladoc generation failed
[error] at xsbt.Runner.run(ScaladocBridge.scala:50)
[error] at xsbt.ScaladocBridge.run(ScaladocBridge.scala:21)
[error] at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:155)
[error] at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:134)
[error] at sbt.Doc$.$anonfun$scaladoc$1(Doc.scala:52)
[error] at sbt.Doc$.$anonfun$scaladoc$1$adapted(Doc.scala:40)
[error] at sbt.RawCompileLike$.$anonfun$prepare$1(RawCompileLike.scala:79)
[error] at sbt.RawCompileLike$.$anonfun$prepare$1$adapted(RawCompileLike.scala:72)
[error] at sbt.RawCompileLike$.$anonfun$cached$4(RawCompileLike.scala:63)
[error] at sbt.RawCompileLike$.$anonfun$cached$4$adapted(RawCompileLike.scala:61)
[error] at sbt.util.Tracked$.$anonfun$inputChangedW$1(Tracked.scala:219)
[error] at sbt.RawCompileLike$.$anonfun$cached$1(RawCompileLike.scala:68)
[error] at sbt.RawCompileLike$.$anonfun$cached$1$adapted(RawCompileLike.scala:52)
[error] at sbt.Defaults$.$anonfun$docTaskSettings$3(Defaults.scala:1978)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] at sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error] at sbt.Execute.work(Execute.scala:291)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
[error] (scio-avro / Compile / doc) Scaladoc generation failed
[error] (scio-cassandra3 / Compile / doc) Scaladoc generation failed
[error] (scio-tensorflow / Compile / doc) Scaladoc generation failed
[error] (scio-macros / Compile / doc) Scaladoc generation failed
[error] (scio-core / Compile / doc) Scaladoc generation failed
[error] (scio-google-cloud-platform / Compile / compileIncremental) Compilation failed
[error] (scio-elasticsearch6 / Compile / doc) Scaladoc generation failed
[error] (scio-smb / Compile / doc) Scaladoc generation failed
[error] (scio-redis / Compile / doc) Scaladoc generation failed
[error] (scio-sql / Compile / doc) Scaladoc generation failed
[error] (scio-jdbc / Compile / doc) Scaladoc generation failed
[error] (scio-elasticsearch7 / Compile / doc) Scaladoc generation failed
[error] (scio-parquet / Compile / doc) Scaladoc generation failed
[error] (scio-test / Compile / doc) Scaladoc generation failed
[error] (scio-google-cloud-platform / Compile / doc) Scaladoc generation failed
[error] Total time: 23 s, completed 05-Feb-2021 10:52:19
Build.sbt can be viewed here.
How can I fix the backend parallelism issue?

SBT Threw StackOverflowError During Compilation

The setup for my environment is SBT 1.3.0-RC1, Scala 2.12.8 and Java 1.8.0_212. The SBT threw an exception during compile,
[IJ]sbt:foobar> compile
[info] Compiling 15 Scala sources and 1 Java source to U:\workspace\foobar\target\scala-2.12\classes ...
[error] ## Exception when compiling 16 sources to U:\workspace\foobar\target\scala-2.12\classes
[error] null
[error] scala.reflect.internal.Trees.itransform(Trees.scala:1374)
[error] scala.reflect.internal.Trees.itransform$(Trees.scala:1372)
[error] scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:27)
[error] scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:27)
[error] scala.reflect.api.Trees$Transformer.transform(Trees.scala:2563)
[error] scala.reflect.internal.Trees$Duplicator.transform(Trees.scala:1706)
[error] scala.reflect.internal.Trees$Duplicator.transform(Trees.scala:1703)
[error] scala.reflect.internal.Trees.itransform(Trees.scala:1432)
[error] scala.reflect.internal.Trees.itransform$(Trees.scala:1372)
[error] scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:27)
[error] scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:27)
[error] scala.reflect.api.Trees$Transformer.transform(Trees.scala:2563)
[error] scala.reflect.internal.Trees$Duplicator.transform(Trees.scala:1706)
[error] scala.reflect.internal.Trees$Duplicator.transform(Trees.scala:1703)
[error] scala.reflect.internal.Trees.itransform(Trees.scala:1381)
[error] scala.reflect.internal.Trees.itransform$(Trees.scala:1372)
[error] scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:27)
[error] scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:27)
[error] scala.reflect.api.Trees$Transformer.transform(Trees.scala:2563)
[error] scala.reflect.internal.Trees$Duplicator.transform(Trees.scala:1706)
[error] scala.reflect.internal.Trees$Duplicator.transform(Trees.scala:1703)
[error] scala.reflect.internal.Trees.itransform(Trees.scala:1383)
[error] scala.reflect.internal.Trees.itransform$(Trees.scala:1372)
[error] scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:27)
[error] scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:27)
[error] scala.reflect.api.Trees$Transformer.transform(Trees.scala:2563)
[error] scala.reflect.internal.Trees$Duplicator.transform(Trees.scala:1706)
[error] scala.reflect.internal.Trees$Duplicator.transform(Trees.scala:1703)
[error] scala.reflect.api.Trees$Transformer.$anonfun$transformStats$1(Trees.scala:2597)
[error] scala.reflect.api.Trees$Transformer.transformStats(Trees.scala:2595)
[error] scala.reflect.internal.Trees.itransform(Trees.scala:1402)
[error] scala.reflect.internal.Trees.itransform$(Trees.scala:1372)
[error] scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:27)
[error] scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:27)
[error] scala.reflect.api.Trees$Transformer.transform(Trees.scala:2563)
[error] scala.reflect.internal.Trees$Duplicator.transform(Trees.scala:1706)
[error] scala.reflect.internal.Trees$Duplicator.transform(Trees.scala:1703)
[error] scala.reflect.internal.Trees.$anonfun$itransform$2(Trees.scala:1399)
[error] scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2608)
[error] scala.reflect.internal.Trees.itransform(Trees.scala:1397)
[error] scala.reflect.internal.Trees.itransform$(Trees.scala:1372)
[error] scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:27)
[error] scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:27)
[error] scala.reflect.api.Trees$Transformer.transform(Trees.scala:2563)
[error] scala.reflect.internal.Trees$Duplicator.transform(Trees.scala:1706)
[error] scala.reflect.internal.Trees$Duplicator.transform(Trees.scala:1703)
[error] scala.reflect.api.Trees$Transformer.$anonfun$transformStats$1(Trees.scala:2597)
[error] scala.reflect.api.Trees$Transformer.transformStats(Trees.scala:2595)
[error] scala.reflect.internal.Trees.itransform(Trees.scala:1440)
[error] scala.reflect.internal.Trees.itransform$(Trees.scala:1372)
[error] scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:27)
[error] scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:27)
[error] scala.reflect.api.Trees$Transformer.transform(Trees.scala:2563)
[error] scala.reflect.internal.Trees$Duplicator.transform(Trees.scala:1706)
[error] scala.reflect.internal.Trees$Duplicator.transform(Trees.scala:1703)
[error] scala.reflect.api.Trees$Transformer.transformTemplate(Trees.scala:2571)
[error] scala.reflect.internal.Trees.$anonfun$itransform$4(Trees.scala:1444)
[error] scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2608)
[error] scala.reflect.internal.Trees.itransform(Trees.scala:1443)
[error] scala.reflect.internal.Trees.itransform$(Trees.scala:1372)
[error] scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:27)
[error] scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:27)
[error] scala.reflect.api.Trees$Transformer.transform(Trees.scala:2563)
[error] scala.reflect.internal.Trees$Duplicator.transform(Trees.scala:1706)
[error] scala.reflect.internal.Trees$Duplicator.transform(Trees.scala:1703)
[error] scala.reflect.api.Trees$Transformer.$anonfun$transformStats$1(Trees.scala:2597)
[error] scala.reflect.api.Trees$Transformer.transformStats(Trees.scala:2595)
[error] scala.reflect.internal.Trees.itransform(Trees.scala:1402)
[error] scala.reflect.internal.Trees.itransform$(Trees.scala:1372)
[error] scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:27)
[error] scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:27)
[error] scala.reflect.api.Trees$Transformer.transform(Trees.scala:2563)
[error] scala.reflect.internal.Trees$Duplicator.transform(Trees.scala:1706)
[error] scala.reflect.internal.Trees$Duplicator.transform(Trees.scala:1703)
[error] scala.reflect.internal.Trees.itransform(Trees.scala:1436)
[error] scala.reflect.internal.Trees.itransform$(Trees.scala:1372)
[error] scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:27)
[error] scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:27)
[error] scala.reflect.api.Trees$Transformer.transform(Trees.scala:2563)
[error] scala.reflect.internal.Trees$Duplicator.transform(Trees.scala:1706)
[error] scala.reflect.internal.Trees.duplicateAndKeepPositions(Trees.scala:1739)
[error] scala.reflect.internal.Trees.duplicateAndKeepPositions$(Trees.scala:1739)
[error] scala.reflect.internal.SymbolTable.duplicateAndKeepPositions(SymbolTable.scala:27)
[error] scala.tools.nsc.typechecker.Macros$MacroExpander.$anonfun$expand$1(Macros.scala:638)
[error] scala.tools.nsc.Global.withInfoLevel(Global.scala:227)
[error] scala.tools.nsc.typechecker.Macros$MacroExpander.expand(Macros.scala:625)
[error] scala.tools.nsc.typechecker.Macros$MacroExpander.apply(Macros.scala:612)
...
[error] at scala.tools.nsc.Global.withInfoLevel(Global.scala:227)
[error] at scala.tools.nsc.typechecker.Macros$MacroExpander.expand(Macros.scala:625)
[error] at scala.tools.nsc.typechecker.Macros$MacroExpander.apply(Macros.scala:612)
[error] at scala.tools.nsc.typechecker.Macros.standardMacroExpand(Macros.scala:787)
[error] at scala.tools.nsc.typechecker.Macros.standardMacroExpand$(Macros.scala:785)
[error] at scala.tools.nsc.Global$$anon$4.standardMacroExpand(Global.scala:477)
[error] at scala.tools.nsc.typechecker.AnalyzerPlugins$$anon$12.default(AnalyzerPlugins.scala:439)
[error] at scala.tools.nsc.typechecker.AnalyzerPlugins$$anon$12.default(AnalyzerPlugins.scala:436)
[error] (Compile / compileIncremental) java.lang.StackOverflowError
The same error occurred for running command-line SBT. How do I fix this? Thanks
Updates #1
TL;DR Increase SBT thread stack size i.e. SBT_OPTS="-Xss2m" sbt clean compile
My project uses PureConfig and it is compiler heavy. Increasing the memory footprint clear the compiler from overflow exception. Case in point, my case class has a List or Option nested case class in its parameter. Coincidentally, the nested case class has a List or Option in its constructor,
case class Foo(bars: List[Bar])
case class Bar(name: String, url: Option[URL])
This will cause the compiler to throw a StackOverflowException. But with additional memory given to SBT, the compilation will go thru.
Run sbt with -mem flag.
sbt -mem 2048 compile
Doing this solved my problem when I get the same error few months before.
If running with -mem flag do not help you can also try increasing the JVM stack size.
-Xss256m -Xmx4096m
Update
Sometimes, missing build.properties in your project also gives the stackoverflow error. If it's missing add:
build.properties with your sbt-version
Update 2
If you are using PureConfig
PureConfig is a "compiler-heavy" library So, the Scala compiler lacks the resources to do a derivation that complex.So, try this
SBT_OPTS="-Xms512m -Xmx1536m -Xss2m"

Cannot Create IntelliJ Scala Project Due to Missing Ivy Module

I am using IntelliJ Community 2019.1. I am trying to create a new Scala project via SBT; however, when the project tries to build and dump project structure from SBT, I get the following error. SBT version 1.2.7; Scala version 2.11.12; JDK 1.8.0_202,
Error while importing sbt project:
[error] java.lang.NoClassDefFoundError: org/apache/ivy/core/module/id/ModuleRevisionId
[error] at sbt.Keys$.<init>(Keys.scala:439)
[error] at sbt.Keys$.<clinit>(Keys.scala)
[error] at sbt.Cross$.$anonfun$requireSession$1(Cross.scala:78)
[error] at sbt.Command$.$anonfun$applyEffect$3(Command.scala:142)
[error] at sbt.Command$.$anonfun$combine$2(Command.scala:147)
[error] at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:233)
[error] at scala.collection.immutable.List.foreach(List.scala:388)
[error] at scala.collection.TraversableLike.map(TraversableLike.scala:233)
[error] at scala.collection.TraversableLike.map$(TraversableLike.scala:226)
[error] at scala.collection.immutable.List.map(List.scala:294)
[error] at sbt.Command$.$anonfun$combine$1(Command.scala:147)
[error] at sbt.Command$.process(Command.scala:180)
[error] at sbt.MainLoop$.processCommand(MainLoop.scala:151)
[error] at sbt.MainLoop$.$anonfun$next$2(MainLoop.scala:139)
[error] at sbt.State$$anon$1.runCmd$1(State.scala:246)
[error] at sbt.State$$anon$1.process(State.scala:250)
[error] at sbt.MainLoop$.$anonfun$next$1(MainLoop.scala:139)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] at sbt.MainLoop$.next(MainLoop.scala:139)
[error] at sbt.MainLoop$.run(MainLoop.scala:132)
[error] at sbt.MainLoop$.$anonfun$runWithNewLog$1(MainLoop.scala:110)
[error] at sbt.io.Using.apply(Using.scala:22)
[error] at sbt.MainLoop$.runWithNewLog(MainLoop.scala:104)
[error] at sbt.MainLoop$.runAndClearLast(MainLoop.scala:59)
[error] at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:44)
[error] at sbt.MainLoop$.runLogged(MainLoop.scala:35)
[error] at sbt.StandardMain$.runManaged(Main.scala:138)
[error] at sbt.xMain.run(Main.scala:89)
[error] at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
[error] at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
[error] at xsbt.boot.Launch$.run(Launch.scala:109)
[error] at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
[error] at xsbt.boot.Launch$.launch(Launch.scala:117)
[error] at xsbt.boot.Launch$.apply(Launch.scala:18)
[error] at xsbt.boot.Boot$.runImpl(Boot.scala:56)
[error] at xsbt.boot.Boot$.main(Boot.scala:18)
[error] at xsbt.boot.Boot.main(Boot.scala)
[error] Caused by: java.lang.ClassNotFoundException: org.apache.ivy.core.module.id.ModuleRevisionId
[error] at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
[error] at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
[error] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[error] at sbt.Keys$.<init>(Keys.scala:439)
[error] at sbt.Keys$.<clinit>(Keys.scala)
[error] at sbt.Cross$.$anonfun$requireSession$1(Cross.scala:78)
[error] at sbt.Command$.$anonfun$applyEffect$3(Command.scala:142)
[error] at sbt.Command$.$anonfun$combine$2(Command.scala:147)
[error] at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:233)
[error] at scala.collection.immutable.List.foreach(List.scala:388)
[error] at scala.collection.TraversableLike.map(TraversableLike.scala:233)
[error] at scala.collection.TraversableLike.map$(TraversableLike.scala:226)
[error] at scala.collection.immutable.List.map(List.scala:294)
[error] at sbt.Command$.$anonfun$combine$1(Command.scala:147)
[error] at sbt.Command$.process(Command.scala:180)
[error] at sbt.MainLoop$.processCommand(MainLoop.scala:151)
[error] at sbt.MainLoop$.$anonfun$next$2(MainLoop.scala:139)
[error] at sbt.State$$anon$1.runCmd$1(State.scala:246)
[error] at sbt.State$$anon$1.process(State.scala:250)
[error] at sbt.MainLoop$.$anonfun$next$1(MainLoop.scala:139)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] at sbt.MainLoop$.next(MainLoop.scala:139)
[error] at sbt.MainLoop$.run(MainLoop.scala:132)
[error] at sbt.MainLoop$.$anonfun$runWithNewLog$1(MainLoop.scala:110)
[error] at sbt.io.Using.apply(Using.scala:22)
[error] at sbt.MainLoop$.runWithNewLog(MainLoop.scala:104)
[error] at sbt.MainLoop$.runAndClearLast(MainLoop.scala:59)
[error] at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:44)
[error] at sbt.MainLoop$.runLogged(MainLoop.scala:35)
[error] at sbt.StandardMain$.runManaged(Main.scala:138)
[error] at sbt.xMain.run(Main.scala:89)
[error] at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
[error] at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
[error] at xsbt.boot.Launch$.run(Launch.scala:109)
[error] at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
[error] at xsbt.boot.Launch$.launch(Launch.scala:117)
[error] at xsbt.boot.Launch$.apply(Launch.scala:18)
[error] at xsbt.boot.Boot$.runImpl(Boot.scala:56)
[error] at xsbt.boot.Boot$.main(Boot.scala:18)
[error] at xsbt.boot.Boot.main(Boot.scala)
[error] java.lang.NoClassDefFoundError: org/apache/ivy/core/module/id/ModuleRevisionId
I have tried re-installing IntelliJ, adding the apache ivy jars from Apache (and importing them in the build.sbt!), re-packaging, re-assembling, and restarting the IDE. None of which have worked to create a new project.
Any assistance in resolving the error is greatly appreciated. Thank you!
After a considerable amount of trial and error, Google searches, and frustration, I finally found and corrected the issue I was having!
There was an sbt version conflict; I was attempting to use sbt 1.2.7, but when I upgraded to sbt 1.2.8, all has been working as expected. I am able to create new projects via sbt, and build existing projects I've cloned from my company's enterprise GitHub. I hope this can help someone else save hours of work and frustration!

scala import error from Play starter projects

im getting this error when i try to import play 2.6.12 scala starter project in intellij
Scala plugin version:2017.2.13
Intellij version:Ultimate 2017.2.1
https://www.playframework.com/download#starters
Applying State transformations org.jetbrains.sbt.CreateTasks from /Users/qdt624/Library/Application Support/IntelliJIdea2017.2/Scala/launcher/sbt-structure-1.1.jar
[error] java.lang.ClassNotFoundException: org.jetbrains.sbt.CreateTasks$
[error] at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
[error] at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
[error] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[error] at java.lang.Class.forName0(Native Method)
[error] at java.lang.Class.forName(Class.java:348)
[error] at sbt.internal.inc.ModuleUtilities$.getObject(ModuleUtilities.scala:20)
[error] at sbt.BasicCommands$.$anonfun$call$5(BasicCommands.scala:203)
[error] at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:234)
[error] at scala.collection.immutable.List.foreach(List.scala:389)
[error] at scala.collection.TraversableLike.map(TraversableLike.scala:234)
[error] at scala.collection.TraversableLike.map$(TraversableLike.scala:227)
[error] at scala.collection.immutable.List.map(List.scala:295)
[error] at sbt.BasicCommands$.$anonfun$call$2(BasicCommands.scala:203)
[error] at sbt.Command$.$anonfun$applyEffect$4(Command.scala:134)
[error] at sbt.Command$.$anonfun$applyEffect$2(Command.scala:130)
[error] at sbt.MainLoop$.processCommand(MainLoop.scala:153)
[error] at sbt.MainLoop$.$anonfun$next$2(MainLoop.scala:136)
[error] at sbt.State$$anon$1.runCmd$1(State.scala:242)
[error] at sbt.State$$anon$1.process(State.scala:248)
[error] at sbt.MainLoop$.$anonfun$next$1(MainLoop.scala:136)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] at sbt.MainLoop$.next(MainLoop.scala:136)
[error] at sbt.MainLoop$.run(MainLoop.scala:129)
[error] at sbt.MainLoop$.$anonfun$runWithNewLog$1(MainLoop.scala:107)
[error] at sbt.io.Using.apply(Using.scala:22)
[error] at sbt.MainLoop$.runWithNewLog(MainLoop.scala:101)
[error] at sbt.MainLoop$.runAndClearLast(MainLoop.scala:57)
[error] at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:42)
[error] at sbt.MainLoop$.runLogged(MainLoop.scala:34)
[error] at sbt.StandardMain$.runManaged(Main.scala:113)
[error] at sbt.xMain.run(Main.scala:76)
[error] at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
[error] at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
[error] at xsbt.boot.Launch$.run(Launch.scala:109)
[error] at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
[error] at xsbt.boot.Launch$.launch(Launch.scala:117)
[error] at xsbt.boot.Launch$.apply(Launch.scala:18)
[error] at xsbt.boot.Boot$.runImpl(Boot.scala:41)
[error] at xsbt.boot.Boot$.main(Boot.scala:17)
[error] at xsbt.boot.Boot.main(Boot.scala)
[error] java.lang.ClassNotFoundException: org.jetbrains.sbt.CreateTasks$
[error] Use 'last' for the full log.
[info] shutting down server
[INFO] [04/05/2018 00:47:35.443] [Thread-3] [CoordinatedShutdown(akka://sbt-web)] Starting coordinated shutdown from JVM shutdown hook
I have tried deleting .idea folder and reimporting the project
This problem has been fixed and the fix will be available in the next release of the IntelliJ Scala plugin (2018.1.9+) or right now in the Nightly releases.
As a workaround until then, you can close the project and do a fresh import.