aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/buildtool/SkyframeBuilder.java
Commit message (Collapse)AuthorAge
* Only announce test summaries in BEP if expectedGravatar Klaus Aehlig2016-11-30
| | | | | | | | | | | In some situations, we do not even expect a test summary to appear in the BEP, e.g., if testing is not asked for. Do not announce a test summary in this case. -- Change-Id: Ifd46e3582292b087bb1d37f255a140f631854830 Reviewed-on: https://cr.bazel.build/7373 MOS_MIGRATED_REVID=140589645
* Model the TopLevelArtifactContext as an argument to the CompletionFunction ↵Gravatar Googler2016-07-18
| | | | | | | | | rather than a PRECOMPUTED value. Having a stale TopLevelArtifactContext leads to invalidation of all the top level target nodes, causing time wasted due to a lot of cache hits for a null build. -- MOS_MIGRATED_REVID=127585059
* Update Skyframe builder to return exit code based on reported error map, whenGravatar Googler2016-06-16
| | | | | | | | | | | keep_going is turned on Current implementation only supports custom exit code from {@link ActionExecutionException} in fail-fast mode. This change allows appropriate error code to be returned based on all reported errors during build phase. -- MOS_MIGRATED_REVID=124987173
* Post the beginning of the execution phase on the event busGravatar Klaus Aehlig2016-03-04
| | | | | | | | | | | The event raised at this occasion also provides the ExecutionProgressReceiver, so that any UI subscribing to this event has access to up-to-date progress information. -- Change-Id: I366497a61f92dad21de6081e5b4f1ed1e19eda12 Reviewed-on: https://bazel-review.googlesource.com/#/c/3043 MOS_MIGRATED_REVID=116256754
* Extract ExecutionProgressReceiver into a top-level class.Gravatar Ulf Adams2016-03-02
| | | | | | | -- Change-Id: I7f9edbef4dd94b5d37aabb1a17333224af3615c6 Reviewed-on: https://bazel-review.googlesource.com/#/c/3042 MOS_MIGRATED_REVID=116163936
* Fix SkyframeBuilder's error handling, and change the contract of ↵Gravatar Janak Ramakrishnan2016-01-28
| | | | | | | | | | | EvaluationResult to return true for hasError() iff errorMap is non-empty or there is a catastrophe. There was no good reason for the previous behavior of saying hasError even if there was a transitive recovered-from error, since callers shouldn't care. This was a latent bug that was only benign since none of the consumers of hasError were invoking Skyframe with recoverable SkyFunctions. Also add an EvaluationResultSubject so that tests can more fluently assert things about EvaluationResult objects going forward. -- MOS_MIGRATED_REVID=113192415
* Make Bazel exit with the exit code from the BuildFailedException if one is ↵Gravatar Googler2016-01-25
| | | | | | | | | specified. If the build failure is caused by a catastrophic error, propagate the exit code from the catastrophe (EvaluationResult.getCatastrophe()) even when --keep_going. -- MOS_MIGRATED_REVID=112845942
* Allow an exit code to be specified in the ActionExecutionException when an ↵Gravatar Googler2016-01-25
| | | | | | | | | action fails, and propagate the exit code to BuildFailedException. And update all call sites that copy or wrap ActionExecutionExceptions. -- MOS_MIGRATED_REVID=112811857
* Use Bazel Preconditions variant which avoids varargs array creationGravatar Mark Schaller2015-12-10
| | | | | | | Reduces garbage. -- MOS_MIGRATED_REVID=109914243
* Correctly propagagate "catastrophic" failure modes in keep_going mode.Gravatar Eric Fellheimer2015-11-26
| | | | | -- MOS_MIGRATED_REVID=108740689
* Track the entire OutputService instead of just the BatchStatter.Gravatar Eric Fellheimer2015-11-16
| | | | | -- MOS_MIGRATED_REVID=107800790
* Set the SkyframeActionExecutor.reporter in prepareForExecution.Gravatar Ulf Adams2015-09-30
| | | | | | | Remove a lot of now-unused Reporter parameters. -- MOS_MIGRATED_REVID=104100061
* Rationalize copyright headersGravatar Damien Martin-Guillerez2015-09-25
| | | | | | | | | | | The headers were modified with `find . -type f -exec 'sed' '-Ei' 's|Copyright 201([45]) Google|Copyright 201\1 The Bazel Authors|' '{}' ';'` And manual edit for not Google owned copyright. Because of the nature of ijar, I did not modified the header of file owned by Alan Donovan. The list of authors were extracted from the git log. It is missing older Google contributors that can be added on-demand. -- MOS_MIGRATED_REVID=103938715
* Remove another use of errorEventHandler.Gravatar Ulf Adams2015-09-25
| | | | | -- MOS_MIGRATED_REVID=103850879
* Remove more uses of errorEventHandler (previously of Reporter).Gravatar Ulf Adams2015-09-24
| | | | | | | Removes mutable global state. -- MOS_MIGRATED_REVID=103837106
* Remove all direct uses of SkyframeExecutor.reporter.Gravatar Ulf Adams2015-09-24
| | | | | | | | | Instead, pass an appropriate EventHandler instance in. This is in preparation for creating a per-command EventHandler, in preparation for allowing multiple commands to run in parallel. This is removal of shared global state. -- MOS_MIGRATED_REVID=103828963
* Add a method to EvaluationProgressReceiver for getting information on ↵Gravatar Nathan Harmata2015-09-03
| | | | | | | SkyFunction#compute calls. -- MOS_MIGRATED_REVID=102268773
* Description redacted.Gravatar Janak Ramakrishnan2015-08-31
| | | | | -- MOS_MIGRATED_REVID=101809192
* Be resilient to a non-decreasing clock in ↵Gravatar Nathan Harmata2015-08-28
| | | | | | | | | BlazeRuntime#recordLastExecutionTime. Also add @Nullable annotations as appropriate. Fixes #394. -- MOS_MIGRATED_REVID=101685096
* Convert evaluated tracking to take a lazy SkyValueGravatar Mark Schaller2015-08-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The EvaluationProgressReceiver#evaluated method took a SkyValue, but that parameter was only used by some of its implementations, and only under some conditions. Outside of tests, the main users are SkyframeBuildView's ConfiguredTargetValueInvalidationReceiver and SkyframeBuilder's ExecutionProgressReceiver. The former builds up a set of built ConfiguredTarget keys when the SkyValue is non-null and the EvaluationState is BUILT, and so its nullity check can live behind those two conditions. The latter cares about builting up a set of ConfiguredTargets, and raising events on the eventBus when a TARGET_COMPLETION or ASPECT_COMPLETION value is evaluated and is non-null. The extraction of these values can live behind the conditions that check the type of the SkyKey. By making the SkyValue parameter lazy, this change enforces that it's only accessed under these conditions. This CL introduces a semantic change that should be small in effect. The SkyframeBuildView keeps track of a set, dirtiedConfiguredTargetKeys, and ConfiguredTarget keys evaluated as CLEAN were removed from it if they had a non-null value. With this change, ConfiguredTarget keys evaluated as CLEAN get removed regardless of whether their values are null or non-null. The set is used to determine whether artifact conflict search has to be rerun, and the extra removals that result from this CL could cause fewer artifact conflict searches to run, but the only affected searches would be those that were caused by dirtied configured target values in error all of which were subsequently marked as clean, which is probably rare. -- MOS_MIGRATED_REVID=101144655
* Replace ref equality with .equals for SkyFunctionNames (2)Gravatar Mark Schaller2015-08-20
| | | | | | | | | | Ref equality for same-name SkyFunctionNames is not guaranteed. These were some instances I missed in my previous sweep. I searched for references to the SkyFunctions and SkyFunctionNames classes throughout the project to catch these remaining instances. -- MOS_MIGRATED_REVID=101061352
* A prototype implementation of top-level aspects.Gravatar Dmitry Lomov2015-08-20
| | | | | -- MOS_MIGRATED_REVID=101033236
* Tolerate BuildFileNotFoundExceptions during the execution phase.Gravatar Janak Ramakrishnan2015-08-11
| | | | | -- MOS_MIGRATED_REVID=100317285
* Convert invalidated tracking from per-value to per-keyGravatar Mark Schaller2015-08-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The primary user of invalidation tracking is the SkyframeBuildView, which monitored which ConfiguredTargetValues were invalidated. It did that so the SkyframeExecutor could limit its search for artifact conflicts to when the set of configured targets in the build changed. For the newly introduced set of dirtied keys, "dirtiedConfiguredTargetKeys" in SkyframeBuildView, to be as useful as the "dirtyConfiguredTargets" set it replaced, the ConfiguredTargetValueInvalidationReceiver must only remove a key from the set if it was found to be clean when it was re-evaluated. If it was rebuilt, then the key must stay in the set, to represent that the set of configured target values has truly changed. This CL introduces a semantic change that hopefully has a small effect, if any. Previously, the informInvalidationReceiver method in InvalidatingNodeVisitor only informed the invalidationReceiver when a non-null value was invalidated. (This is usually, but not always, equivalent to a non-error value. The uncommon exception is that in keep-going builds, some nodes with errors may also have values, and the invalidator would inform the receiver when such a node was invalidated.) Now, the receiver is informed that a node is invalidated regardless of whether its value is null. Because the receiver uses this information to determine whether artifact conflict search has to be rerun, and that search is expensive, it's possible this change will negatively impact performance. However, the only way an extra search could be invoked is if the invalidated configured target nodes are all in error. That seems like it would happen rarely, if at all. Further cleanup of unused SkyValues returned by markDirty to come in a subsequent CL. -- MOS_MIGRATED_REVID=100304744
* Remove BuilderUtils#rethrowCause(...)'s vestigial bitsGravatar Michajlo Matijkiw2015-04-08
| | | | | | | | | | | | | | Rethrowing cause made sense a while ago, but now the only usages of this method have a direct handle on the exception they want dealt with and wrap the input with "new Exception(...)". Instead just pass the exception along directly. Also modified the comment in the unexpected case- the class referenced does not exist anymore, from what I can tell, and thus the comment was misleading. -- MOS_MIGRATED_REVID=90623740
* Inform EvaluationProgressReceiver of nodes that are built in error.Gravatar Janak Ramakrishnan2015-03-13
| | | | | | | | | This allows the pending action counter to be decremented correctly when in --keep_going mode. As part of this, there's a small refactor in ParallelEvaluator that also fixes a potential bug, that nodes in error were signaling their parents with the graph version as opposed to their actual version. Because errors never compare equal (ErrorInfo doesn't override equality), this isn't an issue in practice. But it could be in the future. -- MOS_MIGRATED_REVID=88395500
* Record statistics about dirty output files detected in the output tree.Gravatar Miguel Alcon Pinto2015-03-11
| | | | | -- MOS_MIGRATED_REVID=88257621
* Update from Google.Gravatar Han-Wen Nienhuys2015-02-25
-- MOE_MIGRATED_REVID=85702957