Skip to content

Commit

Permalink
Use the analysis package roots to set up the exec root.
Browse files Browse the repository at this point in the history
With the new Skyframe-based loading phase runner as well as with
--experimental_interleave_loading_and_analysis, we no longer run a full loading
phase to load all dependencies; instead, we load packages during configuration
creation and analysis. In that case, the loading phase result's package roots
are empty.

This change should be safe - the analysis package roots can be a subset of the
loading package roots (we may not need to load stuff if there are select
expressions with unused branches for the current set of options), but it should
cover everything that is needed for the execution phase.

If there is a bug in the new code path, it manifests as odd file not found
errors during action execution, where the files seem to be there (but are not
mapped into the exec root due to missing symlinks).

The old code path uses TransitiveTargetValue.getTransitiveSuccessfulPackages(),
the new one uses ConfiguredTargetValue.getTransitivePackages() and
AspectValue.getTransitivePackages(). I audited the new code paths, and they
look ok.

--
MOS_MIGRATED_REVID=107252220
  • Loading branch information
ulfjack authored and fweikert committed Nov 6, 2015
1 parent 42984f3 commit 7cdc5c9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public void buildTargets(BuildRequest request, BuildResult result, TargetValidat
if (needsExecutionPhase(request.getBuildOptions())) {
runtime.getSkyframeExecutor().injectTopLevelContext(request.getTopLevelArtifactContext());
executionTool.executeBuild(request.getId(), analysisResult, result,
configurations, transformPackageRoots(loadingResult.getPackageRoots()));
configurations, transformPackageRoots(analysisResult.getPackageRoots()));
}

String delayedErrorMsg = analysisResult.getError();
Expand Down

0 comments on commit 7cdc5c9

Please sign in to comment.