Skip to content

Commit

Permalink
Fix turbine direct classpaths for targets with no deps
Browse files Browse the repository at this point in the history
If the list of direct deps is empty, it's either because the action doesn't
distinguish between direct and transitive deps, or because the target has no
deps at all. The 'direct classpath optimization' can still be applied in the
latter case.

PiperOrigin-RevId: 155112465
  • Loading branch information
cushon authored and damienmg committed May 4, 2017
1 parent 0c5ac0f commit 721b47c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ private CommandLine transitiveCommandLine() {

/** Returns true if the header compilation classpath should only include direct deps. */
boolean useDirectClasspath() {
if (directJars.isEmpty()) {
if (directJars.isEmpty() && !classpathEntries.isEmpty()) {
// the compilation doesn't distinguish direct deps, e.g. because it doesn't support strict
// java deps
return false;
Expand Down

0 comments on commit 721b47c

Please sign in to comment.