Why does sbt compile fail with StackOverflowError?

后端 未结 8 1432
孤独总比滥情好
孤独总比滥情好 2021-01-31 15:30

I am working on a Scala project that has been in existence for a few years but is new to me. My task is to upgrade it from Scala 2.9.3 to 2.11.7, along with its dependencies. I

8条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-31 15:53

    I was unable to get this to work via the provided answers. build.sbt settings and the sbtopts file both failed to solve this error for me. What I had to do was run sbt with the -mem flag, for example:

    sbt -mem 2048 compile
    

    and now my projects built. If using IntelliJ you can also go to

    Preferences > Build, Execution, Deployment > Build Tools > sbt 
    

    and set Maximum heap size, MB to whatever target you need.

提交回复
热议问题