Fail Java compile action when reduced classpath computation fails
A Java compile action may fail to compute a reduced classpath if one of
the jdeps files it tries to read is unreadable.
With this CL, instead of falling back to a full classpath, the action
will fail.
RELNOTES: None.
@@ -314,13 +314,10 @@ public class JavaCompileAction extends AbstractAction
actionExecutionContext.getContext(JavaCompileActionContext.class);
try {
reducedClasspath = getReducedClasspath(actionExecutionContext, context);
- spawn = getReducedSpawn(actionExecutionContext, reducedClasspath, /* fallback= */ false);
} catch (IOException e) {
- // There was an error reading some of the dependent .jdeps files. Fall back to a
- // compilation with the full classpath.
- reducedClasspath = null;
- spawn = getFullSpawn(actionExecutionContext);
+ throw new ActionExecutionException(e, this, /*catastrophe=*/ false);
}
+ spawn = getReducedSpawn(actionExecutionContext, reducedClasspath, /* fallback= */ false);
} else {
reducedClasspath = null;
spawn = getFullSpawn(actionExecutionContext);
@@ -448,7 +445,6 @@ public class JavaCompileAction extends AbstractAction
}
@Override
- @SuppressWarnings("unchecked")
public Iterable<? extends ActionInput> getInputFiles() {
return inputs;
}
