aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/buildtool/buildevent
Commit message (Collapse)AuthorAge
* Rename BuildEventConverters to BuildEventContextGravatar ulfjack2018-05-17
| | | | | | | This is in preparation for adding options to the class, which can be used to modify the behavior of build events posted to the BEP. PiperOrigin-RevId: 196997573
* Thread configuration map through TestFilteringCompleteEvent. This isn't the ↵Gravatar janakr2018-03-27
| | | | | | most elegant solution, but I don't have a better idea. PiperOrigin-RevId: 190656869
* Replace all usages of Blaze's Preconditions class with guava.Gravatar tomlu2017-11-09
| | | | | | | | Blaze had its own class to avoid GC from varargs array creation for the precondition happy path. Guava now (mostly) implements these, making it unnecessary to maintain our own. This change was almost entirely automated by search-and-replace. A few BUILD files needed fixing up since I removed an export of preconditions from lib:util, which was all done by add_deps. There was one incorrect usage of Preconditions that was caught by error prone (which checks Guava's version of Preconditions) that I had to change manually. PiperOrigin-RevId: 175033526
* BEP: Add an additional event with tool statisticsGravatar aehlig2017-10-27
| | | | | | | | | | After the completion of the build, also report useful logs/statistics. Do so in a separate event, so that the protocol allows reporting build completion early and purely staticial information later, maybe event after some computations. Change-Id: Ibd221546de76fcffcda7819c300187eac45ebd68 PiperOrigin-RevId: 173548733
* BuildEventStreamer: allow final messagesGravatar aehlig2017-10-26
| | | | | | | | | | After receiving a BuildCompletingEvent, allow some final late messages, but only those not yet seen and announced by that BuildCompletingEvent. This mechanism will be used in a follow-up change to add a message with tool statistics. Change-Id: I979bec5bd946208068faff9a4ddd5245a769f096 PiperOrigin-RevId: 173514552
* BEP: correctly report unbuilt targets if --nobuild is givenGravatar Klaus Aehlig2017-10-25
| | | | | | | | | If bazel is asked to only analyze a target, but not do any builds, correctly report this as the cause why the obtained configured targets were never completed. Change-Id: I6308f8c222861dc0205a63664d5ea9861dd38b6a PiperOrigin-RevId: 173364084
* BEP: correctly report the cause of unbuilt targets if --noanalyze is givenGravatar Klaus Aehlig2017-10-20
| | | | | | | | | If bazel is asked to only load target, but not perform an analysis phase, correctly report this as the cause why the obtained targets wer never configured. Change-Id: Ib630a6dc1b955b810a6cc40254c0ae746e2eca1e PiperOrigin-RevId: 172787777
* Accept command lines from tools invoking Bazel.Gravatar ccalvarin2017-10-18
| | | | | | | | | | | For tools that wrap Bazel in some way, the original way that the tool was invoked can be a useful piece of information to track when logging what Bazel did and why. In order to output this information in the same way that Bazel outputs its command lines, we accept --tool_command_line in the structure command line format that Bazel uses in the BEP. These structured command lines are protos that we expect as a base64 encoded byte array. For simple scripts that wish to use this feature without compiling the proto, we will also accept any old string (that cannot be interpreted as a base64 encoding) as a single "chunk" in a structured command line. This is experimental for now and users should not get attached to the format. We will remove the experimental_ prefix when it is stable. RELNOTES: None. PiperOrigin-RevId: 172341216
* BEP: link structured command lineGravatar Klaus Aehlig2017-10-16
| | | | | | | | | | Change ceb1013c1ca0238188e2714442fcfb2efb16bc6a added an event for the structured command line to the BEP. Announce that event as a child of the build-starting event so that it gets properly chained and does not have to be chained in by a progress event. Change-Id: I6aeb46b748a536da58a916b9c4e0b1b66bbd40b0 PiperOrigin-RevId: 172100341
* Report the structured Bazel command line via the BEP.Gravatar ccalvarin2017-10-10
| | | | | | | | | This is part of the effort outlined in https://bazel.build/designs/2017/07/13/improved-command-line-reporting.html. The refactoring of the options parser is not yet complete, so we still do not have complete & correct information about the canonical command line. Where the information is blatantly incorrect, a best approximation was made, with comments and tests documenting the deficiencies. Change the names of the initial CommandLine fields in the BEP to be explicitly identified as unstructured. RELNOTES: None. PiperOrigin-RevId: 171625377
* Unify buildevnts indicating build completionGravatar Klaus Aehlig2017-09-19
| | | | | | | ...by factoring out the common code parts. Change-Id: I2ead39ea218dd535af9684a81a7bbe29b558aa27 PiperOrigin-RevId: 169106854
* Move core test classes to lib.analysis.testGravatar ulfjack2017-08-11
| | | | | | | | These are depended upon by analysis code, so need to live in the same library as lib.analysis. Moving them here makes it possible to split the build-base library into separate libraries for analysis, execution, and rules. PiperOrigin-RevId: 164847161
* Remove Java 7 type inference workarounds and TODOsGravatar brandjon2017-07-12
| | | | | | | Found by searching for TODOs mentioning "Java 7". There are plenty of other instances where we can simplify, but I don't want to be responsible for a large blast radius. At least in these cases we're fixing outdated comments. RELNOTES: None PiperOrigin-RevId: 161570189
* BEP: Correctly report test exit code.Gravatar buchgr2017-05-30
| | | | | | | | | | | | | When a test failure occurred the BEP would still report a build_finished event with exit code SUCCESS, even though bazel's exit code was TESTS_FAILED. This is because we would rely on the exit code reported by the BuildCompleteEvent. However, this exit code contains only the build status without taking into account the test status. In this change we introduce the TestingCompleteEvent that reports bazel's final exit code in case of "bazel test". RELNOTES: None. PiperOrigin-RevId: 157445808
* BEP: Add WorkspaceStatusGravatar Klaus Aehlig2017-05-03
| | | | | | | | Add an event reporting the workspace status as key-value pairs reported via the workspace_status_command. Change-Id: I5791551798a594bc2465f483eb97f9d4fd4c7cfd PiperOrigin-RevId: 154845224
* Re-introduce the overall_success field in BEP.Gravatar buchgr2017-04-28
| | | | | | | | Removal of BuildFinished.overall_success broke internal tests and thus we decided to reintroduce the field and deprecate it. RELNOTES: None. PiperOrigin-RevId: 154432961
* BEP: Report exit code in BuildCompleteEventGravatar Jakob Buchgraber2017-04-27
| | | | | | | | | | | | | We decided to use the exit code as opposed to a status enum as bazel reports the build status as an exit code internally and the number of exit codes is dynamic. That is, a bazel module might add additional exit codes and thus we need to support reporting these. The overall_success field is now redundant and has thus been removed. A build was successfull iff ExitCode.code equals zero. Change-Id: I268db972b09d983f6cd07df34e3a384efb607358 PiperOrigin-RevId: 154413356
* BEP: provide events a generic converter classGravatar aehlig2017-04-04
| | | | | | | | | | | Change the BuildEvent interface to accept a generic class of converters. In this way, we won't have to change it again in the future, once more converters are needed. In fact, a new converter is needed right now (will be added in a follow-up patch) to allow build events to know the name of named artifact groups already reported in the stream. Change-Id: Ibb32ea5fff361e21bcf2d34818d8351a1da7a2e3 PiperOrigin-RevId: 152131870
* BEP: Also report options Gravatar Klaus Aehlig2017-03-27
| | | | | | | | | | | | Additionally to reporting on the originally received command line, also report it in a parsed form. This, in particular, includes reconstructing the options originally provided by the user. -- Change-Id: I5a1c6ed57874f1d37d10bf11d597256d63bc5516 Reviewed-on: https://cr.bazel.build/9459 PiperOrigin-RevId: 151288656 MOS_MIGRATED_REVID=151288656
* BEP: Also report the original command line Gravatar Klaus Aehlig2017-03-23
| | | | | | | | | | | In the protocol, also report the command line as received by the server, before and option handlers modify it. -- Change-Id: If5bab172944679752477836a5f499d2837201888 Reviewed-on: https://cr.bazel.build/9453 PiperOrigin-RevId: 150894322 MOS_MIGRATED_REVID=150894322
* BEP: Add BuildFinished event. Gravatar Jakob Buchgraber2017-02-28
| | | | | | | | | | | | The build event protocol now emits a BuildFinished event at the end of a build. The event is a child of the BuildStarted event. The code changes were larger than expected, due to some refactoring in BuildEventStreamer. This was necessary as the BuildCompleteEvent now implements the BuildEvent interface and Guava's EventBus always invokes the most specialized subscriber method. Thus, the buildEvent(BuildEvent) and buildCompleted(BuildCompletedEvent) methods had to be merged. -- Change-Id: Id0c2bd7220dc8ce03128b7126587e212ee8ce836 Reviewed-on: https://cr.bazel.build/9053 PiperOrigin-RevId: 148788582 MOS_MIGRATED_REVID=148788582
* Fix spelling of millisGravatar Klaus Aehlig2017-02-21
| | | | | | | | -- Change-Id: I9e1483b9e99751b03d332110db023d99c045cb52 Reviewed-on: https://cr.bazel.build/9012 PiperOrigin-RevId: 148069886 MOS_MIGRATED_REVID=148069886
* Support mapping of Paths to URIsGravatar Klaus Aehlig2017-01-18
| | | | | | | | | | | Bazel-created files (like log files of test runs) are internally reported as Paths. However, this is not always the most useful representation of the location of that artifact for a consumer of build events. Therefore, support a mapping of paths to more useful URIs. -- PiperOrigin-RevId: 144843525 MOS_MIGRATED_REVID=144843525
* Show the starting of the build in the build event streamGravatar Klaus Aehlig2016-10-07
| | | | | | | | | | | | | Make the BuildStartingEvent visible in the event stream by making it an instance of the BuildEvent interface. It is the initial event of the build event stream hence it also announces that progress updates will follow. Its regular decedents are the expansion of the target patterns provided at the request. -- Change-Id: I237d8559b71ac82b10fdc492492b8435d6d1483f Reviewed-on: https://bazel-review.googlesource.com/#/c/6277 MOS_MIGRATED_REVID=135475422
* 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
* Use Bazel Preconditions variant which avoids varargs array creationGravatar Mark Schaller2015-12-10
| | | | | | | Reduces garbage. -- MOS_MIGRATED_REVID=109914243
* Remove an unused parameter.Gravatar Ulf Adams2015-12-04
| | | | | -- MOS_MIGRATED_REVID=109398431
* Workaround javac 1.7 bugGravatar Dmitry Lomov2015-11-19
| | | | | -- MOS_MIGRATED_REVID=108243881
* Fixed copy&paste error in javadoc.Gravatar Florian Weikert2015-11-17
| | | | | -- MOS_MIGRATED_REVID=108026192
* 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
* Update from Google.Gravatar Han-Wen Nienhuys2015-02-25
-- MOE_MIGRATED_REVID=85702957