aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib
Commit message (Collapse)AuthorAge
* Flip the --incompatible_disallow_set_constructor flag by defaultGravatar vladmos2017-08-29
| | | | | | | | | RELNOTES[INC]: `set` is deprecated in BUILD and .bzl files, please use `depset` instead. Ordering names have also been changed, please use "default", "postorder", "preorder", and "topological" instead of "stable", "compile", "naive_link", and "link" correspondingly. PiperOrigin-RevId: 166830004
* aar_import creates res/values/empty.xml if it contains no resources.Gravatar ajmichael2017-08-29
| | | | | | | | | To do this, add a new tool that is used instead of zipper to get the resources out of the AAR. This tool creates res/values/empty.xml if there are no resources in the AAR. Also, some general cleaning of the code. RELNOTES: None PiperOrigin-RevId: 166768607
* Missing link in docs of proto_libraryGravatar Googler2017-08-29
| | | | | RELNOTES: none PiperOrigin-RevId: 166764640
* remove reference to native "ios_framework" rule, as it no longer exists.Gravatar cparsons2017-08-29
| | | | | RELNOTES: None. PiperOrigin-RevId: 166756809
* Automated rollback of commit 363413110f3a63a11d900864be1852adbaed2899.Gravatar cpeyser2017-08-29
| | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks //src/test/shell/bazel:bazel_bootstrap_distfile_test: INFO: You can skip this first step by providing a path to the bazel binary as second argument: INFO: ./compile.sh compile /path/to/bazel 🍃 Building Bazel from scratch...... 🍃 Building Bazel with Bazel. .WARNING: /tmp/bazel_cHivhPBc/out/external/bazel_tools/WORKSPACE:1: Workspace name in /tmp/bazel_cHivhPBc/out/external/bazel_tools/WORKSPACE (@io_bazel) does not match the name given in the repository's definition (@bazel_tools); this will cause a build error in future versions. ERROR: in target '//external:cc_toolchain': error loading package '@local_config_cc//': Extension file not found. Unable to load file '@local_config_cc//:dummy_toolchain.bzl': file doesn't exist or isn't a file. INFO: Elapsed time: 3.343s ERROR: Could not build Bazel Found by git bisect. *** Original change description *** Add a new toolchain type for c++. In order to do this, PlatformConfiguration is made a legal configuration fragment for every rule class. Add a default "dummy" c++ toolchain to prevent resolution errors when legacy toolchain selection logic is used. Add toolchain mocks to java and shell tests. PiperOrigin-RevId: 166750885
* Clean up after rolling out --jplNonStrictDepsLikePl.Gravatar carmi2017-08-29
| | | | | RELNOTES: None PiperOrigin-RevId: 166745722
* 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
* Clean up after rolling out --correctRollupTransitiveProtoRuntimes.Gravatar carmi2017-08-29
| | | | | RELNOTES: None PiperOrigin-RevId: 166735889
* In the config_setting arguments section, the description of the "values" arg ↵Gravatar juliexxia2017-08-29
| | | | | | | states that "This and *values* cannot both be empty" with the word *values* hyperlinking to define_values. Assuming typo(?) and changing to "This and *define_values* cannot both be empty." RELNOTES: None. PiperOrigin-RevId: 166723373
* Use CustomCommandLine directly instead of via SpawnAction.Builder.Gravatar tomlu2017-08-29
| | | | | | | | | | | | | This change forces use of CustomCommandLine.Builder, which has a richer interface for constructing memory-efficient command lines. It will also permit surveying the code base for inefficient patterns using an IDE. This change was done by hand and split using Rosie to assist with rollbacks in case of bugs. Reviewers, please pay particular attention to: * Each all to addInputArgument/addOutputArgument should come with a corresponding matching pair to SpawnAction.Builder#addInput and CustomCommandLine.Builder#addExecPath (eg.). * The commandLine must be set on the SpawnAction using SpawnAction.Builder#setCommandLine. Note that most calls to addPrefixed("arg=", val) should be more idiomatically expressed as add("arg", val), but this involves changing tests and making sure that the command line tools can accept the format. PiperOrigin-RevId: 166723076
* Remove TODO from LegacyCompilationSupport.Gravatar tomlu2017-08-29
| | | | PiperOrigin-RevId: 166722992
* Visit subtrees of the AST in evaluation orderGravatar fzaiser2017-08-29
| | | | | | | | | | | For instance, it makes more sense to visit the RHS of an assignment first because this is evaluated first. This also fixes a bug in the validator, which allowed definitions like "a = a" RELNOTES: None PiperOrigin-RevId: 166709589
* Add a --output_directory_suffix command line option to facilitate the ↵Gravatar lberki2017-08-28
| | | | | | | removal of the C++ toolchain identifier from the output path. RELNOTES: None. PiperOrigin-RevId: 166705005
* Change Identifier#boundNames to #boundIdentifiers.Gravatar fzaiser2017-08-28
| | | | | RELNOTES: None PiperOrigin-RevId: 166704851
* Flip the --incompatible_descriptive_string_representations flag by defaultGravatar vladmos2017-08-28
| | | | | | | | RELNOTES[INC]: Objects in Skylark are converted to strings in a more descriptive and less harmful way (they don't leak information that shouldn't be accessed by Skylark code, e.g. nondeterministic memory addresses of objects). PiperOrigin-RevId: 166697907
* Implement CustomCommandLine support for Skylark.Gravatar tomlu2017-08-28
| | | | | RELNOTES: Support ctx.actions.args() for more efficient Skylark command line construction. PiperOrigin-RevId: 166694148
* Move Statement.exec methods to a separate class.Gravatar laurentlb2017-08-28
| | | | | RELNOTES: None. PiperOrigin-RevId: 166689144
* Add a new toolchain type for c++. In order to do this, ↵Gravatar cpeyser2017-08-28
| | | | | | | | PlatformConfiguration is made a legal configuration fragment for every rule class. Add a default "dummy" c++ toolchain to prevent resolution errors when legacy toolchain selection logic is used. Add toolchain mocks to java and shell tests. PiperOrigin-RevId: 166509298
* Ensure our "Another command is running" messages hold realistic PIDs.Gravatar jmmv2017-08-28
| | | | | | | | | | | | | | | | | | | | Instead of blocking indefinitely for the server lock to become available when other commands are running, busy-wait for the lock to be released. This allows us to detect changes in the PID of the client that is holding the lock, and thus lets us make our wait messages more accurate. There have been multiple bug reports over time (especially from macOS users) where they complain that Bazel is stuck waiting for a non-existent PID. The code doesn't look obviously bogus, so this might just be a case of confusion based on the printed PID. By improving the diagnostic messages we output, we'll either make this confusion go away or have a chance of gathering more data when/if this happens again. This change has the side-effect of homogenizing the wait messages printed by both the Blaze client and the Blaze server and also adds details to know which component is printing what. PiperOrigin-RevId: 166508406
* Add a visitor method for statement blocks to SyntaxTreeVisitorGravatar fzaiser2017-08-28
| | | | | | | | | This allows to do an action after every statement in a block (e.g. an else-block) without having to override all visit(...) methods related to statements. RELNOTES: None PiperOrigin-RevId: 166483743
* Make tests independent of the current state of the ↵Gravatar vladmos2017-08-28
| | | | | | incompatible_descriptive_string_representations flag PiperOrigin-RevId: 166475260
* Fix typo in docs: "beforethis"Gravatar Rodrigo Queiro2017-08-25
| | | | | | Closes #3544. PiperOrigin-RevId: 166464371
* Add a warning to the bind() docsGravatar Rodrigo Queiro2017-08-25
| | | | | | | | | | | | This will encourage new users to avoid it, and would have helped me. At the start, I cargo-culted other projects that use bind() heavily without knowing why. Related: #1952 Closes #3608. PiperOrigin-RevId: 166464352
* Add the JAVABASE and JAVA Make variables to java_runtime_alias artifically ↵Gravatar lberki2017-08-25
| | | | | | | if --javabase= is an absolute path and thus there is no java_runtime rule to forward them from. RELNOTES: None. PiperOrigin-RevId: 166459625
* Implement field declarations for declared providers.Gravatar dslomov2017-08-25
| | | | | RELNOTES: Skylark providers can specify allowed fields and their documentation. PiperOrigin-RevId: 166446104
* Automated rollback of commit 1af9b1e2238c3b43a2b66233495ecf7b6ef4dcab.Gravatar Googler2017-08-25
| | | | | | | | | | | | *** Reason for rollback *** Reason for previous rollback was identified as being a memory regression causing some cases to hit java heap limit. Proposal is to increase java heap limit to compensate and just go with the original change. *** Original change description *** Automated rollback of commit 6cfffdf37e11018c7e6e2cabc90440d6d29c819b. PiperOrigin-RevId: 166426608
* Adds -p to zipalign invocation to align stored (not compressed) .so files in ↵Gravatar ahumesky2017-08-25
| | | | | | | apks on memory page boundaries. RELNOTES: .so files in APKs will be memory-page aligned when android_binary.nocompress_extensions contains ".so" and --experimental_android_use_nocompress_extensions_on_apk is specified. PiperOrigin-RevId: 166399337
* Abort stream if BuildEventServiceTransport does not wait for all ACKs.Gravatar Googler2017-08-25
| | | | | | | This change handling for when BuildEventServiceTransport would timesout waiting for pendingAcks. RELNOTES: None. PiperOrigin-RevId: 166375844
* Introduce enum to quickly discriminate AST nodes.Gravatar laurentlb2017-08-25
| | | | | RELNOTES: None. PiperOrigin-RevId: 166370036
* Naming style fix for AndroidInstrumentationInfo(Provider).Gravatar dslomov2017-08-25
| | | | | RELNOTES: None. PiperOrigin-RevId: 166368143
* Refactor JavaInfo.Gravatar dslomov2017-08-25
| | | | | | | | | | Convert implementation from populating an immutable map to a set of SkylarkCallables. That saves memory and allows specifying documentation. Also properly implements equals() and hashCode(). RELNOTES: None. PiperOrigin-RevId: 166364059
* Allow generator attributes in android_libraries used as android_resourcesGravatar Googler2017-08-25
| | | | | | | These generator attributes are added by genrules or macros. android_libraries created this way should also be allowed to be used as android_resources. RELNOTES: none PiperOrigin-RevId: 166363754
* Windows: Implement Java native launcherGravatar Yun Peng2017-08-25
| | | | | | | | | | | Now Bazel build a Windows exe binary to launch JVM for java_binary and java_test. The Java native launcher is implemented with the same logic and functionalities as the original java shell stub script. Change-Id: Ida40579bce82425f3506f9376b7256aa3edc265e PiperOrigin-RevId: 166346445
* Extract a string constant into a final field.Gravatar lberki2017-08-24
| | | | PiperOrigin-RevId: 166329484
* Automated rollback of commit d31a944cfae27564caa7f974e0daec99314d4c44.Gravatar lberki2017-08-24
| | | | | | | | | | | | | *** Reason for rollback *** Breaks //java/com/google/commerce/tapandpay/android/app/alienfood:<things> *** Original change description *** Enable parameter files for manifest merger actions. RELNOTES: None. PiperOrigin-RevId: 166324224
* Add an xcode_config_alias rule that is an alias to the current xcode_config ↵Gravatar lberki2017-08-24
| | | | | | | | | | | rule in use and expose data in XcodeConfigProvider to Skylark. This gives us a way to discover Xcode version information from Skylark in a way other than by AppleConfiguration, which in turn makes it possible to remove said data (and thus dependencies on BUILD files) from AppleConfiguration. Work towards https://github.com/bazelbuild/bazel/issues/3424 . RELNOTES: None. PiperOrigin-RevId: 166311454
* Automated rollback of commit bb0aba3e91b603bf96d4e214a3886d1f47c3d90a.Gravatar janakr2017-08-24
| | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Publishing duplicate build events for tests. *** Original change description *** Request test artifacts to be built in parallel with running the test. In cases where not all test artifacts are needed to run the test, this allows for greater parallelism in the build. We need to inject the request for the test to be run into the TargetCompletion function, so that it can properly process any errors. Thanks to nharmata@ for suggesting this. MEMORY: One additional Skyframe node and 2 edges for each test to be run (sharded tests still only count as one). So with 500 test target... *** PiperOrigin-RevId: 166307568
* Restore VectorArg to CustomCommandLine's public interface.Gravatar tomlu2017-08-24
| | | | | | | | This CL intends to remove 81 overloads from CustomCommandLine, replacing them with 6 overloads that operate on VectorArg. The actual inlining isn't done in this CL to make it easier to review. This CL tries to balance reducing the API contact surface area while retaining the readability and discoverability of these methods, ensuring that they will be used over methods that eagerly convert arguments to strings. PiperOrigin-RevId: 166280990
* Allow CommandLine expansion to throw an exception.Gravatar tomlu2017-08-24
| | | | | | | | | | | | | | | | | | | This paves the way for Skylark-side compact command lines that can fail during expansion. In general, expansion happens in these scenarios: * Action execution expands the command line to execute it. This is fine since we are well equipped already to handle failing actions. * In the analysis phase we expand command lines to investigate whether we need a params file. This could be moved to the execution phase, which would have the benefit of getting params files out of the action graph and saving memory. * Key computation expands the command line. This could be fixed by allowing command lines to compute their own keys (which wouldn't try to expand the command line). This could have the benefit of being more efficient. * Extra actions expand the command line to construct the extra action proto. This could maybe be deferred to the execution phase (writing the extra action), which would also be more memory efficient. For failed key computations, we return a singleton "error" key. This means multiple actions that will fail will map to the same key. These actions will necessarily fail if executed, so we should not need to worry about these ending up in the action cache. If we do manage to make the command line compute its own keys then this will become moot in the future. RELNOTES: None PiperOrigin-RevId: 166266385
* Request test artifacts to be built in parallel with running the test.Gravatar janakr2017-08-24
| | | | | | | | | In cases where not all test artifacts are needed to run the test, this allows for greater parallelism in the build. We need to inject the request for the test to be run into the TargetCompletion function, so that it can properly process any errors. Thanks to nharmata@ for suggesting this. MEMORY: One additional Skyframe node and 2 edges for each test to be run (sharded tests still only count as one). So with 500 test targets, 100K is a conservative estimate of memory usage. PiperOrigin-RevId: 166256545
* Use CustomCommandLine directly instead of via SpawnAction.Builder.Gravatar tomlu2017-08-24
| | | | | | | | | | | | | This change forces use of CustomCommandLine.Builder, which has a richer interface for constructing memory-efficient command lines. It will also permit surveying the code base for inefficient patterns using an IDE. This change was done by hand and split using Rosie to assist with rollbacks in case of bugs. Reviewers, please pay particular attention to: * Each all to addInputArgument/addOutputArgument should come with a corresponding matching pair to SpawnAction.Builder#addInput and CustomCommandLine.Builder#addExecPath (eg.). * The commandLine must be set on the SpawnAction using SpawnAction.Builder#setCommandLine. Note that most calls to addPrefixed("arg=", val) should be more idiomatically expressed as add("arg", val), but this involves changing tests and making sure that the command line tools can accept the format. PiperOrigin-RevId: 166249211
* Add resource filtering support for third pseudolocaleGravatar Googler2017-08-24
| | | | | | | | Apparently, there's a third pseudolocale, en-rXC. Add support for it in ResourceFilter. RELNOTES: none PiperOrigin-RevId: 166238886
* Annotate CriticalPathComputer's Subscriber methods with ↵Gravatar nharmata2017-08-24
| | | | | | | @AllowConcurrentEvents so as to allow concurrently published events to be handled concurrently. The lack of this annotation means sequential @Subscriber work is a bottleneck during the execution phase. RELNOTES: None PiperOrigin-RevId: 166235310
* Stop using CustomMultiArgv in ProtoCompileActionBuilder.Gravatar tomlu2017-08-24
| | | | | | CustomMultiArgv is hard to serialise. This CL still uses mapping functions, which are equally hard to serialise, but it moves one step closer to being structural. PiperOrigin-RevId: 166230153
* Pull maven -src jars when available alongside jars re:Gravatar juliexxia2017-08-24
| | | | | | | https://github.com/bazelbuild/bazel/issues/308 RELNOTES: None. PiperOrigin-RevId: 166219871
* Enable parameter files for manifest merger actions.Gravatar apell2017-08-24
| | | | | RELNOTES: None. PiperOrigin-RevId: 166215145
* Update documentation for the print functionGravatar vladmos2017-08-24
| | | | | | Print function prints debug messages, not warnings. PiperOrigin-RevId: 166212471
* Use CustomCommandLine directly instead of via SpawnAction.Builder.Gravatar tomlu2017-08-24
| | | | | | | | | | | | | This change forces use of CustomCommandLine.Builder, which has a richer interface for constructing memory-efficient command lines. It will also permit surveying the code base for inefficient patterns using an IDE. This change was done by hand and split using Rosie to assist with rollbacks in case of bugs. Reviewers, please pay particular attention to: * Each all to addInputArgument/addOutputArgument should come with a corresponding matching pair to SpawnAction.Builder#addInput and CustomCommandLine.Builder#addExecPath (eg.). * The commandLine must be set on the SpawnAction using SpawnAction.Builder#setCommandLine. Note that most calls to addPrefixed("arg=", val) should be more idiomatically expressed as add("arg", val), but this involves changing tests and making sure that the command line tools can accept the format. PiperOrigin-RevId: 166210952
* 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
* Use CustomCommandLine directly instead of via SpawnAction.Builder.Gravatar tomlu2017-08-24
| | | | | | | | | | | | | This change forces use of CustomCommandLine.Builder, which has a richer interface for constructing memory-efficient command lines. It will also permit surveying the code base for inefficient patterns using an IDE. This change was done by hand and split using Rosie to assist with rollbacks in case of bugs. Reviewers, please pay particular attention to: * Each all to addInputArgument/addOutputArgument should come with a corresponding matching pair to SpawnAction.Builder#addInput and CustomCommandLine.Builder#addExecPath (eg.). * The commandLine must be set on the SpawnAction using SpawnAction.Builder#setCommandLine. Note that most calls to addPrefixed("arg=", val) should be more idiomatically expressed as add("arg", val), but this involves changing tests and making sure that the command line tools can accept the format. PiperOrigin-RevId: 166205304