use of com.google.devtools.build.lib.pkgcache.LoadingCallback in project bazel by bazelbuild.
the class BuildTool method evaluateTargetPatterns.
private final LoadingResult evaluateTargetPatterns(final BuildRequest request, final TargetValidator validator) throws LoadingFailedException, TargetParsingException, InterruptedException {
Profiler.instance().markPhase(ProfilePhase.LOAD);
initializeOutputFilter(request);
final boolean keepGoing = request.getViewOptions().keepGoing;
LoadingCallback callback = new LoadingCallback() {
@Override
public void notifyTargets(Collection<Target> targets) throws LoadingFailedException {
if (validator != null) {
validator.validateTargets(targets, keepGoing);
}
}
};
LoadingPhaseRunner loadingPhaseRunner = env.getSkyframeExecutor().getLoadingPhaseRunner(runtime.getPackageFactory().getRuleClassNames(), request.getLoadingOptions().useSkyframeTargetPatternEvaluator);
LoadingResult result = loadingPhaseRunner.execute(getReporter(), request.getTargets(), env.getRelativeWorkingDirectory(), request.getLoadingOptions(), keepGoing, request.shouldRunTests(), callback);
return result;
}
Aggregations