Skip to content

Commit

Permalink
Add incOptions to subprojects
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernando Correia committed Jan 10, 2014
1 parent c240eeb commit 06a5c3c
Show file tree
Hide file tree
Showing 2 changed files with 146 additions and 53 deletions.
187 changes: 137 additions & 50 deletions results/play2.2-subproject.txt
Expand Up @@ -2,10 +2,10 @@
********** Testing with sbt.version=0.13.0 **********

clean compile:
[info] Loading project definition from /tmp/20140110-124741/repo/project
[info] Set current project to TestProject (in build file:/tmp/20140110-124741/repo/)
[success] Total time: 0 s, completed Jan 10, 2014 12:48:08 PM
[info] Updating {file:/tmp/20140110-124741/repo/}common...
[info] Loading project definition from /tmp/20140110-132914/repo/project
[info] Set current project to TestProject (in build file:/tmp/20140110-132914/repo/)
[success] Total time: 0 s, completed Jan 10, 2014 1:29:39 PM
[info] Updating {file:/tmp/20140110-132914/repo/}common...
[info] Resolving org.scala-lang#scala-library;2.10.2 ...
[info] Resolving com.typesafe.play#play-java-jdbc_2.10;2.2.1 ...
[info] Resolving com.typesafe.play#play-jdbc_2.10;2.2.1 ...
Expand Down Expand Up @@ -132,11 +132,11 @@ clean compile:
[info] Resolving org.scala-lang#jline;2.10.2 ...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] Updating {file:/tmp/20140110-124741/repo/}manager...
[info] Updating {file:/tmp/20140110-124741/repo/}api...
[info] Updating {file:/tmp/20140110-132914/repo/}api...
[info] Resolving org.scala-lang#scala-library;2.10.2 ...
[info] Resolving testproject-common#testproject-common_2.10;1.0-SNAPSHOT ...
[info] Resolving com.typesafe.play#play-java-jdbc_2.10;2.2.1 ...
[info] Updating {file:/tmp/20140110-132914/repo/}manager...
[info] Resolving com.typesafe.play#play-jdbc_2.10;2.2.1 ...
[info] Resolving com.typesafe.play#play_2.10;2.2.1 ...
[info] Resolving com.typesafe.play#sbt-link;2.2.1 ...
Expand Down Expand Up @@ -274,7 +274,7 @@ clean compile:
[info] Resolving com.github.scala-incubator.io#scala-io-core_2.10;0.4.2 ...
[info] Resolving com.jsuereth#scala-arm_2.10;1.3 ...
[info] Resolving com.typesafe.play#play-iteratees_2.10;2.2.1 ...
[info] Compiling 4 Java sources to /tmp/20140110-124741/repo/modules/common/target/scala-2.10/classes...
[info] Compiling 4 Java sources to /tmp/20140110-132914/repo/modules/common/target/scala-2.10/classes...
[info] Resolving org.scala-stm#scala-stm_2.10;0.7 ...
[info] Resolving com.typesafe#config;1.0.2 ...
[info] Resolving com.typesafe.play#play-json_2.10;2.2.1 ...
Expand Down Expand Up @@ -388,9 +388,8 @@ clean compile:
[info] Resolving org.scala-lang#scala-compiler;2.10.2 ...
[info] Resolving org.scala-lang#jline;2.10.2 ...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Compiling 2 Scala sources and 2 Java sources to /tmp/20140110-124741/repo/modules/manager/target/scala-2.10/classes...
[info] Done updating.
[info] Updating {file:/tmp/20140110-124741/repo/}root...
[info] Updating {file:/tmp/20140110-132914/repo/}root...
[info] Resolving org.scala-lang#scala-library;2.10.2 ...
[info] Resolving testproject-common#testproject-common_2.10;1.0-SNAPSHOT ...
[info] Resolving com.typesafe.play#play-java-jdbc_2.10;2.2.1 ...
Expand Down Expand Up @@ -460,6 +459,7 @@ clean compile:
[info] Resolving testproject-api#testproject-api_2.10;1.0-SNAPSHOT ...
[info] Resolving testproject-manager#testproject-manager_2.10;1.0-SNAPSHOT ...
[info] Resolving mysql#mysql-connector-java;5.1.25 ...
[info] Compiling 2 Scala sources and 2 Java sources to /tmp/20140110-132914/repo/modules/api/target/scala-2.10/classes...
[info] Resolving com.typesafe.play#play-test_2.10;2.2.1 ...
[info] Resolving junit#junit;4.11 ...
[info] Resolving org.hamcrest#hamcrest-core;1.3 ...
Expand Down Expand Up @@ -521,11 +521,11 @@ clean compile:
[info] Resolving org.scala-lang#jline;2.10.2 ...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] Compiling 2 Scala sources and 2 Java sources to /tmp/20140110-124741/repo/modules/api/target/scala-2.10/classes...
[info] Compiling 4 Scala sources and 2 Java sources to /tmp/20140110-124741/repo/target/scala-2.10/classes...
[info] Compiling 2 Scala sources and 2 Java sources to /tmp/20140110-132914/repo/modules/manager/target/scala-2.10/classes...
[info] Compiling 4 Scala sources and 2 Java sources to /tmp/20140110-132914/repo/target/scala-2.10/classes...
[warn] there were 2 feature warning(s); re-run with -feature for details
[warn] one warning found
[success] Total time: 32 s, completed Jan 10, 2014 12:48:40 PM
[success] Total time: 35 s, completed Jan 10, 2014 1:30:14 PM

After change to controller
diff --git a/modules/manager/app/controllers/html/StaticPages.java b/modules/manager/app/controllers/html/StaticPages.java
Expand Down Expand Up @@ -553,10 +553,10 @@ index ce40944..a815558 100644
+addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.1")
\ No newline at end of file

[info] Loading project definition from /tmp/20140110-124741/repo/project
[info] Set current project to TestProject (in build file:/tmp/20140110-124741/repo/)
[info] Compiling 1 Java source to /tmp/20140110-124741/repo/modules/manager/target/scala-2.10/classes...
[success] Total time: 3 s, completed Jan 10, 2014 12:48:52 PM
[info] Loading project definition from /tmp/20140110-132914/repo/project
[info] Set current project to TestProject (in build file:/tmp/20140110-132914/repo/)
[info] Compiling 1 Java source to /tmp/20140110-132914/repo/modules/manager/target/scala-2.10/classes...
[success] Total time: 4 s, completed Jan 10, 2014 1:30:26 PM

After change to routes
diff --git a/modules/manager/app/controllers/html/StaticPages.java b/modules/manager/app/controllers/html/StaticPages.java
Expand Down Expand Up @@ -593,21 +593,21 @@ index ce40944..a815558 100644
+addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.1")
\ No newline at end of file

[info] Loading project definition from /tmp/20140110-124741/repo/project
[info] Set current project to TestProject (in build file:/tmp/20140110-124741/repo/)
[info] Compiling 2 Scala sources and 2 Java sources to /tmp/20140110-124741/repo/modules/manager/target/scala-2.10/classes...
[warn] /tmp/20140110-124741/repo/modules/manager/conf/manager.routes:7: unreachable code
[info] Loading project definition from /tmp/20140110-132914/repo/project
[info] Set current project to TestProject (in build file:/tmp/20140110-132914/repo/)
[info] Compiling 2 Scala sources and 2 Java sources to /tmp/20140110-132914/repo/modules/manager/target/scala-2.10/classes...
[warn] /tmp/20140110-132914/repo/modules/manager/conf/manager.routes:7: unreachable code
[warn] GET /changed controllers.html.StaticPages.index()
[warn] one warning found
[success] Total time: 14 s, completed Jan 10, 2014 12:49:14 PM
[success] Total time: 13 s, completed Jan 10, 2014 1:30:48 PM

********** Testing with sbt.version=0.13.2-M1 **********

clean compile:
[info] Loading project definition from /tmp/20140110-124741/repo/project
[info] Set current project to TestProject (in build file:/tmp/20140110-124741/repo/)
[success] Total time: 0 s, completed Jan 10, 2014 12:49:37 PM
[info] Updating {file:/tmp/20140110-124741/repo/}common...
[info] Loading project definition from /tmp/20140110-132914/repo/project
[info] Set current project to TestProject (in build file:/tmp/20140110-132914/repo/)
[success] Total time: 0 s, completed Jan 10, 2014 1:31:14 PM
[info] Updating {file:/tmp/20140110-132914/repo/}common...
[info] Resolving org.scala-lang#scala-library;2.10.2 ...
[info] Resolving com.typesafe.play#play-java-jdbc_2.10;2.2.1 ...
[info] Resolving com.typesafe.play#play-jdbc_2.10;2.2.1 ...
Expand Down Expand Up @@ -734,9 +734,9 @@ clean compile:
[info] Resolving org.scala-lang#jline;2.10.2 ...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] Updating {file:/tmp/20140110-124741/repo/}manager...
[info] Updating {file:/tmp/20140110-132914/repo/}manager...
[info] Resolving org.scala-lang#scala-library;2.10.2 ...
[info] Updating {file:/tmp/20140110-124741/repo/}api...
[info] Updating {file:/tmp/20140110-132914/repo/}api...
[info] Resolving testproject-common#testproject-common_2.10;1.0-SNAPSHOT ...
[info] Resolving com.typesafe.play#play-java-jdbc_2.10;2.2.1 ...
[info] Resolving com.typesafe.play#play-jdbc_2.10;2.2.1 ...
Expand Down Expand Up @@ -874,7 +874,7 @@ clean compile:
[info] Resolving com.typesafe.play#templates_2.10;2.2.1 ...
[info] Resolving com.github.scala-incubator.io#scala-io-file_2.10;0.4.2 ...
[info] Resolving com.github.scala-incubator.io#scala-io-core_2.10;0.4.2 ...
[info] Compiling 4 Java sources to /tmp/20140110-124741/repo/modules/common/target/scala-2.10/classes...
[info] Compiling 4 Java sources to /tmp/20140110-132914/repo/modules/common/target/scala-2.10/classes...
[info] Resolving com.jsuereth#scala-arm_2.10;1.3 ...
[info] Resolving com.typesafe.play#play-iteratees_2.10;2.2.1 ...
[info] Resolving org.scala-stm#scala-stm_2.10;0.7 ...
Expand Down Expand Up @@ -991,7 +991,7 @@ clean compile:
[info] Resolving org.scala-lang#jline;2.10.2 ...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] Updating {file:/tmp/20140110-124741/repo/}root...
[info] Updating {file:/tmp/20140110-132914/repo/}root...
[info] Resolving org.scala-lang#scala-library;2.10.2 ...
[info] Resolving testproject-common#testproject-common_2.10;1.0-SNAPSHOT ...
[info] Resolving com.typesafe.play#play-java-jdbc_2.10;2.2.1 ...
Expand All @@ -1014,6 +1014,7 @@ clean compile:
[info] Resolving org.joda#joda-convert;1.3.1 ...
[info] Resolving com.fasterxml.jackson.core#jackson-annotations;2.2.2 ...
[info] Resolving com.fasterxml.jackson.core#jackson-core;2.2.2 ...
[info] Compiling 2 Scala sources and 2 Java sources to /tmp/20140110-132914/repo/modules/api/target/scala-2.10/classes...
[info] Resolving com.fasterxml.jackson.core#jackson-databind;2.2.2 ...
[info] Resolving org.scala-lang#scala-reflect;2.10.2 ...
[info] Resolving io.netty#netty;3.7.0.Final ...
Expand Down Expand Up @@ -1058,7 +1059,6 @@ clean compile:
[info] Resolving org.hibernate.javax.persistence#hibernate-jpa-2.0-api;1.0.1.Final ...
[info] Resolving com.typesafe.play#play-cache_2.10;2.2.1 ...
[info] Resolving net.sf.ehcache#ehcache-core;2.6.6 ...
[info] Compiling 2 Scala sources and 2 Java sources to /tmp/20140110-124741/repo/modules/api/target/scala-2.10/classes...
[info] Resolving testproject-api#testproject-api_2.10;1.0-SNAPSHOT ...
[info] Resolving testproject-manager#testproject-manager_2.10;1.0-SNAPSHOT ...
[info] Resolving mysql#mysql-connector-java;5.1.25 ...
Expand Down Expand Up @@ -1123,18 +1123,18 @@ clean compile:
[info] Resolving org.scala-lang#jline;2.10.2 ...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] Compiling 2 Scala sources and 2 Java sources to /tmp/20140110-124741/repo/modules/manager/target/scala-2.10/classes...
[info] Compiling 4 Scala sources and 2 Java sources to /tmp/20140110-124741/repo/target/scala-2.10/classes...
[info] Compiling 2 Scala sources and 2 Java sources to /tmp/20140110-132914/repo/modules/manager/target/scala-2.10/classes...
[info] Compiling 4 Scala sources and 2 Java sources to /tmp/20140110-132914/repo/target/scala-2.10/classes...
[warn] there were 2 feature warning(s); re-run with -feature for details
[warn] one warning found
[success] Total time: 39 s, completed Jan 10, 2014 12:50:17 PM
[success] Total time: 46 s, completed Jan 10, 2014 1:32:00 PM

After change to controller
diff --git a/build.sbt b/build.sbt
index 017f831..c8b3b9b 100644
index 017f831..a791757 100644
--- a/build.sbt
+++ b/build.sbt
@@ -17,4 +17,6 @@ lazy val common = project.in(file("modules/common"))
@@ -17,4 +17,7 @@ lazy val common = project.in(file("modules/common"))

lazy val api = project.in(file("modules/api")).dependsOn(common)

Expand All @@ -1143,6 +1143,35 @@ index 017f831..c8b3b9b 100644
+lazy val manager = project.in(file("modules/manager")).dependsOn(common)
+
+incOptions := incOptions.value.withNameHashing(true)
+
diff --git a/modules/api/build.sbt b/modules/api/build.sbt
index dd8882c..bd5b35f 100644
--- a/modules/api/build.sbt
+++ b/modules/api/build.sbt
@@ -8,4 +8,7 @@ libraryDependencies ++= Seq(
cache
)

-play.Project.playJavaSettings
\ No newline at end of file
+play.Project.playJavaSettings
+
+incOptions := incOptions.value.withNameHashing(true)
+
diff --git a/modules/common/build.sbt b/modules/common/build.sbt
index e244703..80869d5 100644
--- a/modules/common/build.sbt
+++ b/modules/common/build.sbt
@@ -10,4 +10,7 @@ libraryDependencies ++= Seq(
cache
)

-play.Project.playJavaSettings
\ No newline at end of file
+play.Project.playJavaSettings
+
+incOptions := incOptions.value.withNameHashing(true)
+
diff --git a/modules/manager/app/controllers/html/StaticPages.java b/modules/manager/app/controllers/html/StaticPages.java
index 7bcce9e..8f198e4 100644
--- a/modules/manager/app/controllers/html/StaticPages.java
Expand All @@ -1155,6 +1184,20 @@ index 7bcce9e..8f198e4 100644
ExampleLogger.log("Log from the manager using the Common logger");
return ok("Hi from the manager.");
}
diff --git a/modules/manager/build.sbt b/modules/manager/build.sbt
index 02e2c87..84f225d 100644
--- a/modules/manager/build.sbt
+++ b/modules/manager/build.sbt
@@ -8,4 +8,7 @@ libraryDependencies ++= Seq(
cache
)

-play.Project.playJavaSettings
\ No newline at end of file
+play.Project.playJavaSettings
+
+incOptions := incOptions.value.withNameHashing(true)
+
diff --git a/project/build.properties b/project/build.properties
index 0974fce..fdc4c86 100644
--- a/project/build.properties
Expand All @@ -1175,19 +1218,20 @@ index ce40944..a815558 100644
+addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.1")
\ No newline at end of file

[info] Loading project definition from /tmp/20140110-124741/repo/project
[info] Set current project to TestProject (in build file:/tmp/20140110-124741/repo/)
[info] Compiling 4 Java sources to /tmp/20140110-124741/repo/modules/common/target/scala-2.10/classes...
[info] Compiling 1 Java source to /tmp/20140110-124741/repo/modules/manager/target/scala-2.10/classes...
[info] Compiling 2 Scala sources and 1 Java source to /tmp/20140110-124741/repo/target/scala-2.10/classes...
[success] Total time: 13 s, completed Jan 10, 2014 12:50:38 PM
[info] Loading project definition from /tmp/20140110-132914/repo/project
[info] Set current project to TestProject (in build file:/tmp/20140110-132914/repo/)
[info] Compiling 4 Java sources to /tmp/20140110-132914/repo/modules/common/target/scala-2.10/classes...
[info] Compiling 1 Java source to /tmp/20140110-132914/repo/modules/api/target/scala-2.10/classes...
[info] Compiling 1 Java source to /tmp/20140110-132914/repo/modules/manager/target/scala-2.10/classes...
[info] Compiling 2 Scala sources and 1 Java source to /tmp/20140110-132914/repo/target/scala-2.10/classes...
[success] Total time: 16 s, completed Jan 10, 2014 1:32:23 PM

After change to routes
diff --git a/build.sbt b/build.sbt
index 017f831..c8b3b9b 100644
index 017f831..a791757 100644
--- a/build.sbt
+++ b/build.sbt
@@ -17,4 +17,6 @@ lazy val common = project.in(file("modules/common"))
@@ -17,4 +17,7 @@ lazy val common = project.in(file("modules/common"))

lazy val api = project.in(file("modules/api")).dependsOn(common)

Expand All @@ -1196,6 +1240,35 @@ index 017f831..c8b3b9b 100644
+lazy val manager = project.in(file("modules/manager")).dependsOn(common)
+
+incOptions := incOptions.value.withNameHashing(true)
+
diff --git a/modules/api/build.sbt b/modules/api/build.sbt
index dd8882c..bd5b35f 100644
--- a/modules/api/build.sbt
+++ b/modules/api/build.sbt
@@ -8,4 +8,7 @@ libraryDependencies ++= Seq(
cache
)

-play.Project.playJavaSettings
\ No newline at end of file
+play.Project.playJavaSettings
+
+incOptions := incOptions.value.withNameHashing(true)
+
diff --git a/modules/common/build.sbt b/modules/common/build.sbt
index e244703..80869d5 100644
--- a/modules/common/build.sbt
+++ b/modules/common/build.sbt
@@ -10,4 +10,7 @@ libraryDependencies ++= Seq(
cache
)

-play.Project.playJavaSettings
\ No newline at end of file
+play.Project.playJavaSettings
+
+incOptions := incOptions.value.withNameHashing(true)
+
diff --git a/modules/manager/app/controllers/html/StaticPages.java b/modules/manager/app/controllers/html/StaticPages.java
index 7bcce9e..8f198e4 100644
--- a/modules/manager/app/controllers/html/StaticPages.java
Expand All @@ -1208,6 +1281,20 @@ index 7bcce9e..8f198e4 100644
ExampleLogger.log("Log from the manager using the Common logger");
return ok("Hi from the manager.");
}
diff --git a/modules/manager/build.sbt b/modules/manager/build.sbt
index 02e2c87..84f225d 100644
--- a/modules/manager/build.sbt
+++ b/modules/manager/build.sbt
@@ -8,4 +8,7 @@ libraryDependencies ++= Seq(
cache
)

-play.Project.playJavaSettings
\ No newline at end of file
+play.Project.playJavaSettings
+
+incOptions := incOptions.value.withNameHashing(true)
+
diff --git a/modules/manager/conf/manager.routes b/modules/manager/conf/manager.routes
index d6e4b3e..4537bbe 100644
--- a/modules/manager/conf/manager.routes
Expand Down Expand Up @@ -1237,12 +1324,12 @@ index ce40944..a815558 100644
+addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.1")
\ No newline at end of file

[info] Loading project definition from /tmp/20140110-124741/repo/project
[info] Set current project to TestProject (in build file:/tmp/20140110-124741/repo/)
[info] Compiling 4 Java sources to /tmp/20140110-124741/repo/modules/common/target/scala-2.10/classes...
[info] Compiling 2 Scala sources and 2 Java sources to /tmp/20140110-124741/repo/modules/manager/target/scala-2.10/classes...
[warn] /tmp/20140110-124741/repo/modules/manager/conf/manager.routes:7: unreachable code
[info] Loading project definition from /tmp/20140110-132914/repo/project
[info] Set current project to TestProject (in build file:/tmp/20140110-132914/repo/)
[info] Compiling 1 Java source to /tmp/20140110-132914/repo/modules/api/target/scala-2.10/classes...
[info] Compiling 2 Scala sources and 2 Java sources to /tmp/20140110-132914/repo/modules/manager/target/scala-2.10/classes...
[warn] /tmp/20140110-132914/repo/modules/manager/conf/manager.routes:7: unreachable code
[warn] GET /changed controllers.html.StaticPages.index()
[warn] one warning found
[info] Compiling 2 Scala sources to /tmp/20140110-124741/repo/target/scala-2.10/classes...
[success] Total time: 19 s, completed Jan 10, 2014 12:51:05 PM
[info] Compiling 2 Scala sources to /tmp/20140110-132914/repo/target/scala-2.10/classes...
[success] Total time: 20 s, completed Jan 10, 2014 1:32:53 PM
12 changes: 9 additions & 3 deletions tests/test-sbt-incremental-play2.2-subproject.sh
Expand Up @@ -38,6 +38,11 @@ test() {
test_change2
}

setincOptions() {
local file=$1
echo -e "\n\nincOptions := incOptions.value.withNameHashing(true)\n" >> "$file"
}

run() {
local current_time=`date +%Y%m%d-%H%M%S`
local tmp_dir="/tmp/$current_time"
Expand All @@ -51,9 +56,10 @@ run() {
test "0.13.0"

git reset --hard --quiet
echo "" >> build.sbt
echo "" >> build.sbt
echo "incOptions := incOptions.value.withNameHashing(true)" >> build.sbt
setincOptions build.sbt
setincOptions modules/api/build.sbt
setincOptions modules/common/build.sbt
setincOptions modules/manager/build.sbt
test "0.13.2-M1"
}

Expand Down

0 comments on commit 06a5c3c

Please sign in to comment.