aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/buildtool
Commit message (Collapse)AuthorAge
* Create a new proto output formatter for cquery. Also add flag ↵Gravatar juliexxia2018-04-11
| | | | | | --[no]proto:include_configurations which when used, makes cquery proto output appear exactly like query proto output so tools that are already using this can seamlessly transition. PiperOrigin-RevId: 192470626
* Error out gracefully instead of crashing blaze when --output=transitions is ↵Gravatar juliexxia2018-04-05
| | | | | | used without the --transitions flag PiperOrigin-RevId: 191755762
* Fix build results for aspect builds.Gravatar tomlu2018-04-03
| | | | | | | | | The current output was pretty much completely incorrect. However since the result output was always hidden for the default value of --show_result, users simply didn't see the incorrect output (instead getting no output at all). This CL fixes both the --show_result problem and makes the output correct. RELNOTES: Print correct build result for builds with --aspects flag. PiperOrigin-RevId: 191456352
* Get rid of call to deprecated ConfiguredTarget.getConfiguration()Gravatar juliexxia2018-03-28
| | | | PiperOrigin-RevId: 190777533
* Remove categories from Bazel options.Gravatar ccalvarin2018-03-28
| | | | | | | | | These have all had a chance to be categorized with the OptionDocumentationCategory enum, and the help output already uses the enum-grouped format. The "incompatible changes" category has meaning for --all_incompatible_changes and will be removed separately. RELNOTES: None. PiperOrigin-RevId: 190773778
* Move the default cquery output format to its own callback and standardize ↵Gravatar juliexxia2018-03-27
| | | | | | cquery output callback logic PiperOrigin-RevId: 190667120
* 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
* Simplified ActionContextConsumer by having it operate on a new class which ↵Gravatar Googler2018-03-26
| | | | | | holds a variety of strategy/context maps. PiperOrigin-RevId: 190491357
* Deprecate TransitiveInfoCollection#getConfiguration(), adding two new ↵Gravatar janakr2018-03-26
| | | | | | | | methods, TransitiveInfoCollection#getConfigurationKey() and ConfiguredTarget#getConfigurationChecksum(). These methods currently delegate to #getConfiguration(), but in the future they won't. I hope to get rid of #getConfigurationChecksum(), but I may have to fold the checksum into BuildConfigurationValue.Key or leave it as a separate field in ConfiguredTarget. Transform a representative (random?) selection of #getConfiguration calls, to show that it's pretty much possible everywhere. PiperOrigin-RevId: 190474978
* Create a new output formatter for cquery which output transition information ↵Gravatar juliexxia2018-03-23
| | | | | | in either a FULL or LITE version. Trigger new output with the new --transitions cquery flag in the new CqueryOptions class. PiperOrigin-RevId: 190278664
* Modify CTQEnvironment and associated files to handle AliasConfiguredTargets. ↵Gravatar juliexxia2018-03-15
| | | | | | Always handle AliasConfiguredTargets as separate nodes from their "actual" value. This is helpful in understanding certain query results e.g. somepath. PiperOrigin-RevId: 189196863
* Create a new version of BuildTool that holds all cquery logic.Gravatar juliexxia2018-03-07
| | | | PiperOrigin-RevId: 188212286
* Add functionality to MemoryProfiler to do multiple garbage collections at ↵Gravatar janakr2018-02-28
| | | | | | the end of the build in an effort to get an accurate measurement of used memory. PiperOrigin-RevId: 187337487
* Implement the config(expr, word) cquery function.Gravatar juliexxia2018-02-13
| | | | | | | expr - the expression to be evaluated word - the configuration (represented by the strings 'host', 'target', or 'null') to try to find the result(s) of 'expr' in. If some but not all results of expr can be found in the specified config, then the subset that can be is returned. If no results of expr can be found in the specified config, then an error is thrown. PiperOrigin-RevId: 185572590
* Check for nulls when making sure there is only one non-null configuration ↵Gravatar juliexxia2018-02-02
| | | | | | that top level targets are configured in. PiperOrigin-RevId: 184358568
* Replace ConfiguredTarget.getTarget() with a call to the environment's packageGravatar mjhalupka2018-01-30
| | | | | | manager. PiperOrigin-RevId: 183889147
* Remove references to ConfiguredTarget.getTarget() in BuildTool.Gravatar mjhalupka2018-01-29
| | | | PiperOrigin-RevId: 183704507
* cquery output: change the output config to be "HOST" for targets configured ↵Gravatar juliexxia2018-01-25
| | | | | | in the host config instead of the usual hash of options. PiperOrigin-RevId: 183293164
* Quick blanket replacement of getTarget().getLabel() with .getLabel(). Some ↵Gravatar Googler2018-01-22
| | | | | | have already been changed to ConfiguredTargetAndTarget so there's fewer classes than I thought there would be. PiperOrigin-RevId: 182839243
* Add option to optionally wipe state at the end of a build.Gravatar ccalvarin2018-01-22
| | | | | | | This will serve as an alternative to --batch, leaving behind a server without state from the previous build. RELNOTES: Introduces --[no]keep_state_after_build PiperOrigin-RevId: 182778500
* Move storage of queryExpression for cquery out of BuildRequest and straight ↵Gravatar juliexxia2018-01-19
| | | | | | into processRequest method in BuildTool. This is an extension of CL/181816980 and prevents pollution of BuildRequest. PiperOrigin-RevId: 182576704
* Fix usages of PathFragment segments that will become inefficient.Gravatar tomlu2018-01-19
| | | | | | | An upcoming replacement to PathFragment will not have efficient segment semantics, causing code to become unnecessarily inefficient. RELNOTES: None PiperOrigin-RevId: 182553098
* Hoist "continue" statement outside of inner loop.Gravatar nharmata2018-01-19
| | | | | RELNOTES: None PiperOrigin-RevId: 182546239
* Introduce Root class.Gravatar tomlu2018-01-17
| | | | | | | | | | | This class represents a root (such as a package path or an output root) used for file lookups and artifacts. It is meant to be as opaque as possible in order to hide the user's environment from sky keys and sky functions. Roots are used by RootedPaths and ArtifactRoots. This CL attempts to make the minimum number of modifications necessary to change RootedPath and ArtifactRoot to use these fields. Deprecated methods and invasive accessors are permitted to minimise the risk of any observable changes. RELNOTES: None PiperOrigin-RevId: 182271759
* Introduce the blaze cquery command as the new ui for configurable query.Gravatar juliexxia2018-01-12
| | | | | | | | | | | | | | | | | | before: blaze build --nobuild //foo --experimental_post_build_query="deps(//foo)" after: blaze cquery "deps(//foo)" pros of ui change: - more concise - assumes query expression targets == targets to be built (but allows for flexibility through --top_level_targets flag) - separate from build command - cquery command recognizes query options, build options, and its own unique set of options cons of ui change: - adds another command to blaze - recognizes options that don't actually work yet -> requires more option validation RELNOTES: None PiperOrigin-RevId: 181816980
* windows: fix --symlink_prefix=/ throwing exceptionGravatar laszlocsomor2018-01-12
| | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/4421 RELNOTES: none PiperOrigin-RevId: 181742216
* Consolidate calls to AnalysisUtils.getTopLevelTargetsWithConfigs which ↵Gravatar juliexxia2018-01-03
| | | | | | conveniently also makes it unnecessary to pass the entire LoadingResult when doing configured queries post analysis. PiperOrigin-RevId: 180676481
* Move TargetCompleteEvent generation to the CompletionFunctionGravatar ulfjack2017-12-22
| | | | | | | | | | | | | | | | This change breaks without https://github.com/bazelbuild/bazel/commit/a0ea569f7df19b8284846a52854e73747f7ec005; if that change is rolled back, this change has to be rolled back as well. It was previously in ExecutionProgressReceiver, and directly hooked into Skyframe. Now that we have a way to post event bus events directly from Sky functions, we should just do that. Also, this allows us to access artifact metdata, since the completion function has all the necessary artifacts as dependencies, which in turn can be used to improve the build event protocol implementation, where we want to post URLs to the CAS, which requires knowing the checksum. PiperOrigin-RevId: 179903333
* Consolidate instances of the --loading_phase_threads flag.Gravatar juliexxia2017-12-21
| | | | | RELNOTES: None. PiperOrigin-RevId: 179838936
* Remove some unused codeGravatar ulfjack2017-12-19
| | | | PiperOrigin-RevId: 179542482
* Consolidate instances of the --keep_going flag.Gravatar juliexxia2017-12-18
| | | | | RELNOTES: None. PiperOrigin-RevId: 179468685
* Rename --keep_incrementality_data to --track_incremental_state.Gravatar ccalvarin2017-12-14
| | | | | | | | | New name clears the namespace a 2nd flag that will wipe the build graph after the build. The old name would be confusing as it could easily apply to that, and so needs to be more specifically just about tracking state in the first place. The new flag can be clearly separate and about keeping state after the build. Partial roll forward of https://github.com/bazelbuild/bazel/commit/9321316b34767b06c3071b2cf2a4de189874fcce, with fixes to documentation that are still relevant. RELNOTES: Rename --keep_incrementality_data to --track_incremental_state PiperOrigin-RevId: 179078292
* Rename OutputGroupProvider -> OutputGroupInfo.Gravatar dslomov2017-12-14
| | | | | RELNOTES: None PiperOrigin-RevId: 179046403
* Automated rollback of commit 9321316b34767b06c3071b2cf2a4de189874fcce.Gravatar ccalvarin2017-12-11
| | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Design change, 2 boolean flags instead of 1 enum flag *** Original change description *** Add --incremental_state_retention_strategy This option is intended to replace some of the uses of --batch. It lets users specify that builds should not be incremental, and how eagerly to discard the state that is kept around for incrementality. Note that for both values discard_eargerly and keep_for_life_of_build, the build graph is kept around until the next build. This may change. Will add tests for keep_for_life_of_build in a later change, for now it will warn that that feature is experimen... *** ROLLBACK_OF=178661777 RELNOTES: None. PiperOrigin-RevId: 178681472
* Add --incremental_state_retention_strategyGravatar ccalvarin2017-12-11
| | | | | | | | | This option is intended to replace some of the uses of --batch. It lets users specify that builds should not be incremental, and how eagerly to discard the state that is kept around for incrementality. Note that for both values discard_eargerly and keep_for_life_of_build, the build graph is kept around until the next build. This may change. Will add tests for keep_for_life_of_build in a later change, for now it will warn that that feature is experimental. RELNOTES: --[no]keep_incrementality_data is gone, replaced by the enum-valued --incremental_state_retention_strategy PiperOrigin-RevId: 178661777
* Rollforward of rollback commit 078c25c2f3cce5f407e28938ab2f3429e4609b19 with ↵Gravatar juliexxia2017-12-08
| | | | | | properly executable shell and correct test outputs. PiperOrigin-RevId: 178376681
* bazel integration tests: chmod +x configured_query_test.shGravatar juliexxia2017-12-07
| | | | | | | | | | | | | | Automated rollback of commit d6736496f0e1c35b7567f331988997892e32dfda. *** Reason for rollback *** broken test *** Original change description *** Report empty query results. PiperOrigin-RevId: 178280711
* Report empty query results.Gravatar juliexxia2017-12-07
| | | | PiperOrigin-RevId: 178250626
* Add ActionKeyContext to Action#getKey.Gravatar tomlu2017-11-29
| | | | | | | This key context can be used by actions to share partial key computations, for instance when computing MD5s for nested sets. RELNOTES: None PiperOrigin-RevId: 177359607
* Minor fixes to spacing in help messagesGravatar Mike Morearty2017-11-29
| | | | | | | | A few help messages were missing a space after the period at the end of a sentence. Closes #4094. PiperOrigin-RevId: 177282132
* Add --host_deps custom filtering to configuredtargetqueryenvironment.Gravatar juliexxia2017-11-17
| | | | | | | | Notable implementation details: - split the flag into --experimental_post_build_query and --experimental_query_options - allow --nohost_dep filtering to be applied to query targets configured in the host configuration (only returns deps also in the host configuration so allow deps as long as it never sees a transition from a host config to a non-host config) PiperOrigin-RevId: 176165870
* RELNOTES: --keep_incrementality_data flag allows Bazel servers to be run in ↵Gravatar janakr2017-11-12
| | | | | | | | | | | | | | memory-saving non-incremental mode independent of --batch and --discard_analysis_cache. A command run with --nokeep_incrementality_data will discard data that would be needed for incremental builds. Subsequent commands can be sent to the same server, but they will not get the benefit of incrementality from this command. However, if --keep_incrementality_data is specified on a subsequent command, the commands after that will get the benefits of incrementality. There are two benefits to not being dependent on --batch. First, this allows Bazel servers to be run in extreme memory-saving mode without the startup penalties (JVM startup, JITting) that --batch execution imposes. Second, this allows Bazel developers to inspect the state of a Bazel server after an extreme memory-saving build. In order to avoid discarding data unnecessarily (for instance, on a "bazel info used-heap-size-after-gc" or "bazel dump --skyframe=summary") the actual resetting of the graph is done lazily, right before its use in SequencedSkyframeExecutor#sync. This is morally a partial rollback of https://github.com/bazelbuild/bazel/commit/98cd82cbdcac7c48164a611c5a9aa8fc2f1720ef. For now, our tests specify all of the flags. After this change sticks, I plan to get rid of the --batch flag from these tests, which should allow for some clean-ups. Eventually --batch and --discard_analysis_cache may not imply that we don't keep incremental state: we can require that it be specified explicitly. PiperOrigin-RevId: 175335075
* Fix a bug in which --experimental_post_build_query crashes if asked to run ↵Gravatar janakr2017-11-10
| | | | | | on a graph without edges. Now we fail gracefully. PiperOrigin-RevId: 175294923
* 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
* Thread FileSystem through to a single Path#delete call site.Gravatar tomlu2017-10-30
| | | | | | This requires a fairly large amount of changes to fundamental objects like BlazeRuntime, Executor, and so on, as well as changing a lot of test code to thread the file system through. I expect future CLs to be much smaller. PiperOrigin-RevId: 173678144
* 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
* Loop in top-level transition logic to configurable query to give more ↵Gravatar juliexxia2017-10-20
| | | | | | accurate results. Some refactoring done to get custom query code out of BuildView and into resolvers. PiperOrigin-RevId: 172647838