-
Notifications
You must be signed in to change notification settings - Fork 123
Description
You can see some internal discussion on CL 198652081, but in short:
- Truth depends on
guava-gwt. - The
guava-gwtjar contains.javafiles. - Truth has a test that uses Compile-Testing, and it compiles not just the file we give it but also (automatically and undesired by us) those
.javafiles. - This used to work, but because Truth uses
guava-androidbutguava-gwtusesguava-jre, Maven putsguava-androidon the classpath whenguava-gwtneedsguava-jreand its dependencies. So now the compilation fails.
We're going to work around this by:
- Making Truth pass
-sourcepath ''to Compile-Testing. - Adding an explicit dependency from
guava-gwtto some dependencies that it uses directly but currently gets transitively throughguava-jre.
But maybe Compile-Testing should be setting -sourcepath '' internally automatically? (Or maybe there's something else similar it should be doing; I've heard that all this is surprisingly complex.)
On the other hand, probably few people will be affected by this: They won't have .java files on their classpath, and even if they do, the files will compile fine because the dependencies will be there. Still, I wonder if they will see unexpected warnings or other output in some cases. (Maybe I've seen some reports of weird Compile-Testing behavior before in AutoValue or something? I'll see if I can dig anything up.) And presumably it's at least a little wasteful to compile files that we don't need.