Fix the scala-compiler target to not depend on scala-library since it is the scala-compiler pom pulls this as a dependency

Review Request #223 — Created April 14, 2014 and submitted

tejal
pants
tdesai/fix_zinc_scala_compile
50
pants-reviews
benjyw, jsirois, travis
Fix the scala-compiler target to not depend on scala-library since it is the scala-compiler pom pulls this as a dependency

 ./build-support/bin/ci.sh  passes. 
Before, 
./pants goal compile used to fail with java.lang.NoClassDefFoundError: scala/ScalaObject error.


Now:

[tw-mbp13-tdesai pants]$ PANTS_DEV=1 ./pants goal compile src/scala/com/pants/example:jvm-run-example-lib
*** Running pants in dev mode from src/python/pants/bin/pants_exe.py ***

19:14:50 00:00 [main]
               (To run a reporting server: ./pants server)
19:14:50 00:00   [setup]
19:14:50 00:00     [bootstrap]
19:14:50 00:00     [parse]
19:14:50 00:00   [bootstrap]
19:14:50 00:00     [bootstrap-jvm-tools]
19:14:50 00:00   [gen]
19:14:50 00:00     [thrift]
19:14:50 00:00     [scrooge]
19:14:50 00:00     [protoc]
19:14:50 00:00     [antlr]
19:14:50 00:00   [check-exclusives]
19:14:50 00:00     [check-exclusives]
19:14:50 00:00   [resolve]
19:14:50 00:00     [ivy]
19:14:50 00:00       [bootstrap-nailgun]
                   Invalidated 1 target.
19:14:52 00:02       [ivy-resolve]
19:14:52 00:02         [ivy]
19:14:53 00:03   [compile]
19:14:53 00:03     [jvm]
19:14:53 00:03       [scala]
                     Invalidated 1 target containing 1 source file.
19:14:53 00:03         [find-deleted-sources]
                     Compiling a partition containing 1 source in 1 target.
19:14:53 00:03         [compile]
19:14:53 00:03           [bootstrap-scalac]
19:14:54 00:04           [bootstrap-zinc]
19:14:55 00:05           [zinc]
                         [info] Compiling 1 Scala source to /Users/tdesai/projects/pants/.pants.d/scalac/classes...
                         [info] Compile success at Apr 14, 2014 7:15:00 PM [5.275s]
                         
19:15:00 00:10         [find-missing-dependencies]
19:15:00 00:10           [map_sources]
19:15:00 00:10           [map_classes]
19:15:00 00:10           [map_jars]
19:15:00 00:10           [scan_deps]
19:15:00 00:10         [bootstrap-scala-runtime-deps]
               Waiting for background workers to finish.
               SUCCESS
[tw-mbp13-tdesai pants]$ 


Before, in the log output see the issue for more details

                         [debug]    scala compiler = /Users/tdesai/projects/pants/.pants.d/classpath/jars/org.scala-lang/scala-compiler/jars/scala-compiler-2.9.3.jar
                         [debug]    scala library = /Users/tdesai/projects/pants/.pants.d/classpath/jars/org.scala-lang/scala-library/sources/scala-library-2.9.3-sources.jar

Now:
                         DEBUG] Executing: /Library/JAVA/Home/bin/java -Xmx2g -XX:MaxPermSize=256m -Dzinc.analysis.cache.limit=0 -cp /Users/tdesai/projects/pants/.pants.d/classpath/jars/com.typesafe.zinc/zinc/javadocs/zinc-0.3.2-M1-javadoc.jar:/Users/tdesai/projects/pants/.pants.d/classpath/jars/com.typesafe.zinc/zinc/jars/zinc-0.3.2-M1.jar:/Users/tdesai/projects/pants/.pants.d/classpath/jars/com.typesafe.zinc/zinc/sources/zinc-0.3.2-M1-sources.jar:/Users/tdesai/projects/pants/.pants.d/classpath/jars/org.scala-lang/scala-library/jars/scala-library-2.10.3.jar:/Users/tdesai/projects/pants/.pants.d/classpath/jars/com.typesafe.sbt/incremental-compiler/jars/incremental-compiler-0.13.2-M1.jar:/Users/tdesai/projects/pants/.pants.d/classpath/jars/org.scala-lang/scala-compiler/jars/scala-compiler-2.10.3.jar:/Users/tdesai/projects/pants/.pants.d/classpath/jars/org.scala-lang/scala-reflect/jars/scala-reflect-2.10.3.jar:/Users/tdesai/projects/pants/.pants.d/classpath/jars/com.typesafe.sbt/sbt-interface/jars/sbt-interface-0.13.2-M1.jar:/Users/tdesai/projects/pants/.pants.d/classpath/jars/com.typesafe.sbt/compiler-interface/jars/compiler-interface-0.13.2-M1-sources.jar com.typesafe.zinc.Main -log-level debug -sbt-interface /Users/tdesai/projects/pants/.pants.d/classpath/jars/com.typesafe.sbt/sbt-interface/jars/sbt-interface-0.13.2-M1.jar -compiler-interface /Users/tdesai/projects/pants/.pants.d/classpath/jars/com.typesafe.sbt/compiler-interface/jars/compiler-interface-0.13.2-M1-sources.jar -scala-path /Users/tdesai/projects/pants/.pants.d/classpath/jars/org.scala-lang/scala-compiler/jars/scala-compiler-2.9.3.jar:/Users/tdesai/projects/pants/.pants.d/classpath/jars/org.scala-lang/scala-compiler/javadocs/scala-compiler-2.9.3-javadoc.jar:/Users/tdesai/projects/pants/.pants.d/classpath/jars/org.scala-lang/scala-compiler/sources/scala-compiler-2.9.3-sources.jar:/Users/tdesai/projects/pants/.pants.d/classpath/jars/org.scala-lang/scala-library/jars/scala-library-2.9.3.jar:/Users/tdesai/projects/pants/.pants.d/classpath/jars/org.scala-lang/jline/jars/jline-2.9.3.jar:/Users/tdesai/projects/pants/.pants.d/classpath/jars/org.fusesource.jansi/jansi/jars/jansi-1.4.jar -S-encoding -SUTF-8 -S-g:vars -S-deprecation -S-unchecked -analysis-cache /Users/tdesai/projects/pants/.pants.d/scalac/analysis/artifact_cache_tmpdir/54d79d63-c7e6-48ee-819f-72062e1ce9a2/src.scala.com.pants.example.jvm-run-example-lib/analysis -classpath /Users/tdesai/projects/pants/.pants.d/classpath/jars/org.scala-lang/scala-compiler/jars/scala-compiler-2.9.3.jar:/Users/tdesai/projects/pants/.pants.d/classpath/jars/org.scala-lang/scala-compiler/javadocs/scala-compiler-2.9.3-javadoc.jar:/Users/tdesai/projects/pants/.pants.d/classpath/jars/org.scala-lang/scala-compiler/sources/scala-compiler-2.9.3-sources.jar:/Users/tdesai/projects/pants/.pants.d/classpath/jars/org.scala-lang/scala-library/jars/scala-library-2.9.3.jar:/Users/tdesai/projects/pants/.pants.d/classpath/jars/org.scala-lang/jline/jars/jline-2.9.3.jar:/Users/tdesai/projects/pants/.pants.d/classpath/jars/org.fusesource.jansi/jansi/jars/jansi-1.4.jar:/Users/tdesai/projects/pants/.pants.d/scalac/resources:/Users/tdesai/projects/pants/.pants.d/scalac/classes -d /Users/tdesai/projects/pants/.pants.d/scalac/classes src/scala/com/pants/example/JvmRunExample.scala
[debug] Setup = {
                         [debug]    scala compiler = /Users/tdesai/projects/pants/.pants.d/classpath/jars/org.scala-lang/scala-compiler/jars/scala-compiler-2.9.3.jar
                         [debug]    scala library = /Users/tdesai/projects/pants/.pants.d/classpath/jars/org.scala-lang/scala-library/jars/scala-library-2.9.3.jar
TE
BE
  1. Thanks for the fix! 
  2. 
      
TE
Review request changed

Status: Closed (submitted)

JS
  1. Ship It!
  2. 
      
Loading...