Search in sources :

Example 1 with LegacyLoadingPhaseRunner

use of com.google.devtools.build.lib.skyframe.LegacyLoadingPhaseRunner in project bazel by bazelbuild.

the class BuildViewTestCase method update.

protected AnalysisResult update(List<String> targets, List<String> aspects, boolean keepGoing, int loadingPhaseThreads, boolean doAnalysis, EventBus eventBus) throws Exception {
    LoadingOptions loadingOptions = Options.getDefaults(LoadingOptions.class);
    BuildView.Options viewOptions = Options.getDefaults(BuildView.Options.class);
    viewOptions.keepGoing = keepGoing;
    viewOptions.loadingPhaseThreads = loadingPhaseThreads;
    LoadingPhaseRunner runner = new LegacyLoadingPhaseRunner(getPackageManager(), Collections.unmodifiableSet(ruleClassProvider.getRuleClassMap().keySet()));
    LoadingResult loadingResult = runner.execute(reporter, targets, PathFragment.EMPTY_FRAGMENT, loadingOptions, viewOptions.keepGoing, /*determineTests=*/
    false, /*callback=*/
    null);
    if (!doAnalysis) {
        // TODO(bazel-team): What's supposed to happen in this case?
        return null;
    }
    return view.update(loadingResult, masterConfig, aspects, viewOptions, AnalysisTestUtil.TOP_LEVEL_ARTIFACT_CONTEXT, reporter, eventBus);
}
Also used : BuildView(com.google.devtools.build.lib.analysis.BuildView) LoadingResult(com.google.devtools.build.lib.pkgcache.LoadingResult) LoadingPhaseRunner(com.google.devtools.build.lib.pkgcache.LoadingPhaseRunner) LegacyLoadingPhaseRunner(com.google.devtools.build.lib.skyframe.LegacyLoadingPhaseRunner) LegacyLoadingPhaseRunner(com.google.devtools.build.lib.skyframe.LegacyLoadingPhaseRunner) LoadingOptions(com.google.devtools.build.lib.pkgcache.LoadingOptions)

Aggregations

BuildView (com.google.devtools.build.lib.analysis.BuildView)1 LoadingOptions (com.google.devtools.build.lib.pkgcache.LoadingOptions)1 LoadingPhaseRunner (com.google.devtools.build.lib.pkgcache.LoadingPhaseRunner)1 LoadingResult (com.google.devtools.build.lib.pkgcache.LoadingResult)1 LegacyLoadingPhaseRunner (com.google.devtools.build.lib.skyframe.LegacyLoadingPhaseRunner)1