aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/runtime/commands
Commit message (Collapse)AuthorAge
* Close the query environment after running a query.Gravatar shreyax2018-07-20
| | | | | RELNOTES: None. PiperOrigin-RevId: 205447838
* Add aquery as proper command to Bazel.Gravatar twerth2018-07-18
| | | | | RELNOTES: Add aquery command to get analysis time information about the action graph. PiperOrigin-RevId: 205064145
* Remove bazel info crosstool-configurationGravatar hlopko2018-07-13
| | | | | | | It was not opensourced, and even internally was not used. And we hate having internal-only code. RELNOTES: None. PiperOrigin-RevId: 204441702
* Replace instances of Blaze with Bazel.Gravatar Dan Fabulich2018-07-05
| | | | | | | PiperOrigin-RevId: 203300374 Change-Id: Iaa47f870ab2e0cad40a202aad2c7f9430f73c856 PiperOrigin-RevId: 203407392
* Add a bit more profiler coverageGravatar ulfjack2018-06-15
| | | | | | | | | | | | | | | | | | The intent is that the main thread has ~zero gaps in the profile (though there may still be small gaps due to the time between one try block and an immediately subsequent try block). We need to be careful not to wrap markPhase calls (or methods that call markPhase) in try blocks for the profiler - the Profiler requires that all markPhase calls happen at top level, and throws an exception if not. This should not have any performance impact - all of these are once per build, or at most once per module per build, and we don't expect a very large number of modules (and if we see an increasing number, we need to change the module API to not have to call every single module, but only those that are actually interested in certain events, maybe with an EventBus-based setup). PiperOrigin-RevId: 200712677
* Remove unnecessary flags from RunCommand command annotationGravatar ulfjack2018-06-14
| | | | | | | These are no longer necessary since we don't pipe the subprocess stdout/stderr through Bazel anymore. PiperOrigin-RevId: 200534552
* Add --experimental_supports_info_crosstool_configuration to support removal ↵Gravatar hlopko2018-06-13
| | | | | | | of bazel info crosstool-configuration RELNOTES: None. PiperOrigin-RevId: 200437121
* Move BuildView.Options to a new top-level classGravatar ulfjack2018-06-13
| | | | | | | This is in preparation for dismantling BuildView and merging the relevant parts into AnalysisPhaseRunner. PiperOrigin-RevId: 200391088
* Add --print_workspace_in_output_paths_if_needed flag.Gravatar mstaib2018-06-12
| | | | | | | | | | | | | | | | When this flag is turned on, and the user's working directory is beneath the workspace (but is not the workspace itself), the workspace's absolute path is printed as a prefix to the convenience symlink. With this flag off, the displayed convenience symlink path is always relative to the user's workspace, even if that isn't the current working directory. (This is the current behavior.) The new (flag-on) behavior will become default soon, and then this flag will be removed. RELNOTES: None. PiperOrigin-RevId: 200278355
* Split TargetPatternEvaluator into two interfacesGravatar ulfjack2018-06-12
| | | | | | | | | | | | | | | | | - the TargetPatternPreloader is still used for query in all its forms - the remaining TargetPatternEvaluator part is no longer used except in tests - also make both implementations stateless and pass the offset to the methods instead; note that they both modify the underlying skyframe graph, so there are side effects to the calls even if there's no direct state anymore The intent is to migrate the relevant tests to LoadingPhaseRunnerTest (which could also now be renamed since it's not doing a loading phase), and then delete the TargetPatternEvaluator interface. This depends on the previous commit that removed the last direct use of TPE from an internal command. PiperOrigin-RevId: 200198067
* Clean up `bazel help coverage`Gravatar Googler2018-06-05
| | | | | | | Remove blaze references and add a missing "a". RELNOTES: None. PiperOrigin-RevId: 199300497
* Changing SymlinkTreeStrategy not to use spawns.Gravatar Googler2018-05-18
| | | | | RELNOTES: An internal action for symlinking runfiles will use Command instead of a Spawns. This should have no functional chages; the only user visible consequence should be that the internal action is no longer be included in statistics when calculating processes count. PiperOrigin-RevId: 197131917
* Remove the "--as_test" command line option to "bazel run".Gravatar lberki2018-05-18
| | | | | | RELNOTES[INC]: "bazel run --noas_test" is not supported anymore. PiperOrigin-RevId: 197126838
* Remove "bazel run --nodirect_run".Gravatar lberki2018-05-18
| | | | | | | RELNOTES[INC]: Bazel now always runs binaries in with "bazel run" in interactive mode. The "--nodirect_run" command line option is now a no-op. PiperOrigin-RevId: 197121535
* Fix embedded JDK LICENSE handling for JDK 9Gravatar cushon2018-05-16
| | | | PiperOrigin-RevId: 196840344
* C++: Renames CcCompilationContextInfo to CcCompilationContextGravatar plf2018-05-14
| | | | | | | Since it's not a provider, it doesn't need the Info suffix anymore. RELNOTES:none PiperOrigin-RevId: 196498526
* Remove INTERNAL flags from help flags-as-proto.Gravatar mstaib2018-04-26
| | | | | | | | | These flags cannot be specified under any circumstances - the parser treats them as absent, and they can't be named in config_setting, etc. - so listing them here doesn't help anyone. RELNOTES: None. PiperOrigin-RevId: 194419952
* SpawnAction.setShellCommand: expect shell pathGravatar laszlocsomor2018-04-23
| | | | | | | | | | | | | | | | | | | | | | | SpawnAction.setShellCommand(String) now expects the shell interpreter's path as an argument. This change enables two things: - rules can report an error if the shell is missing - SpawnAction no longer has to know about a default shell The new ShToolchain class will later also be responsible for retrieving the active shell toolchain (added in https://github.com/bazelbuild/bazel/commit/81ed3add408adb20bddbc3ba1818c65806738dc5). This change brings Bazel closer to not depend on the shell unless it has to (e.g. to run shell scripts). See https://github.com/bazelbuild/bazel/issues/4319 RELNOTES: none PiperOrigin-RevId: 193885943
* Flip the default to --direct_run to true.Gravatar lberki2018-04-20
| | | | | RELNOTES: "bazel run" now lets one run interactive binaries. The BUILD_WORKSPACE_DIRECTORY and BUILD_WORKING_DIRECTORY environment variables indicate the working directory and the workspace root of the Bazel invocation. Tests are provided with an approximation of the official test environment. PiperOrigin-RevId: 193659165
* Fix up all the tests to work with "blaze run --direct_run".Gravatar lberki2018-04-20
| | | | | | | | | In particular, update run_test so that the little test binary used to check ANSI escape code stripping explicitly marks the beginning of its output and delete a bunch of tests run RunCommandTest that verified the output of the binary. They are not relevant anymore now that the output is not piped through the server. Also drive-by fix a few linter issues in RunCommand. RELNOTES: None. PiperOrigin-RevId: 193655720
* Make "run --direct_run" always use an absolute path for $0.Gravatar lberki2018-04-19
| | | | | | | This is so that the runfiles directory can always be found. RELNOTES: None. PiperOrigin-RevId: 193514152
* Keep LANG/LANGUAGE and related environment variables for the process spawned ↵Gravatar lberki2018-04-18
| | | | | | | by "blaze run --direct_run". RELNOTES: None. PiperOrigin-RevId: 193391379
* Emit the command executed with "blaze run --direct_run" and its cwd.Gravatar lberki2018-04-18
| | | | | RELNOTES: None. PiperOrigin-RevId: 193364213
* A slight refactoring of RunCommand.Gravatar lberki2018-04-17
| | | | | RELNOTES: None. PiperOrigin-RevId: 193203414
* Move test_timeout to BuildConfiguration and TargetCompleteEvent.Gravatar Googler2018-04-17
| | | | | | | | - Move test_timeout to BuildConfiguration. - Add test_timeout_seconds field to BEP TargetCompleteEvent. - Deprecate test_timeout field in ExecutionInfo. Data is still written to deprecated field to allow consumer transition. PiperOrigin-RevId: 193192636
* Rollback https://github.com/bazelbuild/bazel/pull/5007Gravatar cparsons2018-04-16
| | | | | | | It breaks downstream rules_nodejs. See https://github.com/bazelbuild/bazel/issues/5028 for details. RELNOTES: None. PiperOrigin-RevId: 193074798
* Add a --as_test flag to "blaze run" that can be used to tell Blaze not to ↵Gravatar lberki2018-04-13
| | | | | | | use the test environment when a test is invoked with "blaze run". RELNOTES: None. PiperOrigin-RevId: 192733014
* CommandBuilder: remove useShell and setWorkingDirGravatar Laszlo Csomor2018-04-12
| | | | | | | | | | | | | | | | | | | | | Remove the .useShell method, expect callers to just pass the shell interpreter if they need it. This removes the argument vector transformation heuristic, and stops shelling out to cmd.exe on Windows. Also remove the .setWorkingDir method because callers always had to set the working directory. Instead, the CommandBuilder constructor takes the working directory. Closes #2190. (Test code still shells out to cmd.exe though.) Closes #5007. Change-Id: I545e01c811daaf34913cb585492923da81aa02ee PiperOrigin-RevId: 192611370
* analyze-profile: prevent bazel from crashing outside a workspaceGravatar Shmuel H2018-04-11
| | | | | | | | This commit closes #3256. Closes #4971. PiperOrigin-RevId: 192429422
* Remove alphabetical sorting of options in the canonical list.Gravatar ccalvarin2018-04-09
| | | | | | | This was broken for --config. Doing this properly requires keeping the order in which the options were given, which could be done either by filtering the ordered list according to which values affect the final outcome or by tracking the order correctly. I picked the later: the option order was not explicitly tracked for expansions before but now it is. RELNOTES: canonicalize-flags no longer reorders the flags PiperOrigin-RevId: 192132260
* Prepare the file system before executing tests with --direct_run.Gravatar lberki2018-04-06
| | | | | RELNOTES: None. PiperOrigin-RevId: 191876954
* Move shell executable to its own configuration fragment.Gravatar lberki2018-04-06
| | | | | RELNOTES: None. PiperOrigin-RevId: 191861074
* C++: Rename CcCompilationInfo to CcCompilationContextInfo.Gravatar plf2018-04-03
| | | | | | | | | This is done so that the name CcCompilationInfo can be used for the C++ provider that will wrap all providers for compilation, similar to JavaInfo in Java. RELNOTES:none PiperOrigin-RevId: 191445120
* 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
* Remove old option categorization from the help output.Gravatar ccalvarin2018-03-27
| | | | | | | In preparation for removing all uses of the category field in Bazel options. RELNOTES: None. PiperOrigin-RevId: 190665669
* 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
* Set BUILD_WORKSPACE_DIRECTORY and BUILD_WORKING_DIRECTORY when running ↵Gravatar lberki2018-03-26
| | | | | | | tests, too. RELNOTES: None. PiperOrigin-RevId: 190439262
* Make "blaze run --direct_run" wrap the command in a shell.Gravatar lberki2018-03-26
| | | | | | | This mimics "--nodirect_run". Apparently, a lot of people depend on this :( RELNOTES: None. PiperOrigin-RevId: 190433808
* Make the script written blaze "blaze run --direct_run --script_path" not ↵Gravatar lberki2018-03-26
| | | | | | | | | overwrite the environment of their caller. Admittedly, doing that was a bad idea in the first place. RELNOTES: None. PiperOrigin-RevId: 190430189
* 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
* Refactor and cleanup the sandboxing code.Gravatar Philipp Wollermann2018-03-23
| | | | | | | | | | | | | - Remove Optional<> where it's not needed. It's nice for return values, but IMHO it was overused in this code (e.g. Optional<List<X>> is an anti-pattern, as the list itself can already signal that it is empty). - Use Bazel's own Path class when dealing with paths, not String or java.io.File. - Move LinuxSandboxUtil into the "sandbox" package. - Remove dead code and unused fields. - Migrate deprecated VFS method calls to their replacements. - Fix a bug in ExecutionStatistics where a FileInputStream was not closed. Closes #4868. PiperOrigin-RevId: 190217476
* Implement TargetProviderForQueryEnvironment.Gravatar dbabkin2018-03-23
| | | | | | | DirectTargetProvider works with WalkableGraph directly. If it fails to find target, then last try to use delegate TargetProvider which supposed to be PackageManager from SkyframeExecutor. RELNOTES:none PiperOrigin-RevId: 190204106
* Remove overloaded function in QueryEnvironmentFactoryGravatar dbabkin2018-03-22
| | | | | RELNOTES: none PiperOrigin-RevId: 190046225
* Remove support for blaze dump --vfs.Gravatar tomlu2018-03-12
| | | | | | | It is no longer meaningful since the vfs doesn't have an internal path tree to dump. RELNOTES: Remove support for blaze dump --vfs. It is no longer meaningful. PiperOrigin-RevId: 188739379
* Create a new version of BuildTool that holds all cquery logic.Gravatar juliexxia2018-03-07
| | | | PiperOrigin-RevId: 188212286
* Add option to dump command lines of actions in dump.Gravatar twerth2018-03-07
| | | | | RELNOTES: None PiperOrigin-RevId: 188164754
* Remove references to the "message_log" from Bazel.Gravatar ruperts2018-03-05
| | | | | RELNOTES: None. PiperOrigin-RevId: 187974423
* Add option to filter for targets in the action graph dump.Gravatar twerth2018-03-02
| | | | | RELNOTES: Use bazel dump --action_graph=/path/to/action.proto --action_graph:targets://foo:bar,//foo:foo to filter for certain targets in the action graph dump. PiperOrigin-RevId: 187608321
* Improve "blaze run --direct_run".Gravatar lberki2018-02-28
| | | | | | | | | | | | | | | | | In particular: - Make it support --script_path - Make it add command line arguments specified on the command line to tests - Remove a stale comment This introduces the following differences in behavior wrt. --nodirect_run: - Tests are run through the test setup script and get the environment variables specific to tests - --test_arg arguments will be on the command line of test targets - The script written by --script_path overwrites the environment of the binary with the client environment at the time of "blaze run" (for binaries) or the proper test environment (for tests) RELNOTES: None. PiperOrigin-RevId: 187309437