gpt4 book ai didi

scala - sbt heapsize 不够?

转载 作者:行者123 更新时间:2023-12-04 06:26:28 27 4
gpt4 key购买 nike

当我尝试编译时 scalala我得到一个 OutOfMemoryError:

> compile
[info]
[info] == compile ==
[info] Source analysis: 127 new/modified, 0 indirectly invalidated, 0 removed.
[info] Compiling main sources...
[info] == compile ==
java.lang.OutOfMemoryError: Java heap space
at scala.Tuple2$Zipped.map(Tuple2.scala:63)
at scala.tools.nsc.symtab.Types$TypeMap.mapOver(Types.scala:3134)
at scala.tools.nsc.symtab.Types$TypeMap.mapOver(Types.scala:3024)
at scala.tools.nsc.symtab.Types$SubstMap.apply(Types.scala:3455)
at scala.tools.nsc.symtab.Types$Type.subst(Types.scala:580)
at scala.tools.nsc.symtab.Types$Type.instantiateTypeParams(Types.scala:421)
at scala.tools.nsc.typechecker.Infer$Inferencer.exprTypeArgs(Infer.scala:449)
at scala.tools.nsc.typechecker.Infer$Inferencer.inferExprInstance(Infer.scala:1103)
at scala.tools.nsc.typechecker.Typers$Typer.adapt(Typers.scala:738)
at scala.tools.nsc.typechecker.Typers$Typer.adapt(Typers.scala:732)
at scala.tools.nsc.typechecker.Implicits$ImplicitSearch.typedImplicit1(Implicits.scala:484)
at scala.tools.nsc.typechecker.Implicits$ImplicitSearch.typedImplicit0(Implicits.scala:449)
at scala.tools.nsc.typechecker.Implicits$ImplicitSearch.scala$tools$nsc$typechecker$Implicits$ImplicitSearch$$typedImplicit(Implicits.scala:376)
at scala.tools.nsc.typechecker.Implicits$ImplicitSearch$ImplicitComputation.tryImplicitInfo$1(Implicits.scala:668)
at scala.tools.nsc.typechecker.Implicits$ImplicitSearch$ImplicitComputation.rankImplicits(Implicits.scala:671)
at scala.tools.nsc.typechecker.Implicits$ImplicitSearch$ImplicitComputation.findBest(Implicits.scala:695)
at scala.tools.nsc.typechecker.Implicits$ImplicitSearch.searchImplicit(Implicits.scala:753)
at scala.tools.nsc.typechecker.Implicits$ImplicitSearch.implicitManifestOrOfExpectedType(Implicits.scala:1069)
at scala.tools.nsc.typechecker.Implicits$ImplicitSearch.bestImplicit(Implicits.scala:1096)
at scala.tools.nsc.typechecker.Implicits$class.inferImplicit(Implicits.scala:57)
at scala.tools.nsc.Global$analyzer$.inferImplicit(Global.scala:347)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$applyImplicitArgs$1.apply(Typers.scala:120)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$applyImplicitArgs$1.apply(Typers.scala:115)
at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
at scala.collection.immutable.List.foreach(List.scala:45)
at scala.tools.nsc.typechecker.Typers$Typer.applyImplicitArgs(Typers.scala:115)
at scala.tools.nsc.typechecker.Typers$Typer.adapt(Typers.scala:760)
at scala.tools.nsc.typechecker.Typers$Typer.adapt(Typers.scala:732)
at scala.tools.nsc.typechecker.Implicits$ImplicitSearch.typedImplicit1(Implicits.scala:484)
at scala.tools.nsc.typechecker.Implicits$ImplicitSearch.typedImplicit0(Implicits.scala:449)
at scala.tools.nsc.typechecker.Implicits$ImplicitSearch.scala$tools$nsc$typechecker$Implicits$ImplicitSearch$$typedImplicit(Implicits.scala:376)
at scala.tools.nsc.typechecker.Implicits$ImplicitSearch$ImplicitComputation.tryImplicitInfo$1(Implicits.scala:668)
Error during sbt execution: java.lang.OutOfMemoryError: Java heap space
Exception in thread "Poller SunPKCS11-Darwin" java.lang.OutOfMemoryError: Java heap space
at sun.security.pkcs11.wrapper.PKCS11.C_GetSlotInfo(Native Method)
at sun.security.pkcs11.SunPKCS11.initToken(SunPKCS11.java:767)
at sun.security.pkcs11.SunPKCS11.access$100(SunPKCS11.java:42)
at sun.security.pkcs11.SunPKCS11$TokenPoller.run(SunPKCS11.java:700)
at java.lang.Thread.run(Thread.java:680)

{/Users/axaluss/LIBRARIES/scalala-Scalala-f2876c8/scalala-Scalala-f2876c8}
###[ axaluss ]:

我对 SBT 了解不多,所以我不知道我做错了什么。
我改成的sbt文件:
java $SBT_OPTS -Dfile.encoding=UTF-8 -Xss4M -Xmx1024M -XX:MaxPermSize=1024M -XX:NewSize=512M -XX:NewRatio=3 -jar `dirname $0`/project/sbt-launch-0.7.5.jar "$@"

Build.properties:
#Project properties
#Mon Apr 11 02:52:55 PDT 2011
project.organization=org.scalala
project.name=scalala
sbt.version=0.7.4
project.version=1.0.0.RC2-SNAPSHOT
def.scala.version=2.9.0
build.scala.versions=2.9.0
project.initialize=false

为 scala 2.8.1 编译时出现同样的问题。

我怎样才能编译 scalala?

谢谢你的帮助!

最佳答案

尝试稍微增加堆大小,在 sbt put 中:

-Xmx1524M

关于scala - sbt heapsize 不够?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6136946/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com