Skip to content

Commit

Permalink
Exclude Compile-Testing's circular dependency on Truth.
Browse files Browse the repository at this point in the history
Maven already largely ignores this, but the circularity does cause Maven a couple problems:

- It causes errors under dependencyConvergence (which I'm not 100% sure we want to turn on but which I've been experimenting with).
- It makes Maven print out the dependency tree in a confusing way, with Truth listed as if it were a direct dependency of itself (rather than a dependency through Compile-Testing) and Compile-Testing's other dependencies missing entirely.

Here's the diff in Maven's dependency:tree output produced by this change:

$ ( filter() { grep -v -e SUCCESS -e Downloaded -e 'Total time' -e 'Finished at' $@; }; diff <(filter /tmp/pre) <(filter /tmp/post) )
--- /dev/fd/63  2018-08-14 13:58:21.938426152 -0400
+++ /dev/fd/62  2018-08-14 13:58:21.942426128 -0400
@@ -68,9 +68,13 @@
 [INFO] |  +- (com.google.j2objc:j2objc-annotations:jar:1.1:test - omitted for duplicate)
 [INFO] |  +- (com.google.guava:guava:jar:25.1-android:test - version managed from 25.1-jre; omitted for duplicate)
 [INFO] |  \- (junit:junit:jar:4.12:test - version managed from 4.11; omitted for duplicate)
-[INFO] +- (com.google.truth:truth:jar:0.37:test - omitted for cycle)
 [INFO] +- com.google.testing.compile:compile-testing:jar:0.15:test
-[INFO] |  \- (junit:junit:jar:4.12:test - version managed from 4.11; omitted for duplicate)
+[INFO] |  +- (junit:junit:jar:4.12:test - version managed from 4.11; omitted for duplicate)
+[INFO] |  +- (com.google.guava:guava:jar:25.1-android:test - version managed from 23.5-jre; omitted for duplicate)
+[INFO] |  +- (com.google.auto.value:auto-value:jar:1.6.2:test - version managed from 1.5.3; omitted for duplicate)
+[INFO] |  +- com.google.auto:auto-common:jar:0.9:test
+[INFO] |  |  \- (com.google.guava:guava:jar:25.1-android:test - version managed from 23.5-jre; omitted for duplicate)
+[INFO] |  \- com.sun:tools:jar:1.8.0_151-google-v7:system
 [INFO] \- com.google.errorprone:error_prone_annotations:jar:2.3.1:compile
 [INFO]
 [INFO] ------------------------------------------------------------------------

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208682723
  • Loading branch information
cpovirk authored and ronshapiro committed Aug 15, 2018
1 parent 83a2d5d commit ff1a5f0
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,17 @@
<groupId>com.google.testing.compile</groupId>
<artifactId>compile-testing</artifactId>
<version>0.15</version>
<exclusions>
<exclusion>
<groupId>com.google.truth</groupId>
<artifactId>truth</artifactId>
</exclusion>
<!-- TODO(cpovirk): Remove after a Compile-Testing release moves this test scope. -->
<exclusion>
<groupId>com.google.truth.extensions</groupId>
<artifactId>truth-java8-extension</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.google.errorprone</groupId>
Expand Down Expand Up @@ -273,11 +284,11 @@
</plugin>
</plugins>
</pluginManagement>
<!--
Force a version >2.7 for this parent project. If we use the current
default of 2.7, Maven ignores this parent project's configuration when
running maven-javadoc-plugin in children during releases.
-->
<!--
Force a version >2.7 for this parent project. If we use the current
default of 2.7, Maven ignores this parent project's configuration when
running maven-javadoc-plugin in children during releases.
-->
<plugins>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
Expand Down

0 comments on commit ff1a5f0

Please sign in to comment.