aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/BUILD
Commit message (Collapse)AuthorAge
* Extract the MacOS/XCode env rewrite logic into lib.exec.appleGravatar ulfjack2017-06-13
| | | | | | | | | | | | | | | | | | | Also add an interface to allow injecting that logic into LocalSpawnRunner; this is in preparation for rewriting StandaloneSpawnStrategy to use LocalSpawnRunner. At the same time, this reduces the dependencies from exec / standalone to rules.apple, which is a prerequisite for micro-Bazel. There's a small semantic change hidden here - we now only set the new XCodeLocalEnvProvider if we're actually running on Darwin, so we no longer fail execution on non-Darwin platforms if XCODE_VERSION_OVERRIDE or APPLE_SDK_VERSION_OVERRIDE is set. As a result, I moved the corresponding test from StandaloneSpawnStrategyTest to the new XCodeLocalEnvProviderTest. While I'm at it, also open source DottedVersionTest and CacheManagerTest. PiperOrigin-RevId: 158829077
* Move InvocationPolicy to the options parser package.Gravatar ccalvarin2017-06-09
| | | | | | | | | | | | | | It was originally included in runtime due to external dependencies, and a desire to keep the options parser a general options library. These dependencies have been or will be removed, and there are plenty of other general flag libraries. InvocationPolicy is fundamentally acting on the properties of this specific OptionsParser and needs proper access to it for the proper solution to a number of existing bugs, which means having access to things that should be package private. PiperOrigin-RevId: 158523111
* BES: Open Source the build event service gRPC client implementation.Gravatar buchgr2017-06-09
| | | | | | | This change moves the BES code from blaze to bazel. RELNOTES: None. PiperOrigin-RevId: 158445754
* Add new configuration fragment for platforms, with host and targetGravatar John Cater2017-06-08
| | | | | | | options. Change-Id: If623f2416f8bff7c74ddf99d5c957a075de6494f PiperOrigin-RevId: 158275892
* protobuf: Use bazel's native java_proto_library rules.Gravatar Jakob Buchgraber2017-06-06
| | | | | | | | | Additional changes: - Introduce a Skylark macro java_library_srcs that provides the source jars of a java_*_library rule. - Remove bazel's own java_proto_library implementation. Change-Id: I18f2259bc75ca0fb32dcd8a6a857c609bd2c7773 PiperOrigin-RevId: 158146210
* Move ExecutionRequirements to the lib.actions packageGravatar ulfjack2017-06-06
| | | | | | | | | It was previously the odd-one out in lib.analysis.actions, due to other code that wanted to depend on it without pulling in all of analysis. However, it's needed to interpret Spawn instances, and Spawn lives in lib.actions, so it makes more sense to move it there, and remove the special-casing. PiperOrigin-RevId: 158116684
* Move helper methods for accessing platform providers to a utility class.Gravatar John Cater2017-06-02
| | | | | Change-Id: I45d0cf8e5096ad4ab516af5ddaa98eea8d516c04 PiperOrigin-RevId: 157788771
* BEP: report visibility errorsGravatar Klaus Aehlig2017-06-01
| | | | | | | | On finding a visibility error, report it directly for that target, instead of relying on the implict "abort" message for targets that have not been built. Change-Id: I5e45722a1117afca3bc8eeebd05179425b995172 PiperOrigin-RevId: 157592518
* Remote tests should not depend on lib:runtimeGravatar buchgr2017-05-31
| | | | | | | | Move AuthAndTLSOptions to its own package, so that tests/remote no longer depends on lib:runtime. RELNOTES: None. PiperOrigin-RevId: 157469629
* Create a loadPackages() method that loads multiple packages simultaneously, ↵Gravatar carmi2017-05-22
| | | | | | | | | using multiple threads. The immediate upside is that if multiple packages load the same bzl file, that file will only be read once when using loadPackages(). RELNOTES: None PiperOrigin-RevId: 156621988
* Add toolchains data to RuleClass and RuleContext.Gravatar John Cater2017-05-19
| | | | | | | | Also expose both sides to Skylark. Part of #2219. Change-Id: I4d749dd9981fe33f75310acb0ec3927cff6f28fe PiperOrigin-RevId: 156340638
* PiperOrigin-RevId: 156331430Gravatar nharmata2017-05-19
|
* Migrate off versioned javac and Error Prone targetsGravatar Liam Miller-Cushon2017-05-09
| | | | | Change-Id: Iad1e07ad55d5304d7c3dbb8bdab856728a91432d PiperOrigin-RevId: 155375893
* Add missing //third_party:guava dependency to execution-requirements.Gravatar Philipp Wollermann2017-05-08
| | | | | Change-Id: I68797947905166b71a58d8332be18fc7bd6de30d PiperOrigin-RevId: 155360327
* Automated g4 rollback of commit 9dec9a09d1e4d27e7cff73c440195a32d3b90752.Gravatar plf2017-05-05
| | | | PiperOrigin-RevId: 155194438
* Introduce BazelPackageLoader.Gravatar nharmata2017-05-04
| | | | | | | | | This is a standalone library for loading packages. It is intended to be used by clients outside of Bazel (for now, Kythe). Perform BazelPackageLoader#loadPackage in the testing hook used in all of Bazel's unit tests and integration tests. This gives us very good test coverage for BazelPackageLoader. RELNOTES: None PiperOrigin-RevId: 155004070
* Make SkyKey an interface, and start the migration of not creating SkyKey ↵Gravatar janakr2017-05-04
| | | | | | wrapper objects: for OwnedArtifacts, which are the most numerous during builds, and for Labels for TransitiveTraversalValues, which are the most numerous during queries. PiperOrigin-RevId: 154989520
* Set the local CPU reservation for tests based on their "cpu:<n>" tag.Gravatar philwo2017-05-03
| | | | | | | | | | | | | | | | | | This lets users specify that their test needs a minimum of <n> CPU cores to run and not be flaky. Example for a reservation of 4 CPUs: sh_test( name = "test", size = "large", srcs = ["test.sh"], tags = ["cpu:4"], ) This could also be used by remote execution strategies to tune their resource adjustment. RELNOTES: You can increase the CPU reservation for tests by adding a "cpu:<n>" (e.g. "cpu:4" for four cores) tag to their rule in a BUILD file. This can be used if tests would otherwise overwhelm your system if there's too much parallelism. PiperOrigin-RevId: 154856091
* Move platform providers to a new package to break cyclic dependencies.Gravatar John Cater2017-05-02
| | | | | | | Part of #2219. Change-Id: I87c7bc9fbfb38d3dbdf193b46247901d0f2a838d PiperOrigin-RevId: 154719063
* Fix 'Argument list too long' error in :merge_licenses genruleGravatar Jakob Buchgraber2017-04-28
| | | | | | | | | | | We pass every file in //third_party:srcs to merge_licenses.sh and when trying to update protobuf that list grew too large and caused errors on macOS. With xargs we can split the list of files into smaller chunks. Change-Id: I402813f14e35ca6dac393112ff4f3c963e789536 PiperOrigin-RevId: 154536807
* Store Skylark command-line flags in SkyframeGravatar brandjon2017-04-28
| | | | | | | | | This is the first of two CLs for making command line options able to affect the Skylark interpreter. It introduces SkylarkSemanticsOptions, and stores it as a precomputed (injected) value in Skyframe. The next CL will read these options from Skyframe when constructing the Skylark environment. This CL affects the dataflow from command/test initialization to Skyframe. Some code paths, like those used for testing, use the default SkylarkSemanticsOptions and therefore won't be able to use (for example) --incompatible_* flags. The call sites to update were found by searching for uses of defaultVisibility and working upward from there. RELNOTES: None PiperOrigin-RevId: 154432058
* Update to javac9-r4023Gravatar cushon2017-04-25
| | | | PiperOrigin-RevId: 154078281
* Remove the dash moduleGravatar dmarting2017-04-20
| | | | | | | | | | This module rely on an un-maintained codepath and is hardly used by anyone. We should also archive the code from dash until we can revive it with BEP RELNOTES[INC]: --use_dash, --dash_url and --dash_secret are removed. PiperOrigin-RevId: 153701824
* Add repository override optionGravatar kchodorow2017-04-20
| | | | | | | | | | | RELNOTES: Adds a --override_repository option that takes a repository name and path. This forces Bazel to use the directory at that path for the repository. Example usage: `--override_repository=foo=/home/user/gitroot/foo`. Fixes #1266 PiperOrigin-RevId: 153599291
* Expose Bazel's Android data binding support to users.Gravatar gregce2017-04-18
| | | | | | | | | | | | The logic is already in Bazel but wasn't available to build rules. This change makes it available, but still requires data binding's {build|run}time libraries to be checked into appropriate depot spots for everything to work. Followup changes will make those libraries easily available. Issue: #2694 PiperOrigin-RevId: 153359861
* Add a custom single-line formatter for java.log.Gravatar schmitt2017-04-13
| | | | | | | | This logger makes it easier to parse log statements and is now enabled for Bazel's java.log. RELNOTES[INC]: Bazel now prints logs in single lines to java.log PiperOrigin-RevId: 152954337
* Add feature_flags attribute to Android binary rules.Gravatar mstaib2017-04-13
| | | | | | | | | | | This is the first actual user of the config_feature_flag rule, able to actually set its value (and thus give a point to using it!) This feature is not fully launched yet, but it is usable in any build containing this change. RELNOTES: None. PiperOrigin-RevId: 152948153
* Open source LocalSpawnRunnerGravatar ulfjack2017-04-07
| | | | | | | | | The LocalSpawnRunner is a non-sandboxed local execution implementation, which will replace the current StandaloneSpawnStrategy. The code has been around for a long time and has seen a lot of bugfixes. It also supports local prefetching, which is required for Google. I have a follow-up change to make it support Windows, so it's not a drop-in replacement for StandaloneSpawnStrategy yet. PiperOrigin-RevId: 152486973
* Move ConfigSetting into rules/config.Gravatar mstaib2017-04-06
| | | | | | | | | | | | | | | ConfigSetting was previously in analysis/config, where it was slightly out of place (as it is a rule, not an integral part of the analysis backend). This is also necessary to integrate it with ConfigFeatureFlag, as otherwise this would be a circular dependency (analysis/config <-> rules/config). ConfigFeatureFlagRule itself has been moved into ConfigRuleClasses, where it can use the ConfigBaseRule and the nonconfigurable reason from the other configuration rules. RELNOTES: None. PiperOrigin-RevId: 152275823
* Separate resource jar construction from compilationGravatar cushon2017-04-05
| | | | | | | | | | | | This adds a new action to Java (and Android/Java proto) targets with resources that add any resources to the output jar separately from compilation. The main advantage of this approach is that changes to resources no longer force the target to be recompiled. It also makes actions that create resource jars but do no compilation easier to set up, since they no longer pull in JavaBuilder and JavaTargetAttributes. PiperOrigin-RevId: 152181755
* Move BuildConfiguration option data access to a new class.Gravatar mstaib2017-04-03
| | | | | | | | | | | | | | | | | ConfigSetting is being moved to rules/config, and that means that it no longer has its special package-private access to BuildConfiguration. The solution: a new TransitiveOptionDetails class which cuts down on clutter in BuildConfiguration and is publicly accessible. However, we don't really want anyone accessing BuildConfiguration's TransitiveOptionsDetails - only config-related rules should ever need it. As a result, BuildConfigurationOptionDetails provides public access to BuildConfiguration's TransitiveOptionDetails, but is limited via Blaze visibility to only configuration rules. RELNOTES: None. PiperOrigin-RevId: 151828068
* Open source android_device rule.Gravatar ajmichael2017-03-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This rule has an implicit dependency on unified_launcher, which is hosted in an external repository at https://github.com/google/android-testing-support-library and must be set up in the WORKSPACE file with repository name @android_test_support. A future change will introduce an Android tools set-up macro that will create workspace rules for all of the remote Android tools, including unified_launcher. Note that unified_launcher is not supported on Mac or Windows, so Bazel will only be able to successfully build the android_device rule on Linux. Instructions to set up unified_launcher for use with android_device: 1. Install xvfb 2. In your WORKSPACE add ``` android_sdk_repository(name = "androidsdk") # Also set $ANDROID_HOME git_repository( name = "android_test_support", remote = "https://github.com/google/android-testing-support-library", commit = "79725fed7a6884074fb3647a683869e7141ecf64", ) load( "@android_test_support//tools/android/emulator:unified_launcher.bzl", load_unified_launcher_deps = "load_workspace") load_unified_launcher_deps() ``` In your BUILD file, you can create an android_device rule for a system image that you have installed in your Android SDK as: ``` android_device( name = "my_device", cache = 256, default_properties = "@bazel_tools//tools/android/emulator:no_se_linux.properties", horizontal_resolution = 640, vertical_resolution = 800, screen_density = 133, ram = 2048, vm_heap = 256, system_image = "@androidsdk//:android-23_default_x86_files", ) ``` RELNOTES: Introduces experimental android_device rule for configuring and launching Android emulators. PiperOrigin-RevId: 151766489
* Add the config_feature_flag rule.Gravatar mstaib2017-03-31
| | | | | | | | | | | | | | This rule allows users to define flags as part of the Bazel configuration. These flags will be select-able through a new attribute on config_setting, and settable through transitions within certain special rules. This rule is currently not supported by any other rules, not even config_setting, and its values cannot be set; accordingly, it's not very useful yet. RELNOTES: None. PiperOrigin-RevId: 151746523
* Honor SOURCE_DATE_EPOCH in bootstrapping Gravatar Klaus Aehlig2017-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently, a stamped bazel binary contains the actual timestamp at build time. This means, that building bazel we either include no version information at all, or the binary contains a not reproducible time stamp. Both are not acceptable from the point of view of a downstream maintainer of a bazel package, where the requirement is that the package be reproducible, but the binary still provide sensible version information. Fortunately, there is a suggested standard to solve this problem taking the "current time" from the SOURCE_DATE_EPOCH environment variable, if set, rather than the actual time. See https://reproducible-builds.org/specs/source-date-epoch/. Honor this proposed standard, so that bazel can reasonably be packaged downstream. See issue #2240. Note that we only use the environment variable in our bootstrap script; for bazel itself we communicate that information via an appropriate option. -- Change-Id: I55409a117285b9a3446421179c20f4e8c59088f8 Reviewed-on: https://cr.bazel.build/9467 PiperOrigin-RevId: 150896326 MOS_MIGRATED_REVID=150896326
* BEP: Use TestStatus enum to report the status of a TestResultGravatar Jakob Buchgraber2017-03-23
| | | | | | | | -- Change-Id: I07c15f7d232a3e9363ebedfb9b5523999630c401 Reviewed-on: https://cr.bazel.build/9450 PiperOrigin-RevId: 150887776 MOS_MIGRATED_REVID=150887776
* Define the ConfigFeatureFlagConfiguration fragment.Gravatar Michael Staib2017-03-21
| | | | | | | | | | | | This will eventually be used to store the values of user-defined configuration flags, once such a rule is added. Because this rule does not exist yet, this fragment is currently not part of the rule class provider. This will have to be done when that rule is turned on. -- PiperOrigin-RevId: 150638292 MOS_MIGRATED_REVID=150638292
* Add a new command "bazel license" that prints the license files of Bazel and ↵Gravatar Philipp Wollermann2017-03-20
| | | | | | | | all embedded open-source components. -- PiperOrigin-RevId: 150435047 MOS_MIGRATED_REVID=150435047
* Print repository context's execute outputGravatar Kristina Chodorow2017-03-16
| | | | | | | | RELNOTES: Repository context's execute() function can print stdout/stderr while running. To enable, pass quiet=False. -- PiperOrigin-RevId: 150206218 MOS_MIGRATED_REVID=150206218
* --Gravatar Carmi Grushko2017-03-14
| | | | | PiperOrigin-RevId: 150019356 MOS_MIGRATED_REVID=150019356
* Remove experimental Java min classpath optimizationGravatar Liam Miller-Cushon2017-03-12
| | | | | | -- PiperOrigin-RevId: 149789440 MOS_MIGRATED_REVID=149789440
* Make InMemoryFileSystem case-insensitive on Windows. Gravatar Dmitry Lomov2017-03-09
| | | | | | | | | | This fixes PackagePathLocatorTest. -- Change-Id: I3d14a80993f6b256acfc732adf2d97b1d2dcb804 Reviewed-on: https://cr.bazel.build/9310 PiperOrigin-RevId: 149634730 MOS_MIGRATED_REVID=149634730
* Make Bazel build with MSVC-default-toolchain Bazel Gravatar Yun Peng2017-03-08
| | | | | | | | | | | | | After this change, a msys bazel can be built with a MSVC-default Bazel by adding --cpu=x64_windows_msys --host=x64_windows_msys See https://github.com/bazelbuild/bazel/issues/2627 -- Change-Id: Iaa82bf4dd911c5740b98d3b2739dfccca6203f79 Reviewed-on: https://cr.bazel.build/9293 PiperOrigin-RevId: 149532274 MOS_MIGRATED_REVID=149532274
* Make ExperimentalStateTracker aware of DownloadProgressEvents Gravatar Klaus Aehlig2017-03-02
| | | | | | | | | | | | In the experimental UI, to be able to report appropriately about ongoing downloads, we need to track their state, as updated by the DownloadProgressEvents. Do so. Also report on ongoing downloads in the progress bar. -- Change-Id: I668e963cd6da85ec598b23724066d366d465271f Reviewed-on: https://cr.bazel.build/9114 PiperOrigin-RevId: 148899297 MOS_MIGRATED_REVID=148899297
* Add constraint_setting and constraint_value rules, to enable defining Gravatar John Cater2017-02-28
| | | | | | | | | | | | platform-related constraints and values. Part of ongoing work on #2219. -- Change-Id: Ice370ee26469f4992faf72c0c95a1a3e51a9f9e7 Reviewed-on: https://cr.bazel.build/9091 PiperOrigin-RevId: 148758190 MOS_MIGRATED_REVID=148758190
* Move UnixFileSystem to lib.unix, WindowsFileSystem to lib.windowsGravatar Ulf Adams2017-02-28
| | | | | | -- PiperOrigin-RevId: 148749485 MOS_MIGRATED_REVID=148749485
* Add cc_proto_library to Bazel Build Encyclopedia.Gravatar David Chen2017-02-28
| | | | | | -- PiperOrigin-RevId: 148697913 MOS_MIGRATED_REVID=148697913
* Add ProtoJavaApiInfoAspectProvider to JavaProvider.Gravatar Irina Iancu2017-02-23
| | | | | | | | | Also moved ProtoJavaApiInfo*Provider to package com.google.devtools.build.lib.rules.java to avoid a dependency cycle. -- PiperOrigin-RevId: 148324664 MOS_MIGRATED_REVID=148324664
* Skylark documentation pipeline automatically generates documentation for all ↵Gravatar Florian Weikert2017-02-22
| | | | | | | | | | Skylark modules. With this change, we no longer have to manually register modules whose generation should be generated. Manual registration turned out to be prone to errors since engineers didn't know about it or simply forgot to register their modules. As a result, we had ~20 modules that featured nice documentation texts, but that were not being picked up by the documentation pipeline. -- PiperOrigin-RevId: 148136776 MOS_MIGRATED_REVID=148136776
* Declare all BuildEvents as Postable Gravatar Klaus Aehlig2017-02-21
| | | | | | | | | | | | ...through the ExtendedEventHandler. The main use case of the extended event handler is to allow posting of BuildEvents. So it is implicit that they are all good to be posted. Declare this. -- Change-Id: I9fcb2f33e57e05c3a05509b1121e44396f28c168 Reviewed-on: https://cr.bazel.build/9011 PiperOrigin-RevId: 148090465 MOS_MIGRATED_REVID=148090465
* Rollback of commit 03d1255df1805ed1e5f7512bf0336f71c595791b.Gravatar Googler2017-02-15
| | | | | | | | | | *** Reason for rollback *** Vanilla roll forward -- PiperOrigin-RevId: 147512649 MOS_MIGRATED_REVID=147512649