SBT: Where does the compiler-interface go after building it?

I notice very slow build times for my Play 2.3 project on our CircleCI server relative to my local build machine. One of the reasons for this is that in every build, SBT outputs the following:

[info] 'compiler-interface' has not yet been compiled for Scala 2.11.4. Compilation...

then goes to trace for about a minute of compiler compilation. On my laptop, this happened exactly once and then never again. My guess is that on my laptop the compiler is cached somewhere so that it doesn't need to be rebuilt again next time, whereas on the CI server this cache folder will be deleted.

CircleCI allows you to specify cache directories that will not be destroyed between builds (or more accurately destroyed and then rebuilt), so the simple solution for me would be to tell CircleCI to keep that directory.

The problem is, I don't know where she is. I already save ~/.sbt

and ~/.ivy2

and it didn't help. Is the compiler built elsewhere that I can cache? Any other ideas on how to solve this does not allow you to drop the Scala compiler?

+3


source to share


2 answers


I looked at my setup and it seems like it compiler-interface

really should be in ~/.sbt

or ~/.ivy2

.



Your problem is probably related to the way you save these directories. Are you sure you will save them for the correct user? You must save them for use running the sbt command.

+2


source


@joe: you can do sbt compile:test

instead sbt compile

to get the test dependencies in the cache (and also make sure the compilation interface is included in the cache).



+1


source







All Articles