How to prevent java.lang.OutOfMemoryError: PermGen space at Scala compilation?
I use HomeBrew to install sbt on OS X. It supports a SBT_OPTS argument which can be put in ~/.sbtconfig file with export SBT_OPTS=-XX:MaxPermSize=256M.
I use HomeBrew to install sbt on OS X. It supports a SBT_OPTS argument which can be put in ~/.sbtconfig file with export SBT_OPTS=-XX:MaxPermSize=256M.
This is now supported (since ScalaTest 2.1.3) within interactive mode: testOnly *MySuite — -z foo to run only the tests whose name includes the substring “foo”. For exact match rather than substring, use -t instead of -z. If you run it from the command line, it should be as single argument to sbt: sbt ‘testOnly … Read more
I depend on Banana RDF subprojects all the time with ProjectRef, like this: lazy val core: Project = Project( … ).dependsOn( ProjectRef(uri(“git://github.com/w3c/banana-rdf.git”), “banana-jena”) ) One especially nice part is that you can just tack a commit or branch name as a fragment identifier on the URI and everything works exactly as you’d expect.
Make sure Spark is compatible with corresponding Scala version The error is common when using Scala version 2.12 series with any version of Spark offering Scala 2.11. You can try using the 2.11 series of Scala with Spark . i.e. libraryDependencies += “org.apache.spark” % “spark-core_2.11” % “2.2.0” As you can see in this dependency spark-core_2.11 … Read more
You can use the sbt plugin sbt-assembly: sbt-assembly >= 0.12.0 with sbt >= 0.13.6 Since sbt-assembly is now an auto plugin, it is sufficient to add project/assembly.sbt to your sbt project: addSbtPlugin(“com.eed3si9n” % “sbt-assembly” % “0.14.5”) sbt-assembly 0.11 Add project/assembly.sbt to your sbt project: addSbtPlugin(“com.eed3si9n” % “sbt-assembly” % “0.11.2”) Add assembly.sbt as well: import AssemblyKeys._ … Read more
If you just added the dependency, it might not have been downloaded yet. Refresh/reimport the project to do so. If it has already been downloaded, press Alt+Enter in IntelliJ on the lines with the warning and select the “update project resolvers’ indexes” quickfix, then select the “local cache” index and click “update”. You can verify … Read more
sbt 1.x, sbt 0.13.13+ Use -warn or -error. See Fixes with compatibility implications for sbt 0.13.13 release: it is strongly encouraged to migrate to the single hyphen options: -error, -warn, -info, and -debug sbt 0.13.1 To disable info messages run SBT with –warn or –error command line options. To disable [success] messages set showSuccess to … Read more
There are three basic ways how to create a project – modern versions of IntelliJ can import sbt project out of the box, otherwise you can either use sbt plugin to generate IntelliJ project, or use IntelliJ Scala plugin to create sbt project. Basic features work out of the box using both solutions, some complex … Read more
There’s a very convenient -jvm-debug flag in the official SBT packages for Mac, Linux & Windows. You can use the flag to specify the debug port: sbt -jvm-debug 5005 Under the covers, this starts the JVM for SBT with the typical verbose debugging incantation: -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 You now can run your code as normal, for … Read more
For a similar case I used in assembly.sbt: run in Compile <<= Defaults.runTask(fullClasspath in Compile, mainClass in (Compile, run), runner in (Compile, run)) and now the ‘run’ task uses all the libraries, including the ones marked with “provided”. No further change was necessary. Update: @rob solution seems to be the only one working on latest … Read more