Skip to content

Commit

Permalink
Example configuration for the isolated strategy.
Browse files Browse the repository at this point in the history
- Example configuration for the isolated strategy.

This is approximately the configuration we use with the isolated strategy and zinc for java. We may not want to actually commit this upstream, but it might be useful to have for posterity.

The last missing piece of our effort was a quick one-off Task that jars classpath entries that match a particular regex. This was necessary because as discussed previously, giving the JVM 1100 input directories (900 targets + 200 resource targets) did not work out terribly well. We'll be working to upstream better solutions to that problem soon.

Reviewed at https://rbcommons.com/s/twitter/r/2185/
  • Loading branch information
stuhood committed May 9, 2015
1 parent 4a7afe3 commit 76df24c
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
.#*
.DS_Store
.build.properties
.buildcache/
.coverage*
.idea
.pants.d
Expand Down
70 changes: 70 additions & 0 deletions pants.ini.isolated
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# An override config example that uses the `isolated` compile strategy for JVM languages.
# ./pants --config-override=pants.ini.isolated <goal> <targets>

[compile.apt]
strategy: isolated
read_artifact_caches: ['%(buildroot)s/.buildcache']
write_artifact_caches: ['%(buildroot)s/.buildcache']


[compile.zinc-java]
enabled: True
runtime-deps: []
scalac: [':scala-compile']
strategy: isolated
worker_count: 4
zinc: [':zinc']
jvm_options: [
'-Xmx4g', '-XX:MaxPermSize=512m', '-XX:+UseConcMarkSweepGC', '-XX:ParallelGCThreads=4',
# bigger cache size for our big projects (default is just 5)
'-Dzinc.analysis.cache.limit=1000'
]

args: [
'-C-source', '-C1.7',
'-C-target', '-C1.7',
'-java-only', '-C-encoding', '-CUTF-8',
]
warning_args: [
'-C-Xlint:all', '-C-Xlint:-serial', '-C-Xlint:-path',
'-C-deprecation',
]
no_warning_args: [
'-C-Xlint:none',
'-C-nowarn',
]

read_artifact_caches: ['%(buildroot)s/.buildcache']
write_artifact_caches: ['%(buildroot)s/.buildcache']


[compile.scala]
runtime-deps: [':scala-library']
scalac: [':scala-compiler']
strategy: isolated
worker_count: 4
zinc: [':zinc']
jvm_options: [
'-Xmx4g', '-XX:MaxPermSize=512m', '-XX:+UseConcMarkSweepGC', '-XX:ParallelGCThreads=4',
# bigger cache size for our big projects (default is just 5)
'-Dzinc.analysis.cache.limit=1000',
]

args: [
'-C-source', '-C1.7',
'-C-target', '-C1.7',
'-S-encoding', '-SUTF-8',
'-S-g:vars',
]
warning_args: [
'-S-deprecation',
'-S-unchecked',
# request warnings for http://www.scala-lang.org/api/2.10.4/index.html#scala.language$
'-S-feature',
]
no_warning_args: [
'-S-nowarn',
]

read_artifact_caches: ['%(buildroot)s/.buildcache']
write_artifact_caches: ['%(buildroot)s/.buildcache']

0 comments on commit 76df24c

Please sign in to comment.