aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib
Commit message (Collapse)AuthorAge
* Use RequiredProviders to validate rule prerequisites in RuleContext.Gravatar dslomov2017-07-31
| | | | | | | We now use a unified way to check provider requirements everywhere. RELNOTES: None. PiperOrigin-RevId: 163710961
* Fix 'whitelisting' src group.Gravatar dslomov2017-07-31
| | | | | RELNOTES: None. PiperOrigin-RevId: 163703995
* Include annotation processor names in JavaCompileAction progress messagesGravatar cushon2017-07-31
| | | | PiperOrigin-RevId: 163701792
* Windows: Android BusyBox can access the JNI libGravatar Laszlo Csomor2017-07-31
| | | | | | | | | | | | | | | Add a data-dependency on the windows_jni.dll from the BusyBox in BUILD.tools, so the BusyBox in @build_tools// can actually find it at runtime. Also update the script that builds the .dll so that it works if the source files have an "external/bazel_tools/" prefix. Related to https://github.com/bazelbuild/bazel/issues/3264 Change-Id: I005e9d2c00253a59d2cd5cc9f3a93528dc4d2e9e PiperOrigin-RevId: 163691320
* Java launcher: export runfiles-related envvarsGravatar Laszlo Csomor2017-07-31
| | | | | | | | | | | | | Otherwise these envvars are not available to the Java program and it can't load its runfiles. I tested that this is necessary both on Linux and Windows. Related to https://github.com/bazelbuild/bazel/issues/3264 Change-Id: I2bd8eee0793b26aeedeafc6900f7854c816b5b14 PiperOrigin-RevId: 163688341
* Rename 'executable' argument of 'ctx.actions.expand_template' to ↵Gravatar laurentlb2017-07-31
| | | | | | | | | 'is_executable'. This is for consistency with 'ctx.actions.write'. RELNOTES: None. PiperOrigin-RevId: 163687973
* Add preprocessor_defines feature for MSVC CROSSTOOLGravatar pcloudy2017-07-31
| | | | | | | | Fix https://github.com/bazelbuild/bazel/issues/3474 Fix https://github.com/bazelbuild/bazel/issues/3472 RELNOTES: None PiperOrigin-RevId: 163677371
* Expose to Skylark Strings instead of PathFragments from CppConfiguration.Gravatar dslomov2017-07-31
| | | | | | | | | | The only way to use those was in the `ctx.action(...executable...)` parameter, made that accept string. Fixes #2931. RELNOTES: None. PiperOrigin-RevId: 163511248
* Framework dependency subtraction uses runfiles path instead of full artifact ↵Gravatar cparsons2017-07-31
| | | | | | | path RELNOTES: None. PiperOrigin-RevId: 163484010
* Slight refactor of helper methods in TestStrategy.Gravatar nharmata2017-07-31
| | | | | RELNOTES: None PiperOrigin-RevId: 163471182
* Remove the type data from ToolchainInfo, it is reduntant with ↵Gravatar John Cater2017-07-31
| | | | | | | | | DeclaredToolchainInfo. Fixes #3458. Change-Id: I24dd6d9d24432b9aaf0229de658f07e465ad63cb PiperOrigin-RevId: 163466882
* Use dynamically configured resource filteringGravatar Googler2017-07-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Actually hook up the resource filtering configuration transitions to AndroidConfiguration's topLevelConfigurationHook. Dynamic configuration is inefficient when multiple configurations are used. Multiple configurations result in splitting the build graph and duplicating work. To avoid using multiple configurations as much as possible, dynamically configured resource filtering will only be applied for top-level android_binary targets. When android_binary targets are included as dependencies, it's very likely that multiple binaries with many shared dependencies but different configurations would be used. Only applying dynamic filtering to top-level binaries removes this concern. It is still possible to build multiple top-level binary targets with different configurations at once. Previous versions of this code considered not using dynamic configuration in that case as well, but that raised some unanswered questions about whether Bazel's invariants should allow modifying one target's configuration based solely on targets that happen to be building in parallel. As a result, that optimization is not included for now; we assume that developers manually building multiple similar binaries at once is relatively rare (plus, dynamically configured resource filtering in general is not turned on by default and will not be turned on by default until we're confident the benefits outweigh the costs). RELNOTES: none PiperOrigin-RevId: 163464415
* Only report progress after a build has started.Gravatar Benjamin Peterson2017-07-31
| | | | | | | | | | | | Rather than assuming that all events are part of a build until NoBuildEvent or BuildCompleteEvent are posted, only start reporting build progress after a BuildStartingEvent or a NoBuildEvent with showProgress() true happens. This fixes https://github.com/bazelbuild/bazel/issues/3449. Change-Id: I78372a2286a4595cf3301c998be2c9036ad0f4b7 PiperOrigin-RevId: 163447622
* Apply native binary launcher to sh_binaryGravatar Yun Peng2017-07-31
| | | | | | | | | | | | This change: 1. Added launcher to @bazel_tools If the host platform is Windows, we use a prebuilt launcher.exe , otherwise the launcher needs to be built with MSVC first. 2. Launching sh_binary using native launcher. Change-Id: I5a63135455057fbfe04ff0cce7ec7994ef0c347a PiperOrigin-RevId: 163442540
* Remove dead codeGravatar dslomov2017-07-28
| | | | | RELNOTES: None. PiperOrigin-RevId: 163436254
* Correctly include proto runtimes from transitive proto_library's, and their ↵Gravatar carmi2017-07-28
| | | | | | | | | | | transitive dependencies, in the list of transitive jars that a java_xxx_proto_library rule exposes. This fixes b/63723368, in a way that no action is required. The new behavior is guarded by a flag. RELNOTES: None PiperOrigin-RevId: 163421788
* Assert that declared providers are not TransitiveInfoProviders.Gravatar dslomov2017-07-28
| | | | | | | Also fix the remaining violations. RELNOTES: None. PiperOrigin-RevId: 163391215
* Fix confusing semantics for Attribute.Builder.allowedRuleClasses.Gravatar gregce2017-07-28
| | | | | | | | | | 1) Update the javadocs. 2) Clarify that allowedRuleClases and allowedRuleClassesWithWarning must be disjoint sets. 3) Enforce 2). 4) Fix error messaging when only "with warnings" is set. PiperOrigin-RevId: 163379567
* Remove MetadataHandler.isRegularFileGravatar ulfjack2017-07-28
| | | | | | | Instead use MetadataHandler.getMetadata().isFile(), which is basically what isRegularFile did before. PiperOrigin-RevId: 163351014
* Make all WithLegacySkylarkName providers declared providers.Gravatar dslomov2017-07-28
| | | | | RELNOTES: None. PiperOrigin-RevId: 163343931
* Copy build_python_zip and enable_runfiles flags to the host config.Gravatar philwo2017-07-28
| | | | | | Fixes a bug where the flags would be ignored during Bazel's compile.sh bootstrap. PiperOrigin-RevId: 163341779
* Remove unused module-related optionsGravatar hlopko2017-07-28
| | | | | RELNOTES: None. PiperOrigin-RevId: 163338873
* remote: Delete output files created by failed download.Gravatar Jakob Buchgraber2017-07-27
| | | | | | | | | | If a remote download fails, delete any output files that might have already been created. Else, this might intefere with a subsequent locally executed actions that expects none of its output files to exist. See #3452. Change-Id: I467a97d05606c586aa257326213940a37dad9dd5 PiperOrigin-RevId: 163336093
* Remove unused send_transitive_header_module_srcs optionGravatar hlopko2017-07-27
| | | | | RELNOTES: None. PiperOrigin-RevId: 163331254
* Add .ipp extension as a C++ header typeGravatar hlopko2017-07-27
| | | | | | | | | | | | From one of the boost gurus: If you want to split up your template sources into interface and implementation (there are lots of good reasons to do that, including controlling instantiation), you can't very well use the same name (foo.hpp) twice, and foo.cpp wouldn't be appropriate for either one. foo.ipp clearly delineates the file as an implementation file intended to be #included in foo.hpp. RELNOTES: None. PiperOrigin-RevId: 163329612
* Exclude test/java/ in instrumentation_filter defaultGravatar Googler2017-07-27
| | | | | | | | The computed default used in bazel coverage excludes both javatests/ and test/java. Having the stated default exclude only one of those is needlessly confusing. (Even though in practice that static default will rarely be used.) Also updates the comment about the computed default, since that logic has moved. PiperOrigin-RevId: 163325837
* BEP ActionExecuted: fix typoGravatar Klaus Aehlig2017-07-27
| | | | | | | The value of stderr should go to the stderr field, not the stdout field. Change-Id: Ic5341220b2e4207aa42570d3683c66131dac38cc PiperOrigin-RevId: 163324715
* Fix a crash when Skylark rule re-exports SkylarkApiProvider.Gravatar dslomov2017-07-27
| | | | | | | | Also PintoSourcesContextProvider should not be a SkylarkApiProvider: it is not facade for anything but a provider in its own right. RELNOTES: None. PiperOrigin-RevId: 163323130
* remote: Don't upload failed action to cache. Fixes #3452Gravatar Jakob Buchgraber2017-07-27
| | | | | | | Also, restructure the code for better read- and testability. Change-Id: Ibdd0413f89e4687b836b768a9e7d6315234cb825 PiperOrigin-RevId: 163322658
* Fixing #3380: output stack traces and informative messages.Gravatar olaola2017-07-27
| | | | | | | | Also added tests specifically for the output, to ensure we don't break it again. TESTED=remote worker, unit tests RELNOTES: fixes #3380 PiperOrigin-RevId: 163283558
* Define an outgoing rule transition interface.Gravatar gregce2017-07-27
| | | | | | | | | | This lets a parent choose a transition for its dep based on the dep's rule class. Implement (experimental) dynamic Android resource filtering trimming with this. PiperOrigin-RevId: 163259052
* Resource filtering should preserve all matching artifacts, despite shared namesGravatar Googler2017-07-27
| | | | | | | | | | | | | | | | | | Before this change, density-based resource filtering tracked resources by qualifiers and name. Resources with density qualifiers specified would go into this code, but only one resource would be chosen from each each (qualifier, name) pair. Instead, track the resource using its entire path, this tracking resources with the same name seperately. Also, in case multiple resource are passed to the resource processing action, resource filtering only ignores a file if its name was in the list of resources to ignore *and* it does not exist. Otherwise, legitimate resources with the same name as a filtered resource might be ignored. RELNOTES: none PiperOrigin-RevId: 163235681
* Add configuration and target label to ActionCompletedId.Gravatar Eduardo Colaco2017-07-27
| | | | | | | | This is a first step on moving the configuration checksum and target label from the ActionExecuted payload and into ActionCompletedId. Change-Id: I989c9b708cd2a4172f6483d97bc7842d9841e3a8 PiperOrigin-RevId: 163233097
* Fix bug where we incorrectly skip over subdirectories named 'external'. ↵Gravatar mschaller2017-07-27
| | | | | | We're actually just trying to skip over packages named '//external'. PiperOrigin-RevId: 163230119
* Do not log stacktraces for interrupted ParallelVisitor workers, expected ↵Gravatar mschaller2017-07-27
| | | | | | | | | | | | | | query errors When a Query evaluation is interrupted, we expect ParallelVisitor worker threads to be interrupted. The RuntimeInterruptedException thrown by ParallelVisitor.Task#run does not represent an error. Likewise, QueryExceptions do not represent bugs and shouldn't be logged by ParallelVisitor either. RELNOTES: None. PiperOrigin-RevId: 163219663
* Automated rollback of commit 9e3018109b189a345cd9b353729c7f31ac209bc9.Gravatar allevato2017-07-27
| | | | | | | | *** Reason for rollback *** Broke bundling of objc_frameworks. PiperOrigin-RevId: 163215950
* Package whitelisting: New implementation for feature whitelistingGravatar plf2017-07-26
| | | | | | | | This builds on top of mstaib's idea to use package groups to whitelist projects which can use certain features in the analysis phase. Instead of using configurations and a flag, this way of implementing whitelists requires using two helper methods, one that adds an implicit attribute to every rule that has functionality that must be whitelisted and a different method to check whether a given package is whitelisted to use that feature. RELNOTES:none PiperOrigin-RevId: 163200890
* Add --toolchain_resolution_debug option to give more information aboutGravatar John Cater2017-07-26
| | | | | | | | | toolchain selection. Fixes #3431. Change-Id: Ia38415575b6a121cbb6a028bfc0276691cd11b6d PiperOrigin-RevId: 163196646
* BEP: add events about fetches to the streamGravatar Klaus Aehlig2017-07-26
| | | | | | | | | Fetching is an important action, if it happens, as external resources are accessed. Therefore, report this activity in the build event stream. Change-Id: Ia443fe01e6478016993231377d8f65c5d4634e00 PiperOrigin-RevId: 163184329
* Pass "profile_path" flag to protoc if necessary.Gravatar Googler2017-07-26
| | | | | | | | This change adds a way to set proto profile artifact to ProtoCompileActionBuilder so that it passes profile_path flag to protocol_compiler. RELNOTES: None. PiperOrigin-RevId: 163155532
* Remove --experimental_dynamic_configs=notrim_partial.Gravatar gregce2017-07-26
| | | | | | Part of the static configuration removal cleanup. PiperOrigin-RevId: 163130922
* Add the android.jar to the validate and link step for aapt2.Gravatar corysmith2017-07-26
| | | | | RELNOTES: None. PiperOrigin-RevId: 163126457
* Rollforward of "AppleBinary and AppleStaticLibrary no longer propagate ↵Gravatar cparsons2017-07-26
| | | | | | | unwrapped ObjcProvider." after skylark rule fixes. RELNOTES: None. PiperOrigin-RevId: 163121697
* macOS link actions set the correct system framework include pathsGravatar cparsons2017-07-26
| | | | | RELNOTES: None. PiperOrigin-RevId: 163114020
* SkyframeActionExecutor.checkOutputs: clarify commentGravatar ulfjack2017-07-26
| | | | | | | The getMetadata call implicitly adds files to the metadata handler if they weren't known before, which may include statting the file. PiperOrigin-RevId: 163106987
* Refactor augmented assignment and lvaluesGravatar brandjon2017-07-26
| | | | | | | Also fix minor bug where a[b] += c would evaluate b twice. RELNOTES: None PiperOrigin-RevId: 163103618
* Automated rollback of commit 4dfb271df9dcdf01413a216ad046d955669160b7.Gravatar schmitt2017-07-26
| | | | | | | | | | | | | | | *** Reason for rollback *** Breaks targets in the depot. http://b/64022432 *** Original change description *** Expose to Skylark Strings instead of PathFragments from CppConfiguration. Fixes #2931. RELNOTES: None. PiperOrigin-RevId: 163100552
* Inherit allowable resource directories from android_ide_commonGravatar Googler2017-07-26
| | | | | | | | | Currently, allowable resource directories are defined in two places: LocalResourceContainer, and android_ide_common (used, for example, by ResourceFilter). Instead, keep them defined only in android_ide_common, a more authoritative source that we already rely on anyway. RELNOTES: none PiperOrigin-RevId: 163100497
* BEP: Report AbortedEvent with SKIPPED status for targets with incompatible ↵Gravatar Googler2017-07-26
| | | | | | CPU constraints. PiperOrigin-RevId: 163100038
* Add "apple_" prefix to Skylark platform(_type) modules.Gravatar allevato2017-07-26
| | | | | | | | Documentation was not being generated for the Apple "platform" module because it collided with a configuration fragment of the same name. This should be a harmless change because the underlying module name should not be used by anyone; the name isn't exported as a top-level type and would only be seen in debug output and in the string returned by the type() function. PiperOrigin-RevId: 163079704