aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools
Commit message (Collapse)AuthorAge
* Remove dynamic configs dep on the static transition table.Gravatar gregce2017-07-11
| | | | PiperOrigin-RevId: 161432622
* Make SkylarkValue instances mutable by defaultGravatar vladmos2017-07-11
| | | | | | | | | | Simplify the code by providing the default implementation of `SkylarkValue$isImmutable` that always returns false. All objects are considered mutable unless their `isImmutable` method is overridden. This change doesn't affect the current behavior. PiperOrigin-RevId: 161422029
* Never use shell quoting in turbine params filesGravatar cushon2017-07-11
| | | | PiperOrigin-RevId: 161415544
* Remove extra commented-out line.Gravatar jcater2017-07-11
| | | | PiperOrigin-RevId: 161414631
* Make native declared providers type-safe.Gravatar dslomov2017-07-10
| | | | | RELNOTES: None. PiperOrigin-RevId: 161395570
* Update documentation on ctx.actions.declare_directory and File.Gravatar dslomov2017-07-10
| | | | | | | Fixes #3345. RELNOTES: None. PiperOrigin-RevId: 161395466
* Fix memory regression from CL/160891204.Gravatar tomlu2017-07-10
| | | | | | | | | Java compile actions create unnecessary wrapper objects around a shared constant object. We can share the ActionEnviroment between these actions. In the general spawn case there will be a lot of empty action environments. Make sure that these are shared too. RELNOTES: None PiperOrigin-RevId: 161389056
* Skylark, docs: fix docs of Label.relative(name)Gravatar laszlocsomor2017-07-10
| | | | | | | | | | It appeared in the docs that the function had no argument. Fixes https://github.com/bazelbuild/bazel/issues/3339 RELNOTES: none PiperOrigin-RevId: 161388878
* BEP: Report test warningsGravatar aehlig2017-07-10
| | | | | | | | Also report test warnings, if any, for completed test actions in the build event protocol. RELNOTES: None PiperOrigin-RevId: 161384061
* Make jvm_runtime.java_home expand Make variables.Gravatar lberki2017-07-10
| | | | | RELNOTES: None. PiperOrigin-RevId: 161383469
* Remove the functionality from alias() to point nowhere.Gravatar lberki2017-07-10
| | | | | | | | | It's never used and was broken anyway (see #getLabel()). The functionality has been laying there unused since the initial checkin in unknown commit. RELNOTES: None. PiperOrigin-RevId: 161378717
* Windows, Android BusyBox: create JunctionCreatorGravatar Laszlo Csomor2017-07-10
| | | | | | | | | | | Introduce the JunctionCreator classes that the Android BusyBox can use to work around path length limitations on Windows. See https://github.com/bazelbuild/bazel/issues/3264 Change-Id: Ia5ee39f0635dcc2690ffb1755dc56d21e7bc7536 PiperOrigin-RevId: 161378422
* Reimplement RemoteSpawnStrategy on top of RemoteSpawnRunnerGravatar ulfjack2017-07-10
| | | | | | | | | | | | | | | | | It is intentional that RemoteSpawnStrategy no longer contains any remote execution specific code. My intent is to merge all SpawnStrategy implementations into a single class (similar to the new RemoteSpawnStrategy), and delegate all the specific work to SpawnRunner implementations. However, we're not there yet, and we still need to be able to look up SpawnStrategy implementations by name through the annotations, so we still need separate classes for now. We might also want to have a shared test suite for all SpawnRunner instances that checks for basic compliance with the specification. Progress on #1531. PiperOrigin-RevId: 161377751
* BEP: Positively identify the last messageGravatar Klaus Aehlig2017-07-10
| | | | | | | | | | | Set an additional flag in the last BEP message to indicate the end of the proto sequence. While the last event is implicit from the child-relation (the sequence of protos is finished, if at least one event is seen and all announced events have occurred in the stream), an explicit marking of the last event simplifies processing. Change-Id: I6554476f975dc9e52fdb27fb3221bd27f6097ed9 PiperOrigin-RevId: 161377092
* remote: Rewrite the ByteStream upload.Gravatar buchgr2017-07-10
| | | | | | | | | | | | | | The current ByteStream upload implementation has no support for application-level flow control, which resulted in excessive buffering and OOM errors. The new implementation respects gRPCs flow control. Additionally, this code adds support for multiple uploads of the same digest. That is, if a digest (i.e. file) is uploaded several times concurrently, only one upload will be performed. RELNOTES: None. PiperOrigin-RevId: 161287337
* Look at stderr for terminal detection.Gravatar Googler2017-07-10
| | | | | | | | | | | | | | | | | | | | bazel prints all the progress to stderr, yet the decision to switch between "smart" and "dumb" output modes is done based on the stdout and stderr connected terminals. That breaks for a command like this: bazel query 'something' | wc -l Even though all the progress is still output to the terminal through stderr, bazel switches to "dumb" mode, printing progress messages one per line. It seems reasonable to make the "smart"/"dumb" output mode decision based on the stderr only. Tested: With the change "bazel query '...' | wc -l" prints "smart" progress messages. RELNOTES: Check stderr to detect if connected to a terminal. Deprecate --isatty. PiperOrigin-RevId: 161243017
* Remove objc_includes_prioritize_static_libsGravatar cparsons2017-07-10
| | | | | | | This flag was experimental but is now always-on. RELNOTES: None. PiperOrigin-RevId: 161234569
* Add doc argument to attr.*, rule, aspect, and provider.Gravatar allevato2017-07-10
| | | | | | | | Skydoc can use these arguments to obtain documentation instead of (or in addition to) Python-style docstrings. RELNOTES: None. PiperOrigin-RevId: 161233014
* Clean up string representations for artifactsGravatar vladmos2017-07-10
| | | | | | | | | If --incompatible_descriptive_string_representations is passed, artifacts are converted to strings using `str`, `repr` and `print` functions differently (more descriptive, without leaking information that shouldn't be accessible). PiperOrigin-RevId: 161230209
* Update the default values for the C++ and Java late-bound attributes to the ↵Gravatar janakr2017-07-10
| | | | | | correct //tools/cpp:toolchain and //tools/jdk:jdk. PiperOrigin-RevId: 161227981
* Add toolchain() rule for declaring toolchains with type and constraints.Gravatar John Cater2017-07-07
| | | | | | | Part of #2219. Change-Id: Ia0effac6e6c362c04c6501b21dde89e9e5b154a4 PiperOrigin-RevId: 161216492
* Clean up string representations for configured targetsGravatar vladmos2017-07-07
| | | | | | | | | If --incompatible_descriptive_string_representations is passed, configured targets are converted to strings using `str`, `repr` and `print` functions differently (more descriptive, without leaking information that shouldn't be accessible). PiperOrigin-RevId: 161212989
* Restrict writing build events to a white-listed set of commandsGravatar Klaus Aehlig2017-07-07
| | | | | | | | | It is not desirable to have a build-event stream for all invocations of blaze; so restrict the BuildEventServiceModule to be only active if the executed command is in a white list of commands for which having build events is desirable. Change-Id: Id4acf9468f67b1af7fc8ea703785df5229c69258 PiperOrigin-RevId: 161207563
* Clean up string representations for rule and aspect contextsGravatar vladmos2017-07-07
| | | | | | | | | If --incompatible_descriptive_string_representations is passed, rule and aspect contexts are converted to strings using `str`, `repr` and `print` functions differently (more descriptive, e.g. "<rule context for //pkg:rule>" instead of just "//pkg:rule"). PiperOrigin-RevId: 161205430
* Make sure to check the received digest on downloadGravatar ulfjack2017-07-07
| | | | | | | This helped me find a bug in a rewrite of the remote worker, which is independent of this change. PiperOrigin-RevId: 161204914
* Platform -> ApplePlatform, to avoid ambiguity with the newly introducedGravatar cpeyser2017-07-07
| | | | | | Platform rule. PiperOrigin-RevId: 161203491
* Remove all non-essential call sites of methods on Jvm.Gravatar lberki2017-07-07
| | | | | | | This is so that we can eventually route the information it now contains through JavaRuntimeProvider. RELNOTES: None. PiperOrigin-RevId: 161196809
* Clean up string representations for providersGravatar vladmos2017-07-07
| | | | | | | | | If --incompatible_descriptive_string_representations is passed, providers and their instances are converted to strings using `str`, `repr` and `print` functions differently (without leaking the provider's name which isn't supposed to be visible). PiperOrigin-RevId: 161196343
* Ignore unknown file types in profile zip filesGravatar Googler2017-07-07
| | | | | | | Allows profiles for both GCC and LLVM builds to co-exist in the same zip file. RELNOTES: none PiperOrigin-RevId: 161196188
* Do not NPE crash when C++ actions are not configured in crosstoolGravatar hlopko2017-07-07
| | | | | | | Show meaningful message instead. RELNOTES: None. PiperOrigin-RevId: 161196096
* Refactor RemoteSpawn{Strategy,Runner}Gravatar ulfjack2017-07-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Make the RemoteSpawnRunner match RemoteSpawnStrategy functionality, including local fallback, remote caching, and execution. This is done so we can actually finish the migration to the SpawnRunner API, for which I've had a pending change for several months now. - Never throw StatusRuntimeException from the GrpcRemoteCache or the GrpcExecutor. We almost never do, since the Retrier catches them implcitly, so a number of catch blocks were already unreachable. Carefully document the cases where we still need to handle it. - RemoteSpawnStrategy / RemoteSpawnRunner no longer catch gRPC-specific exceptions; they should be able to handle any reasonable remote caching / execution implementation (except we don't have a common interface for GrpcRemoteExecutor yet), with no dependency on gRPC as such. Note that the RemoteSpawnStrategy class will actually go away after the SpawnRunner migration (eventually). - However, ensure that we _are_ actually throwing CacheNotFoundException; the retrier implicitly catches that also, so we need to manually unwrap from RetryException. - Don't call into the EventHandler from RemoteSpawnStrategy; instead, throw an exception with the message, and let the higher levels handle the reporting (we only allow this for exception + local fallback, for which there's no good reporting API right now). PiperOrigin-RevId: 161195666
* Clean up string representations for attr and attr.*Gravatar vladmos2017-07-07
| | | | | | | | | This change is a part of global string representations cleanup using the --incompatible_descriptive_string_representations flag, however the change to attr and attr.* is not affected by the flag because string representations of these objects used to contain nondeterministic information (memory addresses). PiperOrigin-RevId: 161192934
* remote: Add a SingleSourceBuilder to the Chunker.Gravatar buchgr2017-07-07
| | | | | | | | Prepare the Chunker for an upcoming refactoring, where it will no longer support multiple input sources and digest filtering. RELNOTES: None. PiperOrigin-RevId: 161189759
* Avoid relying on System.out/err going to the terminalGravatar ulfjack2017-07-07
| | | | | | Use an appropriate EventHandler instead. PiperOrigin-RevId: 161189061
* Move CommandEnvironment creation and beforeCommand call after options parsingGravatar ulfjack2017-07-07
| | | | | | | | Instead, introduce a new commandInit method in the BlazeModule API. The primary semantic change here is that beforeCommand is no longer called if options parsing fails or if we're outside a workspace for commands that require one. PiperOrigin-RevId: 161188760
* Cache flaky tests (remove the cachable flag from test result data)Gravatar ulfjack2017-07-07
| | | | | | | | | | | | | | | | | | | The cachable flag was only set to false for flaky tests. Before this CL, we did not cache flaky tests on subsequent runs, instead rerunning them, even though this is both very expensive and inconsistent with our normal handling, which is to cache passes but not errors. If cache_test_results is enabled, we now also cached timed out test results. If cache_test_results=auto (the default), we now also cache flaky tests. We still do not cache failed tests; the TestRunnerAction checks if the previous test result was marked as passed (which also applies to flaky tests, but not to failed or timed-out tests). Also add some unit tests. PiperOrigin-RevId: 161187950
* Improve error message when calling a builtin function with wrong typeGravatar laurentlb2017-07-07
| | | | | | | Error message is simpler and doesn't show the type of all arguments. RELNOTES: None. PiperOrigin-RevId: 161187134
* remote: Make RetryException aware of gRPC's StatusException.Gravatar buchgr2017-07-07
| | | | | RELNOTES: None. PiperOrigin-RevId: 161179228
* Plumb some information about the location of the JVM through ↵Gravatar lberki2017-07-07
| | | | | | | | | | | | | | | JavaRuntimeProvider instead of Jvm if a java_runtime rule is used. There are a few things standing in the way of removing package loading from JvmConfigurationLoader: - The JAVABASE/JAVA Make variables, which are a function of the contents of the package with the JVM. The plan is to make JavaRuntime a MakeVariableProvider and add an attribute to rules that do Make variable evaluation to tell which Make variables they need - The path to the Java binary is exported to Skylark through the configuration fragment. We'll need to export an attribute to Skylark that can be used to depend on the JVM, then do the three-step dance to use that instead of the configuration and figure out what to do if --javabase is not a label. - Jvm#getJavaExecutable() has a bunch of call sites. They need to be adjusted individually. RELNOTES: None. PiperOrigin-RevId: 161176462
* Replace Transitions.configurationHook with equivalent rule class transitions.Gravatar gregce2017-07-07
| | | | | | | This removes the last dynamic dependency on the static configuration transition table. PiperOrigin-RevId: 161162272
* Automated rollback of commit 9000e61fc1737444392ffe251727e8331fab3cf2.Gravatar Googler2017-07-07
| | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Fixed handling of pch, so this should work again *** Original change description *** Automated rollback of commit 29ec1b89989db411d2038e2df8657b6435f80403. *** Reason for rollback *** Breaks the classroom_ios TAP project [1] in the presence of --experimental_objc_crosstool=all, which was added to the global .blazerc last week. [1] [] *** Original change description *** Change ProtobufSupport to use CrosstoolCompilationSupport if experimental_objc_crosstool=all PiperOrigin-RevId: 161159846
* Switch from using set/getPchFile on CompilationArtifacts to a doNotUsePch ↵Gravatar Googler2017-07-07
| | | | | | option on CompilationSupport. In the process correctly respect whether to use the pch file under crosstool compilation mode. PiperOrigin-RevId: 161156717
* Remove FragmentOptions' addAllLabels and getAllLabels and friends.Gravatar mstaib2017-07-07
| | | | | | | | These are now dead code - configuration dependencies are loaded by Skyframe and do not need to be listed ahead of time - and were only ever used in tests. PiperOrigin-RevId: 161146721
* Factor out BuildConfigurationCollection.Transitions.getDynamicTransition.Gravatar gregce2017-07-07
| | | | | | | | | | | | This is a legacy dependency on the configuration transition table, which is only needed for static configurations. Dynamic configurations didn't actually use anything in that table: this was just a convenience interface that could have equally been defined somewhere else. So this cl defines it somewhere else. There's still one last dependency: Transitions.configurationHook. We'll tackle that in a followup cl. PiperOrigin-RevId: 161141650
* Exclude //external targets from //...Gravatar kchodorow2017-07-07
| | | | | | | | | | Fixes #3307 and #1606. The problem was that TargetPatternResolver was trying to figure out if repositories were tagged as "manual," but repository rules don't have a "tags" field. Repository rules shouldn't be included by //... generally. TargetPatternResolver was just ls-ing // to find all the "packages," so this removes external/ from consideration. PiperOrigin-RevId: 161134437
* Clean up string representations for select valuesGravatar vladmos2017-07-07
| | | | | | | | If --incompatible_descriptive_string_representations is passed, select values are converted to strings using `str`, `repr` and `print` functions differently: "select(...)" instead of "selector(...)". PiperOrigin-RevId: 161129809
* Clean up string representations for aspectsGravatar vladmos2017-07-07
| | | | | | | | If --incompatible_descriptive_string_representations is passed, aspects are converted to strings using `str`, `repr` and `print` functions differently (more descriptive, without leaking information that shouldn't be accessible). PiperOrigin-RevId: 161116840
* Make build_event_stream_test more robustGravatar aehlig2017-07-07
| | | | | | | | | | | | | ...by makeing it independent of the test executor; in particular, do not rely on the wrapper to create the test.xml files if the test fails to do so, and do not assume a particular name (e.g., remote execution might decide to call the files "remote_1.xml"). Also, make the constructor of VisibilityErrorEvent public, to allow extensions of bazel to generate visibility errors as well. RELNOTES: None PiperOrigin-RevId: 161087809
* Clean up string representations for functionsGravatar vladmos2017-07-07
| | | | | | | | | If --incompatible_descriptive_string_representations is passed, functions and rule classes are converted to strings using `str`, `repr` and `print` functions differently (more descriptive, without leaking information that shouldn't be accessible). PiperOrigin-RevId: 161087777
* Remove JavaIdeInfoProvider.Gravatar dslomov2017-07-07
| | | | | RELNOTES: None. PiperOrigin-RevId: 161086496