aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/bazel
Commit message (Collapse)AuthorAge
* Set the default strategy of DexBuilder to use persistent workers.Gravatar jingwen2018-08-13
| | | | | | | | | This brings 1.2x speedup to clean local Android builds. Fixes https://github.com/bazelbuild/bazel/issues/5771 RELNOTES: For Android incremental dexing actions, Bazel now persists its DexBuilder process across individual actions. From our benchmarks, this results in a 1.2x speedup for clean local builds. PiperOrigin-RevId: 208546936
* Disable legacy linking Skylark api to C++ toolchainGravatar hlopko2018-08-08
| | | | | RELNOTES: None. PiperOrigin-RevId: 207845945
* Clean up Java toolchain configurationGravatar cushon2018-08-07
| | | | | | now that JDK 8 host_javabases are no longer supported. PiperOrigin-RevId: 207687089
* Fix deprecation note of native http/git rulesGravatar Yannic Bonenberger2018-08-06
| | | | | | Closes #5702. PiperOrigin-RevId: 207560697
* C++: Removes calls to setCcLinkparamsStore of CcLinkingInfo.BuilderGravatar plf2018-08-06
| | | | | | | | This is in preparation for deleting CcLinkParamsStore. Not all calls to setCcLinkparamsStore have been removed in this CL. RELNOTES:none PiperOrigin-RevId: 207516944
* Remove the functionality to do ahead-of-time #include extraction as a separateGravatar Googler2018-08-06
| | | | | | | action. RELNOTES: None. PiperOrigin-RevId: 207516074
* Add --experimental_shortened_obj_file_path to GraveyardOptionsGravatar hlopko2018-08-03
| | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/5677 RELNOTES: None. PiperOrigin-RevId: 207258428
* Update the documentation of the "resources" tag on Java rules.Gravatar lberki2018-08-03
| | | | | | | | | | Add a missing closing parenthesis and clarify resource path resolution a little. Fixes #1689. RELNOTES: None. PiperOrigin-RevId: 207242394
* C++: Change Skylark API whitelisting to be part of flag.Gravatar plf2018-08-03
| | | | | | | | This uses SkylarkSemantics now instead of the C++ configuration. The flag is: --experimental_cc_skylark_api_enabled_packages RELNOTES:none PiperOrigin-RevId: 207235431
* Change the list of rc files accepted.Gravatar ccalvarin2018-08-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The old list was, in order: - %workspace%/tools/bazel.rc (unless --nomaster_bazelrc) - %binary_dir%/bazel.bazelrc (unless --nomaster_bazelrc) - system rc, /etc/bazel.bazelrc or in %ProgramData% for Windows (unless --nomaster_bazelrc) - the first of the following gets called the "user" bazelrc - path passed by flag --bazelrc - %workspace%/.bazelrc - $HOME/.bazelrc The new list is hopefully a bit more consistent, as: - system rc (unless --nosystem_rc) - workspace, %workspace%/.bazelrc (unless --noworkspace_rc) - user, $HOME/.bazelrc (unless --nohome_rc) - command-line provided, passed as --bazelrc or nothing if the flag is absent. This list removes two less than useful locations, duplication in the Workspace directory, and the rc next to the bazel binary. This location made sense at Google but is generally nonsensical elsewhere so we are removing it. It also stops the user local rc file from being overriden by passing in a custom file in --bazelrc. In both old and new, --ignore_all_rc_files disables all of the above. For a transition period, any file that you would have loaded but was not read will cause a WARNING to be printed. If you want the old file to still be read without moving its location, you can always import it into one of the new standard locations, or create a symlink. Closes #4502, except for cleanup to remove the warning after a transition period of 1 Bazel version has passed. RELNOTES[INC]: New bazelrc file list. PiperOrigin-RevId: 207189212
* Add JavaSourceInfoProvider to JavaInfo.Gravatar elenairina2018-07-31
| | | | | | | | | JavaSourceInfoProvider is returned through JavaInfo instead of ConfiguredTarget for all Java rules. Only android_library and android_binary return it directly through ConfiguredTarget, since they don't return a JavaInfo provider. RELNOTES: None. PiperOrigin-RevId: 206746172
* Internal changeGravatar ruperts2018-07-30
| | | | PiperOrigin-RevId: 206642715
* Repository Options: fix meta dataGravatar Klaus Aehlig2018-07-27
| | | | | | | | | | The "distdir" option is no longer experimental and therefore should not be marked as such. Also, the "experimental_repository_hash_file" and "experimental_verify_repository_rules" are not really about loggig; but they actually are still experimental. Change-Id: I5c30c7c0871822c077a713819ae47b250a7d8a71 PiperOrigin-RevId: 206326885
* C++: Removes calls to setCcLinkparamsStore of CcLinkingInfo.BuilderGravatar plf2018-07-26
| | | | | | | | | | This is in preparation for deleting CcLinkParamsStore. Not all calls to setCcLinkparamsStore have been removed in this CL. Roll forward with bzl change in separate CL (unknown commit) and giving a proper error in Skylark instead of a crash when CcLinkingInfo is not built correctly. RELNOTES:none PiperOrigin-RevId: 206122870
* Add support for data dependencies to java_plugin and java_package_configurationGravatar cushon2018-07-25
| | | | | | | | | This allows loading data inputs to annotation processors and Error Prone plugins. Previously the only supported way to do this was using Java resources, but in the case of per-package configuration that ties any changes to the resources to JavaBuilder's release process. PiperOrigin-RevId: 206106802
* Automated rollback of commit 16dde0de06a3a4157a13e7e7264afeb6a50b2dde.Gravatar janakr2018-07-25
| | | | | | | | *** Reason for rollback *** Crash (see linked bug). PiperOrigin-RevId: 206060905
* Support optional repository verificationGravatar Klaus Aehlig2018-07-25
| | | | | | | | | | | | | | | | Add an option to provide a file with a resolved value, that will be used to verify that the repositories mentioned in this file produce a correct directory tree. RELNOTES: newly added options --experimental_repository_hash_file and --experimental_verify_repository_rules allow to verify for repositories the directory generated against pre-recorded hashes. See documentation for those options. Work towards #5660. Change-Id: I2d8becb188d0fa51e890fb8f6139f321cca14b7b PiperOrigin-RevId: 206016792
* C++: Removes calls to setCcLinkparamsStore of CcLinkingInfo.BuilderGravatar plf2018-07-25
| | | | | | | | This is in preparation for deleting CcLinkParamsStore. Not all calls to setCcLinkparamsStore have been removed in this CL. RELNOTES:none PiperOrigin-RevId: 205998687
* update to embedded jdk to jdk10Gravatar buchgr2018-07-24
| | | | | RELNOTES: The JDK shipped with Bazel was updated to JDK10. PiperOrigin-RevId: 205865966
* Collect code coverage for binaries invoked via sh_test.Gravatar Irina Iancu2018-07-23
| | | | | | | | | Fixes #5331. Change-Id: Idb01a3f206ed37992f200f7e0e51ed9831262613 RELNOTES: Code coverage is collected for Java binaries invoked from sh_test. PiperOrigin-RevId: 205654442
* Suppress RepositoryCache IOException on downloadGravatar George Gensure2018-07-23
| | | | | | | | | | | | | | With invalid contents in the repository cache, silence the IOException on RepositoryCache::get and re-download an artifact when attempting to short-circuit that operation. The repository cache can easily get into this state when a build is interrupted while downloading into the non- atomic repository cache destination. Possible solution to #5390 Closes #5392. PiperOrigin-RevId: 205634761
* resolved file: include the hash of the output treeGravatar Klaus Aehlig2018-07-23
| | | | | | | | | | | | | | When reporting about the repository rules that were called, also report a hash of the tree the rule generated. This allows, at least after the fact, to verify that a repository rule actually produced the correct code. Note that equality of the output hash is not a guarantee for reproducible builds, as certain properties of the output tree, in particular owner, are ignored. Still it is a good check to detect wrong use of a repository rule. Change-Id: Ic56509f8e0d0b4be9ce3335ade280f983fe77e6d PiperOrigin-RevId: 205631855
* C++: Implements Skylark cc_common.compile()/link().Gravatar plf2018-07-19
| | | | | | | Working towards #4570. RELNOTES:none PiperOrigin-RevId: 205274676
* Remove make variable providers from ToolchainType.Gravatar jcater2018-07-19
| | | | PiperOrigin-RevId: 205236169
* Add deprecation note to native http/git rulesGravatar Klaus Aehlig2018-07-19
| | | | | | | ...mentioning that a drop-in replacement can be loaded from @bazel_tools. Change-Id: I0197d65359664e6fed84dc1fe5d5b6ddad48520e PiperOrigin-RevId: 205204800
* RepositoryCache: support hard linkningGravatar Klaus Aehlig2018-07-18
| | | | | | | | | Instead of copying files found in a cache hit, support adding a hard link. This should save disk space if the same files from cache are used in many workspaces. Fixes #5568. Change-Id: Ie8192f9669d8420283e18e0813f3160a515ba8fe PiperOrigin-RevId: 205034815
* Android NDK r17 supportGravatar Jingwen Chen2018-07-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | [Full NDK changelog](https://github.com/android-ndk/ndk/wiki/Changelog-r17) Changes related to Bazel's NDK toolchain/CROSSTOOL generation: - Removed support for targeting mips, mips64, armeabi. - Bumped bundled clang version to 6.0.2. - The default STL is now libc++. If Bazel detects that r17 is being used, it aliases `@androidndk//:default_toolchain` to `@androidndk//:toolchain-libcpp`, instead of `@androidndk//:toolchain-gnu-libstdcpp`. - Removed tests that build against armeabi, mips, mips64. - Stop passing `-fno-integrated-as` into the compiler by default. TODO: - [x] Java tests - [x] ~Support for wrap.sh to use with ASANs~ Implementing in follow up PR. - [ ] Fix or disable remote caching with android_ndk_integration_test https://github.com/bazelbuild/bazel/issues/4663 Fixes https://github.com/bazelbuild/bazel/issues/4742 RELNOTES: Added support for Android NDK r17. The default STL is now `libc++`, and support for targeting `mips`, `mips64` and `ARMv5` (`armeabi`) has been removed. Closes #5371. Change-Id: Id1ded004c3a80ea62f307746dc3ad6f633f2df2e PiperOrigin-RevId: 205013758
* NDK cpusupport: link against dlGravatar Gregor Jasny2018-07-17
| | | | | | | | | | The cpusupport code uses functions like dlopen, dlclose that require linking with libdl. Adding that library to the linkopts makes cpusupport self-contained. Closes #5559. PiperOrigin-RevId: 204948982
* External repositories: disallow use of unexported repository rulesGravatar Klaus Aehlig2018-07-17
| | | | | | | | | | | Treat repository rules the same way as build rules: they may only be used, if exported by a Skylark file. It has never been intended to create external repositories by anonymous rules, and, in fact, for properly recording resolved information, it is necessary that all repository rules used can be referred to by an accessible name. Change-Id: Ib9259d58be66b033721a6f591656c45889f49931 PiperOrigin-RevId: 204872735
* Second cl for verbose workspaces (ability to log certain potentially ↵Gravatar Googler2018-07-16
| | | | | | | | | | | | | | non-hermetic events that happen as part of repository rules). Defining representation for Execute events for workspace logging. In the future: - Add more events - Allowing to specify log file rather than dumping to INFO - Log levels, full or alerts only RELNOTES: None PiperOrigin-RevId: 204748436
* Set the version of a computed node to the max of its child versions rather ↵Gravatar janakr2018-07-11
| | | | | | | | | | | | | | | | | than the graph version when that is feasible. * It's not feasible when the computation accesses outside state, i.e. is non-hermetic, so see below. * It's also more complicated (and not worth the trouble) when the computation is taking place just for the error status. Have SkyFunctionName declare whether the function it corresponds to is hermetic or non-hermetic. Only non-hermetically-generated SkyValues can be directly marked changed, and non-hermetic SkyFunctions have their values saved at the graph version, not the max of the child versions. All SkyFunctions are hermetic except for the ones that can be explicitly dirtied. A marked-hermetic SkyFunction that has a transient error due to filesystem access can be re-evaluated and get the correct version: if it throws an IOException at version 1 and then, when re-evaluated at version 2 with unchanged dependencies, has a value, the version will be version 1. All Skyframe unit tests that were doing non-hermetic things to nodes need to declare that those nodes are non-hermetic. I tried to make the minimal set of changes there, so that we had good incidental coverage of hermetic+non-hermetic nodes. Also did some drive-by clean-ups around that code. Artifacts are a weird case, since they're doing untracked filesystem access (for source directories). Using max(child versions) for them gives rise to the following correctness bug: 1. do a build at v1 that creates a FileStateValue for dir/ at v1. Then at v2, add a file to dir/ and do a build that consumes dir/ as a source artifact. Now the artifact for dir/ will (incorrectly) have v1. Then at v1, do that build again. We'll consume the "artifact from the future". However, this can only have an effect when using the local action cache, since the incorrect value of the artifact (the mtime) is only consumed by the action cache. Bazel is already broken in this way (incremental builds don't invalidate directories), so this change doesn't make things worse. PiperOrigin-RevId: 204210719
* Documentation for Android NDK support with BazelGravatar jingwen2018-07-11
| | | | | | | Example workspace: https://github.com/bazelbuild/examples/pull/66/files RELNOTES: None. PiperOrigin-RevId: 204162234
* Bazel server, tools: ensure Writers are closedGravatar laszlocsomor2018-07-10
| | | | | | | | | | | | | | | | | | | | Follow-up to commit 09d20311d982606093ed881d779bb05a5ee70ed3. Use try-with-resources to ensure Writer objects are closed eagerly. Eagerly closing Writers avoids hanging on to file handles until the garbage collector finalizes the object, meaning Bazel on Windows (and other processes) can delete or mutate these files. Hopefully this avoids intermittent file deletion errors that sometimes occur on Windows. See https://github.com/bazelbuild/bazel/issues/5512 RELNOTES: none PiperOrigin-RevId: 203934471
* Make skylark repository functions exportableGravatar Klaus Aehlig2018-07-06
| | | | | | | | | | In this way, their name is one they can actually be referred to by. This is necessary, as Skylark repository rules end up in the resolved file when freezing the versions of external dependencies---and the call to the repository function might be indirect. Change-Id: Ie1b5a28fac4f690c424de848b42d0c4a217d494d PiperOrigin-RevId: 203466286
* Create Bazel coverage report action.Gravatar elenairina2018-07-06
| | | | | | | Fixes #5246 RELNOTES: None. PiperOrigin-RevId: 203453340
* Replace instances of Blaze with Bazel.Gravatar Dan Fabulich2018-07-05
| | | | | | | PiperOrigin-RevId: 203300374 Change-Id: Iaa47f870ab2e0cad40a202aad2c7f9430f73c856 PiperOrigin-RevId: 203407392
* Remove support for java_runtime_suiteGravatar cushon2018-07-05
| | | | | RELNOTES: Remove support for java_runtime_suite; use alias() together with select() instead. PiperOrigin-RevId: 203393253
* bazel sync: better report errorsGravatar Klaus Aehlig2018-07-05
| | | | | | | | | | So far, bazel sync would only report error that happened during the actual fetch operation. However, errors can also happen earlier, e.g., when loading or parsing the WORKSPACE file. Report these errors as well. Change-Id: Ifa4961b0101f338d7618c52eb607951acba7ccdf PiperOrigin-RevId: 203359188
* PiperOrigin-RevId: 203352511Gravatar twerth2018-07-05
|
* Fix java_binary.jvm_flags BE link to $(location) expansionGravatar cushon2018-07-05
| | | | | | Fixes #5469 PiperOrigin-RevId: 203343005
* Bazel server: ensure InputStreams are closedGravatar laszlocsomor2018-07-05
| | | | | | | | | | | | | | | | | | | Use try-with-resources to ensure InputStreams that we open via FileSystem.InputStream(path) are closed. Eagerly closing InputStreams avoids hanging on to file handles until the garbage collector finalizes the InputStream, meaning Bazel on Windows (and other processes) can delete or mutate these files. Hopefully this avoids intermittent file deletion errors that sometimes occur on Windows. See https://github.com/bazelbuild/bazel/issues/5512 RELNOTES: none PiperOrigin-RevId: 203338148
* Create a whitelist for android_library rules with deps but not srcsGravatar cushon2018-07-03
| | | | PiperOrigin-RevId: 203230801
* First cl for verbose workspaces (ability to log certain potentially ↵Gravatar Googler2018-07-03
| | | | | | | | | | | | | | | | | non-hermetic events that happen as part of repository rules). In the interest of smaller cls, adding plumbing first with the rest to follow. Creates and posts a new EventBus message for workspace rule events (only execution for now); conditional on a flag, registers a listener to output those events. In the future: - Better structure for the events: will create a proto with appropriate messages and more information per event - Add more events - Allowing to specify log file rather than dumping to INFO - Log levels, full or alerts only RELNOTES: None PiperOrigin-RevId: 203132761
* C++: Exposes C++ Skylark providers to BazelGravatar plf2018-07-02
| | | | | RELNOTES:none PiperOrigin-RevId: 202943806
* Refactor TemplateExpansionAction so that various strategies can be used to ↵Gravatar kush2018-06-29
| | | | | | | | | implement it. Also clarify the behavior of the expand_template API in the presence of multiple-substitutions. RELNOTES: None PiperOrigin-RevId: 202719656
* Deletes AutoCodec.PUBLIC_FIELDS strategy. Superseded by DynamicCodec.Gravatar shahan2018-06-29
| | | | PiperOrigin-RevId: 202704472
* Make the warning to use http_archive over git_repository bold, and ↵Gravatar dannark2018-06-29
| | | | | | | un-italicize the rest of the docs. RELNOTES: None PiperOrigin-RevId: 202703376
* Create and integrate JavaBootstrap, and use fake top-level Java skylark ↵Gravatar cparsons2018-06-29
| | | | | | | objects for Skydoc. RELNOTES: None. PiperOrigin-RevId: 202697176
* Flatten JavaCompilationAgs into JavaCompilationArgsProviderGravatar cushon2018-06-26
| | | | | | | | | Consolidate the creation of JavaCompilationArgsProviders, and avoid explicit handling of the 'direct' and 'recursive' cases in clients. Also add some higher-level methods to the builder API to support adding dependencies with dep/export/runtime_dep-like semantics. PiperOrigin-RevId: 202166383
* Fix missing newline after repository_cache value in info command output.Gravatar Googler2018-06-25
| | | | PiperOrigin-RevId: 202023187