aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java
Commit message (Collapse)AuthorAge
* Fix bug introduced by commit dc0fbb42ab22ab8f3205b0884069e1ffe03677c9 where ↵Gravatar Nathan Harmata2016-04-07
| | | | | | | | | | | | | a less specific option specification in a rc file could override a more specific option specification when there's a non-trivial Command hierarchy. A concrete example would be a "build --foo=1" line overriding a "test --foo=2" line for a "test" invocation. See the added test for more details. Also fix some typos in BlazeCommandDispatcherRcoptionsTest.java. Note that commit dc0fbb42ab22ab8f3205b0884069e1ffe03677c9 was rolled back in commit 417dad0f1e0d0ed4ccd5f8e52b49eb79937da49d which also incidentally rolled back commit 4f0fbe1b09333806cce76b75214e98c7684766e0. So this change is effectively a roll-forward of both of those, plus the bug fix, plus the typo fixes, and plus a documentation update. -- MOS_MIGRATED_REVID=119276218
* Rollback of commit dc0fbb42ab22ab8f3205b0884069e1ffe03677c9.Gravatar John Field2016-04-07
| | | | | | | | | | | | | | | | | | *** Reason for rollback *** Changed the semantics of local .blazerc handling, requiring a Blaze release rollback ([]). *** Original change description *** Make specific options win over common ones When specifying which command names to parse options for, given the command annotation, ensure that "common" comes first, so that it can be overridden by more specific options. -- MOS_MIGRATED_REVID=119227260
* Pass through the clock to the ExperimentalStateTrackerGravatar Klaus Aehlig2016-04-04
| | | | | | | | | | In this way, the ExperimentalStateTracker has access to all the information needed to provide information about the run-time of currently running actions. -- Change-Id: I0f4e48f39e9ebe63555e4bb1d70df2a6dbb65430 Reviewed-on: https://bazel-review.googlesource.com/#/c/3204 MOS_MIGRATED_REVID=118929758
* Rollback of commit 044adedc70de040475443e52eb1a3c692159790eGravatar Googler2016-03-31
| | | | | -- MOS_MIGRATED_REVID=118605600
* Move BlazeRuntime.initCommand to BlazeWorkspace.Gravatar Ulf Adams2016-03-30
| | | | | -- MOS_MIGRATED_REVID=118568284
* Move most of the workspace-handling code from BlazeRuntime to a new class.Gravatar Ulf Adams2016-03-30
| | | | | -- MOS_MIGRATED_REVID=118563271
* Move most BlazeRuntime methods related to workspace directories to CommandEnv.Gravatar Ulf Adams2016-03-30
| | | | | -- MOS_MIGRATED_REVID=118561661
* experimental UI: don't update progress bar after build for INFOGravatar Klaus Aehlig2016-03-30
| | | | | | | | | | | | | | | | | | | | | As explained in commit 37f3e9ee, after completion of the build, there is no need any more to update the progress bar. Instead, its last line, if any, can just float into the scroll-back buffer. From then on, STDOUT and STDERR events are just passed through. Do so as well for any late INFO, WARNING, or ERROR events. This will allow avoiding pointless messages in commands like 'bazel clean' (the patch removing those messages will also provide an appropriate integration test). Unfortunately, to make this work properly, we must ensure that both event handlers get informed about the fact that we have a no-build command. To do this, we register the event handler with the intended IO stream on the event bus, as well as a passively observing variant of the event handler that has direct acces to the full output stream. -- Change-Id: I148dc0065b6343e4a2a225b2d4fa615b4f720ff5 Reviewed-on: https://bazel-review.googlesource.com/#/c/3124 MOS_MIGRATED_REVID=118444275
* Always apply invocation policy when constructing build options.Gravatar Janak Ramakrishnan2016-03-24
| | | | | -- MOS_MIGRATED_REVID=117939121
* Register the primary handler with the event busGravatar Klaus Aehlig2016-03-23
| | | | | | | | | | | | If bazel is invoked with --color=no, two event handlers are in use simultaneously, using different output streams. For the event bus, register the one that is aware of ansi control characters, as this is the one that will also pass through stdout/stderr events. -- Change-Id: I83f1164b9057cebf9345c315f42c8d54a88d3888 Reviewed-on: https://bazel-review.googlesource.com/#/c/3121 MOS_MIGRATED_REVID=117922780
* Move TimestampGranularityMonitor to CommandEnvironment.Gravatar Ulf Adams2016-03-23
| | | | | | | | This is one of the last pieces of state in BlazeRuntime that isn't safe to share across command invocations. -- MOS_MIGRATED_REVID=117910631
* Make client-provided options an rc sourceGravatar Klaus Aehlig2016-03-23
| | | | | | | | | | | | | | | The client provides information about whether the terminal is a tty, and which width the output should be formatted for. Passing this information as explicit command-line arguments has the disadvantage that it overrides any setting in configuration files. While usually there is no one-size-fits-all value for terminal width, it doesn't make sense either to have an option where the user cannot set a default. Fix this by providing the client options as least imported rc-source. -- Change-Id: Iad9eddbb3ff1777f4b423053e21aeac9fd7c466f Reviewed-on: https://bazel-review.googlesource.com/#/c/3092 MOS_MIGRATED_REVID=117833645
* Make specific options win over common onesGravatar Klaus Aehlig2016-03-23
| | | | | | | | | | | When specifying which command names to parse options for, given the command annotation, ensure that "common" comes first, so that it can be overridden by more specific options. -- Change-Id: I20cd90c098e993580c32297d1e36c8a6c939873a Reviewed-on: https://bazel-review.googlesource.com/#/c/3091 MOS_MIGRATED_REVID=117821257
* Update ANDROID_DEFAULT_CROSSTOOL to default to //external:android/crosstool. ↵Gravatar Luis Fernando Pino Duque2016-02-25
| | | | | | | Remove the constant. -- MOS_MIGRATED_REVID=115555161
* Register the EventHandler with the EventBusGravatar Klaus Aehlig2016-02-24
| | | | | | | -- Change-Id: I68f9f8c897c65b6d51bd21262e25ad6a93ee794f Reviewed-on: https://bazel-review.googlesource.com/#/c/3011 MOS_MIGRATED_REVID=115454025
* Add an option to enable an experimental UIGravatar Ulf Adams2016-02-24
| | | | | | | | | | | By enabling this option (default is off), a new, still experimental UI will be used. As it is developped from scratch, this commit simply implements a UI that does not produce any output at all. -- Change-Id: I895c0e0744c008212efc7bdfca1457f7907c9b64 Reviewed-on: https://bazel-review.googlesource.com/#/c/3009/ MOS_MIGRATED_REVID=115441032
* A minor tweak to the mechanism by which Bazel finds out it is in the ↵Gravatar Lukacs Berki2015-12-10
| | | | | | | execroot of another workspace. -- MOS_MIGRATED_REVID=109885272
* Add a --deep_execroot startup option that puts the execroot under ↵Gravatar Lukacs Berki2015-12-09
| | | | | | | | | $OUTPUT_BASE/execroot/<workspace name> instead of $OUTPUT_BASE/<workspace name>. This makes it possible to run Bazel in directories whose name clashes with one of the pre-existing files in the output base. Note that this option is turned off by default for now. -- MOS_MIGRATED_REVID=109791053
* Remove BlazeRuntime.reporter; use a BlazeModule to attach event handlers.Gravatar Ulf Adams2015-11-02
| | | | | | | | This only affects tests that previously set a Reporter on the BlazeRuntime; the production code is already using the per-command Reporter in all cases. -- MOS_MIGRATED_REVID=106820846
* Move commandStartTime from BlazeRuntime to CommandEnvironment.Gravatar Ulf Adams2015-10-20
| | | | | -- MOS_MIGRATED_REVID=105840775
* New feature: Bazel prints a warning for unknown --config flag values.Gravatar Laszlo Csomor2015-10-15
| | | | | -- MOS_MIGRATED_REVID=105499267
* Move loadingPhaseRunner from BlazeRuntime to CommandEnvironment.Gravatar Ulf Adams2015-09-30
| | | | | | | | | | The loadingPhaseRunner is stateless, and moving it prevents accidentally adding state to it. The TargetPatternEvaluator is not stateless, but is currently retained by the SkyframePackageManager, so we still keep that state across invocations (see follow-up CL). -- MOS_MIGRATED_REVID=104187659
* Adds a mechanism for invocation policy. The policy is taken through the ↵Gravatar Alex Humesky2015-09-30
| | | | | | | --invocation_policy startup flag and allows an application invoking Bazel to set or override flag values (whether from the command line or a bazelrc). -- MOS_MIGRATED_REVID=104160290
* 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
* Move getOutputFilesystem to CommandEnvironment; refactor BlazeRuntime commands.Gravatar Ulf Adams2015-09-21
| | | | | | | | | | This change makes it so commands are no longer both stored in the BlazeRuntime and in the BlazeCommandDispatcher. Instead, they are only stored in BlazeRuntime and usually passed there during construction. We have some tests where this is tricky, so I'm keeping the old code path for now. -- MOS_MIGRATED_REVID=103364581
* Move the commandId and getCommandStartTime() to CommandEnvironment.Gravatar Ulf Adams2015-09-21
| | | | | | | | They are usually on the same line, so doing this in separate changes can cause merge conflicts. -- MOS_MIGRATED_REVID=103362797
* Remove the now-unused BlazeModule.beforeCommand variant.Gravatar Ulf Adams2015-09-17
| | | | | -- MOS_MIGRATED_REVID=103276489
* Move several parts of BlazeRuntime to CommandEnvironment.Gravatar Ulf Adams2015-09-16
| | | | | | | | The main piece is the blaze module environment, which is only valid during command execution. Also configuration creation and precompleteCommand. -- MOS_MIGRATED_REVID=103186467
* Change checkRuntime to take a CommandEnvironment instead.Gravatar Ulf Adams2015-09-16
| | | | | | | | | I wanted to merge it into beforeCommand, but the reporter isn't set up yet when we call beforeCommand. Hopefully we can refactor the code to merge it in the future. -- MOS_MIGRATED_REVID=103179268
* Introduce CommandEnvironment and pass it instead of BlazeRuntime.Gravatar Ulf Adams2015-09-15
| | | | | | | | The very long term plan is to make BlazeRuntime immutable, so that we can run multiple commands in the same server. -- MOS_MIGRATED_REVID=103080946
* Description redacted.Gravatar Marian Lobur2015-08-17
| | | | | -- MOS_MIGRATED_REVID=100814605
* Remove broken code.Gravatar Marian Lobur2015-08-13
| | | | | | | | 1. We are adding handler and removing it after that. 2. There is no modules that calls .handle method of reporter in beforeCommand. -- MOS_MIGRATED_REVID=100478454
* Fixed bug where blaze run with the --color=no flag was still printing out in ↵Gravatar Shreya Bhattarai2015-08-04
| | | | | | | | | color when the build fails. Includes fix for problems causing the original slowdown to blaze query -- MOS_MIGRATED_REVID=99755414
* Rollback of commit 2e7a5b47979b2679208a97a65df265be953eb595.Gravatar Han-Wen Nienhuys2015-08-04
| | | | | | | | | *** Reason for rollback *** Query performance regression. -- MOS_MIGRATED_REVID=99560234
* Fixed bug where blaze run with the --color=no flag was still printing out in ↵Gravatar Googler2015-07-21
| | | | | | | color when the build fails. -- MOS_MIGRATED_REVID=98736813
* Fix product name in the error message for invalid commands.Gravatar Laszlo Csomor2015-06-03
| | | | | | | | $ bazel blah Command 'blah' not found. Try 'bazel help'. -- MOS_MIGRATED_REVID=95089307
* Don't allow launching from a directory with a space in the nameGravatar Kristina Chodorow2015-04-30
| | | | | | | Further improvements on #167. -- MOS_MIGRATED_REVID=92459390
* Pass in the test environment using ↵Gravatar Lukacs Berki2015-04-20
| | | | | | | | | | | BuildConfiguration.Options.testEnvironment instead of special-casing it in a large number of classes. The variables in the client environment are read in BlazeRuntime#beforeCommand() now. Note that this entails a slight loss of caching: before, "--test_env=a=A,b=B" and "--test_env=b=B,a=A" were equivalent, now they are not, since instead of comparing Map<String, String>, List<Map.Entry<String,String>> instances are compared. -- MOS_MIGRATED_REVID=91570828
* Update from Google.Gravatar Han-Wen Nienhuys2015-02-25
-- MOE_MIGRATED_REVID=85702957