aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/BUILD
Commit message (Collapse)AuthorAge
* Extract authandtls, buildeventservice, buildeventstream into package-level ↵Gravatar philwo2017-09-04
| | | | | | | | BUILD files. Replace all ":relative" labels with "//absolute:path" labels for easier search & replace. PiperOrigin-RevId: 167500985
* Split the cycle between vfs and profiler.Gravatar philwo2017-08-31
| | | | | | | | | | - Move ProfilerInfo into a subpackage (it's not necessary for profiling, just for analyzing a profile). - Make some fields in Profiler public for ProfileInfo. - Mark Profiler as ThreadSafe; there's no cyclic dependency here. This is based on ulfjack's microbazel patch series: https://github.com/ulfjack/bazel/commit/44553fcac0fc876784d8f48c2e577d8c999712de PiperOrigin-RevId: 167121952
* Turn ActionCacheStatistics into a proto.Gravatar jmmv2017-08-31
| | | | | | | | This is to avoid having to maintain an almost-equal Java data type once we start externalizing statistics. RELNOTES: None. PiperOrigin-RevId: 167037360
* Split "shell", "graph" into their own packages.Gravatar philwo2017-08-29
| | | | PiperOrigin-RevId: 166849610
* Refactor collection of action cache statistics.Gravatar jmmv2017-08-29
| | | | | | | | | | | | | | | | | This change gets rid of the old CachesSavedEvent object (note, plural) which used to capture details about various caches. As this was now only used for a single cache, rename it to ActionCacheStatistics so that the data it contains is more cohesive. The reason for this change is to make room for the addition of other metrics for the action cache (like hits/misses), which will come later. As of now, this change is intended to be a no-op. While doing this, use AutoValue to avoid mutability of the generated objects and use better types for the contained data (e.g. Duration for timings). RELNOTES: None. PiperOrigin-RevId: 166742117
* Support print_action command in Bazel.Gravatar Googler2017-08-24
| | | | | | | | RELNOTES[NEW]: Added the print_action command, which outputs the actions needed to build a given target in the form of an ExtraActionSummary proto in text format. PiperOrigin-RevId: 166205468
* Remove FeaturePolicyConfiguration et al. in favor of the new Whitelisting.Gravatar mstaib2017-08-22
| | | | | | | | This migrates the config_feature_flag implementation over and removes the old flag (which was not used except to test it). Fare thee well, old flag. RELNOTES: None. PiperOrigin-RevId: 165995681
* Rename some of native declared providers according to the new naming scheme.Gravatar dslomov2017-08-21
| | | | | RELNOTES: None PiperOrigin-RevId: 165910455
* Open-source Skyframe serialization, and make AppleConfiguration serializable ↵Gravatar janakr2017-08-18
| | | | | | as a pilot. Currently not hooked up to anything, but will be shortly. PiperOrigin-RevId: 165583517
* Move core test classes to lib.analysis.testGravatar ulfjack2017-08-11
| | | | | | | | These are depended upon by analysis code, so need to live in the same library as lib.analysis. Moving them here makes it possible to split the build-base library into separate libraries for analysis, execution, and rules. PiperOrigin-RevId: 164847161
* Move extra action stuff to analysis.extraGravatar ulfjack2017-08-10
| | | | | | | This is part of splitting up the build-base library into separate libraries for analysis, exec, and rules. PiperOrigin-RevId: 164835678
* Move FilesetProvider to lib.analysis.filesetGravatar ulfjack2017-08-09
| | | | | | | This is part of splitting up the build-base library into separate libraries for analysis, exec, and rules. PiperOrigin-RevId: 164701931
* Move the Skylark rule infrastructure from lib.rules to lib.analysis.skylarkGravatar ulfjack2017-08-09
| | | | | | | | | This is part of splitting up the build-base library into separate libraries for analysis, exec, and rules. Unfortunately, there are a number of reverse deps from analysis code to Skylark classes, so moving these is the only way to make progress. PiperOrigin-RevId: 164612957
* grpc: Consolidate gRPC code from BES and Remote Execution. Fixes #3460, #3486Gravatar buchgr2017-08-04
| | | | | | | | | | | BES and Remote Execution have separate implementations of gRPC channel creation, authentication and TLS. We should merge them, to avoid duplication and bugs. One such bug is #3640, where the BES code had a different implementation for Google Application Default Credentials. RELNOTES: The Build Event Service (BES) client now properly supports Google Applicaton Default Credentials. PiperOrigin-RevId: 164253879
* Add --windows_exe_launcher optionGravatar Yun Peng2017-08-04
| | | | | | | | | | | | | If this is enabled, Bazel will build a Windows native exe binary launcher for sh_binary, in the future this flag will also apply to py_binary and java_binary. By default, it's turned ON, set --windows_exe_launcher=0 to turn it off. Fix https://github.com/bazelbuild/bazel/issues/3491 Change-Id: Ic55bff745670446e585e3cc62af9dc6561527d4f PiperOrigin-RevId: 164234552
* Move core rules to a top-level class.Gravatar ulfjack2017-08-03
| | | | PiperOrigin-RevId: 164013246
* Provide CcLinkParamsStore from java_xxx_proto_library rules.Gravatar carmi2017-08-02
| | | | | RELNOTES: None PiperOrigin-RevId: 163838735
* Fix 'whitelisting' src group.Gravatar dslomov2017-07-31
| | | | | RELNOTES: None. PiperOrigin-RevId: 163703995
* 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
* 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
* Automated rollback of commit 7d0200703cfa207d6577d84bee45ca185d240dfa.Gravatar carmi2017-07-25
| | | | | | | | | | | | SKIP_KOKORO: Kokoro is out of quota. *** Reason for rollback *** Causes memory regression, somehow: b/63934093 *** Original change description *** PiperOrigin-RevId: 163023580
* Move the DurationConverter to the common.options packageGravatar ulfjack2017-07-24
| | | | | | | Also change it to java.time.Duration, rather than Jodatime. Now that we're on Java 8, we no longer need Jodatime. PiperOrigin-RevId: 162917526
* PiperOrigin-RevId: 162771369Gravatar carmi2017-07-24
|
* Split invocation policy from the optionsparser target.Gravatar ccalvarin2017-07-19
| | | | | | //src/main/java/com/google/devtools/common/options:options is now free of bazel protos, once again. PiperOrigin-RevId: 162385612
* Make the @Option annotation depend on the java version of the tagging enums.Gravatar ccalvarin2017-07-18
| | | | | | | The option filters proto dependency can be removed from the OptionsParser. This is in response to option parser users that want to avoid the bazel-internal proto file in their dependencies. RELNOTES: None. PiperOrigin-RevId: 162249778
* Allow py_binary to be the executable of a Skylark action or anyGravatar Philipp Wollermann2017-07-18
| | | | | | | | | SpawnAction on Windows. RELNOTES: None. Change-Id: I2d926447511dab5fb804051abdbef9031cb089be PiperOrigin-RevId: 162201440
* Remove unused native aspect for ASwBGravatar Googler2017-07-14
| | | | | RELNOTES: None. PiperOrigin-RevId: 161952410
* Remove the java_common.java_toolchain_attr field in favor of a ↵Gravatar lberki2017-07-14
| | | | | | | | java_toolchain_alias() rule, depending on which will accomplish the same thing. RELNOTES[INC]: java_common.java_toolchain_attr is removed. Depend on the java_toolchain_alias() rule to accomplish the same thing. PiperOrigin-RevId: 161789578
* Also generate a build stream for fetchGravatar Klaus Aehlig2017-07-14
| | | | | | | | | | | Bazel's fetch command is also related to building. So generate a build-event stream for this as well. As a first step, generate a minimal stream with only the console output by white listing the command, setting the separateFinishedEvent flag on the NoBuildEvent, and generating a NoBuildRequestFinishedEvent. Change-Id: Iee0c4e84ee5a060565ac86692a2b1917691a84ab PiperOrigin-RevId: 161782448
* Moves printing method for feature accessibility errors.Gravatar plf2017-07-12
| | | | | | | | The method is moved to FeaturePolicyConfiguration.java so that it can be used by unrelated parts of the code using feature policies for whitelisting. RELNOTES:none PiperOrigin-RevId: 161648169
* Add a cc_toolchain_alias and java_runtime_alias rules so that e.g. genrules ↵Gravatar lberki2017-07-11
| | | | | | | | | | | can depend on the C++ toolchain/Java runtime being used. The naive way to do this would be via @bazel_tools//, except that that does not take configuration transitions into account and e.g. will be the same in the host and the target configurations even if different toolchains are used. Eventually, this will be supplanted by the toolchain selection mechanism. However, that is not live yet and the migration cost this will incur is not a lot; just replacing the one single instance of these undocumented rules with the reference to the toolchain type. RELNOTES: None. PiperOrigin-RevId: 161519229
* Bazel, Windows: sh_binary now builds a .cmd fileGravatar Laszlo Csomor2017-07-05
| | | | | | | | | | | | | | | | | | | | | | | | On Linux/MacOS, sh_binary creates an output file with the same name as the rule. The file is a symlink pointing to the main script of the rule (sh_binary.srcs only allows one file.) On Windows sh_binary also creates an output file called the same as the rule, but it's a copy of the main script file (due to lack of symlink support on Windows). However the rule now also creates the <rulename>.cmd output, which is a wrapper script similar to the java_binary-generated launcher. If however the sh_binary rule's name ends with ".exe", ".cmd", or ".bat", and its main file also ends with the same extension, then sh_binary will not create the launcher .cmd file, and will copy the main file to the output tree instead. Change-Id: Idcf92ce3bb254bd6d9a1fb5c659a52220efe19aa PiperOrigin-RevId: 160805720
* Windows, JNI: move around sourcesGravatar Laszlo Csomor2017-07-03
| | | | | | | | | | | | | | | | | | | | | | | | Move the Java JNI sources to a separate package: c.g.devtools.build.lib.windows.jni and c.g.devtools.build.lib.windows.runfiles. Make the native method declarations private, create public wrapper methods for them that ensure that the JNI library is loaded. Split the C++ JNI source processes.cc into two parts (processes-jni.cc and file-jni.cc), extract common functionality to jni-util.{h,cc}. This change preparse the code for Android rule support on Windows, specifically it lets the Android BusyBox use the file JNI library so it can create junctions on Windows to work around long path issues when calling external tools. See https://github.com/bazelbuild/bazel/issues/3264 Change-Id: I7f1a746d73f822ae419d11b893a91f4eb45d64da PiperOrigin-RevId: 160643355
* Introduce new android_instrumentation_test rule.Gravatar ajmichael2017-06-29
| | | | | | | | | | | This rule works with the android_instrumentation, android_device_script_fixture and android_host_service_fixture rules to support testing Android applications. None of these rules are installed yet, because the forthcoming Android test runner is not yet open sourced. https://github.com/bazelbuild/bazel/issues/903. RELNOTES: None PiperOrigin-RevId: 160465920
* Add a FeaturePolicyConfiguration for supporting limited feature rollouts.Gravatar mstaib2017-06-29
| | | | | | | | | | A common need is to limit access to a rule or feature - restricting a feature which is being deprecated or controlling the rollout of a new feature. This change adds the feature_control_policy flag, which allows developers to easily manage this process. RELNOTES: None. PiperOrigin-RevId: 160454166
* Add the default category and tag to all options.Gravatar ccalvarin2017-06-28
| | | | | | | | Move the default from the annotation to every mention. This makes the incompleteness explicit. Will add the defaults to test targets in a separate change. Once all dependencies are cleaned up, the Option annotation will no longer allow options without the documentationCategory or effectTag, to prevent new options being added without categories while we migrate to the new option categorization. PiperOrigin-RevId: 160281252
* Add option tagging and categorizing enums.Gravatar ccalvarin2017-06-27
| | | | | | | | | | | | | | Begin work of transferring option categorization to a sustainable, documented setup. DocumentationCategories will replace the existing string category field, and will group flags in generated documentation. Each flag must belong to exactly 1 DocumentationCategory, whichever is most applicable or a new one. OptionEffectTags will document the effects of tags and will be used for filtering flags. These tags, unlike the categories, should be complete. All options that do affect Bazel's output should be tagged as affecting Bazel's output, for example. This is necessary for them to be useful when trying to isolate the cause of an issue or behavior by allowing irrelevant options to be filtered out. Each flag must have at least 1 intended behavior, so should have 1+ OptionEffectTag. If no effect tag applies, find a general tag that would apply and add it to all relevant options. OptionMetadataTags will hold information about the flag itself. Information about the lifecycle of a flag, for example, should belong in an OptionMetadataTag. It is useful for filtering, since it describes how trustworthy we might think the flag would be, but does not actually describe the “intent” or “meaning” of a flag. This can be an empty list, but options can also have multiple OptionMetadataTags All options will be switched from the old "category" field to this new system. A few general OptionsBases are provided as an example. PiperOrigin-RevId: 160180328
* Extract ImmutableSharedKeysMap class from TransitiveInfoProviderMap.Gravatar Googler2017-06-20
| | | | PiperOrigin-RevId: 159498323
* Create a general WrappingProvider concept and use for java_proto_library and ↵Gravatar Googler2017-06-20
| | | | | | | | | | | | friends. The wrapping provider contains its own provider map containing any providers that may conflict. This can be used generally for any aspect that wants to override its base providers (during migration), and due to the generality we should be able to cut down on code size and complexity. Once we have this, we can more easily and uniformly bind aspects to Skylark for aspect-on-aspect functionality. The Skylark providers can be instantiated with a wrapping provider if one is present, or fall through to the base target if they aren't. We will also likely save a bit of memory from cutting down on wrapping classes. PiperOrigin-RevId: 159461325
* Rewrite StandaloneSpawnStrategy to use LocalSpawnRunnerGravatar ulfjack2017-06-19
| | | | PiperOrigin-RevId: 159221067
* BES: Consolidate BuildEventServiceModule and BuildEventStreamerModule.Gravatar buchgr2017-06-14
| | | | | | | | | | | | | | After having open sourced the Build Event Service code, there is no more need to have two separate bazel modules that both create a BuildEventStreamer. This change merges the BuildEventStreamerModule logic into the BuildEventServiceModule. DELTA=677 (330 added, 316 deleted, 31 changed) DELTA_BY_EXTENSION=java=293,oss=32 RELNOTES: None. PiperOrigin-RevId: 158960687
* 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