aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools
Commit message (Collapse)AuthorAge
* Add caching of computed file digests based on file metadata.Gravatar Julio Merino2017-03-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change modifies DigestUtils to add a cache of (path, inode, mtime, size) to the digest of the file for those digests that are computed by reading the file contents. The cache itself is optional because relying on file metadata to cache the file digests could lead to correctness issues. Enabling the cache is exposed via a new (undocumented) --cache_computed_file_digests flag that we can use post-release to tune the built-in values if they prove to be incorrect or problematic. For Bazel, enable this cache unconditionally because the rest of Bazel already relies on mtimes and other file metadata to determine changes to files. The rationale for this change is performance: once we have lost the in-memory file metadata (e.g. because of a flag flip), Bazel has to redigest all of the output files to recompute action cache keys. For a pathological case of rebuilding a large app with 5GB of outputs and then flipping the --[no]check_visibility flag on the command line, we get the following numbers before this change: ____Elapsed time: 11.170s, Critical Path: 8.34s ____Elapsed time: 11.027s, Critical Path: 8.20s ____Elapsed time: 11.084s, Critical Path: 7.46s ____Elapsed time: 11.051s, Critical Path: 6.61s ____Elapsed time: 11.211s, Critical Path: 7.81s ____Elapsed time: 10.884s, Critical Path: 8.20s ____Elapsed time: 11.385s, Critical Path: 8.12s ____Elapsed time: 11.723s, Critical Path: 8.18s ____Elapsed time: 11.327s, Critical Path: 7.73s ____Elapsed time: 11.028s, Critical Path: 7.89s And after this change: ____Elapsed time: 4.294s, Critical Path: 0.27s ____Elapsed time: 4.376s, Critical Path: 0.83s ____Elapsed time: 8.083s, Critical Path: 0.52s ____Elapsed time: 4.302s, Critical Path: 0.64s ____Elapsed time: 4.282s, Critical Path: 0.37s ____Elapsed time: 4.219s, Critical Path: 0.61s ____Elapsed time: 4.214s, Critical Path: 0.97s ____Elapsed time: 4.185s, Critical Path: 0.71s ____Elapsed time: 7.962s, Critical Path: 4.30s ____Elapsed time: 4.149s, Critical Path: 1.03s -- PiperOrigin-RevId: 150351444 MOS_MIGRATED_REVID=150351444
* Display an error message when there is a status command errorGravatar Kristina Chodorow2017-03-17
| | | | | | | | This was printing, fairly unhelpfully `ERROR: Process exited with status 127.` when the .sh file did not exist. -- PiperOrigin-RevId: 150344684 MOS_MIGRATED_REVID=150344684
* Consolidate JavaCompileAction command line flag handlingGravatar Liam Miller-Cushon2017-03-17
| | | | | | | | | Construct the command line flags in a single step. This is a follow-up to commit 58a5a7d5d765979eb06e7515a6935ea5fe34fb3b. -- PiperOrigin-RevId: 150341925 MOS_MIGRATED_REVID=150341925
* No longer crash when running "bazel help <rule>".Gravatar Florian Weikert2017-03-16
| | | | | | | | Fixes #2270. -- PiperOrigin-RevId: 150324978 MOS_MIGRATED_REVID=150324978
* Improve javadoc for the environment functions in the BuildConfiguration Gravatar Klaus Aehlig2017-03-16
| | | | | | | | | | | | In particular, emphasize that that both, the static and dynamic part of the configuration has to be collected to get the environment to be used by actions. -- Change-Id: I035def947d06dbd8f58460b5bf293b35a8ae038c Reviewed-on: https://cr.bazel.build/9373 PiperOrigin-RevId: 150319122 MOS_MIGRATED_REVID=150319122
* Change the UUID of actions consuming the set of build info keys.Gravatar Lukacs Berki2017-03-16
| | | | | | | | | | This should have been part of commit a068bd16d4dfa78516b85812177c1ccfec430fd1 which in itself causes problems if the Blaze version used changes because the language-specific header actions are then erroneously cached. Ideally, we'd add the set of build info headers into the key, but that's not available in computeKey(). The next best thing would be to reify them as artifacts, but that's a little too intrusive for the urgency of the issue. -- PiperOrigin-RevId: 150299218 MOS_MIGRATED_REVID=150299218
* Fix some bugs preventing the crosstool from making use of the min_version ↵Gravatar Googler2017-03-16
| | | | | | | | for darwin builds. -- PiperOrigin-RevId: 150252792 MOS_MIGRATED_REVID=150252792
* Stop Bazel from crashing on data-bound Android libraries with no resources.Gravatar Greg Estren2017-03-16
| | | | | | | | | | These libraries don't produce data binding outputs on resource processing (since there's nothing to process). Their only role is to pass through the outputs of their deps. -- PiperOrigin-RevId: 150251921 MOS_MIGRATED_REVID=150251921
* Remove support for --apk_signing_method=legacy_v1.Gravatar Adam Michael2017-03-16
| | | | | | | | The default has been v1 since late October. -- PiperOrigin-RevId: 150250180 MOS_MIGRATED_REVID=150250180
* Header thinning feature now ships the appropriate Apple SDK with header ↵Gravatar Googler2017-03-16
| | | | | | | | scanner tool to ensure that the correct headers are detected without building any assumptions into the tool. -- PiperOrigin-RevId: 150238621 MOS_MIGRATED_REVID=150238621
* Fix typo in help string for --action_envGravatar Klaus Aehlig2017-03-16
| | | | | | | | -- Change-Id: I3221e27e99c740b8ff2bdec8c242cc5cf30c16b5 Reviewed-on: https://cr.bazel.build/9375 PiperOrigin-RevId: 150229108 MOS_MIGRATED_REVID=150229108
* Refactor objc tests to test both crosstool/legacy. Legacy tests are madeGravatar Cal Peyser2017-03-16
| | | | | | | | | subclasses of crosstool tests, with tests that only work in the legacy case kept in that subclass. -- PiperOrigin-RevId: 150213251 MOS_MIGRATED_REVID=150213251
* 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
* Add ThinLTO support for py_binary targets.Gravatar Googler2017-03-16
| | | | | | | | | | | | Builds of py_binary targets were failing with --features=thin_lto during the link because the C++ source files were compiled into bitcode, but the link (which is set up by GooglePythonSemantics.java) did not have support for ThinLTO actions and attempted to do a native link of the bitcode objects. -- PiperOrigin-RevId: 150201765 MOS_MIGRATED_REVID=150201765
* Windows: update PATH for actions on WindowsGravatar Laszlo Csomor2017-03-16
| | | | | | | | | | | | | | If a SpawnAction executes a shell command, we need to fix PATH on Windows so it starts with "<msysroot>/bin;<msysroot>/usr/bin", otherwise bin utils like "find" would be found in the wrong places, e.g. as "c:/windows/system32/find.exe". Fixes https://github.com/bazelbuild/bazel/issues/2676 -- PiperOrigin-RevId: 150188402 MOS_MIGRATED_REVID=150188402
* Make AspectCompleteEvent an instance of BuildEvent Gravatar Klaus Aehlig2017-03-16
| | | | | | | | | | | | | | | In this way, we can also report the artifacts generated by aspects in the build event protocol. For the time being, those events are reported unsolicitly (i.e., as children of progress events), but they may be linked to pattern expansion later. -- Change-Id: I7fb83088d7fdb5424f77bfb78700e8371231b13c Reviewed-on: https://cr.bazel.build/9370 PiperOrigin-RevId: 150181433 MOS_MIGRATED_REVID=150181433
* Type strip Python sources when building a target incompatible with inlineGravatar Googler2017-03-14
| | | | | | | | annotations. -- PiperOrigin-RevId: 150088575 MOS_MIGRATED_REVID=150088575
* Fix inadvertent performance regression introduced by the recent rewrite of ↵Gravatar Nathan Harmata2017-03-14
| | | | | | | | | | | | | | | | | | 'blaze query'. The "streaming" callbacks used by some query functions, e.g. 'deps', make calls to QueryEnvironment#buildTransitiveClosure. For a cold blaze server, these calls do package loading via LabelVisitor (which calls into Skyframe via a top-level #evaluate call). So we'd prefer a single massive call which can make full use of blaze's loading-phase parallelism via Skyframe over a bunch of sequential small calls. For a hot blaze server, there are two problems: (1) LabelVisitor's meager up-to-date check isn't useful (as in we cannot reuse old visitations) when we do a whole bunch of small visitations instead of one massive one. (2) The actual work of the LabelVisitor (building up a portion of a temporary graph) isn't being effectively parallelized when we do it sequentially in small chunks. This issue is yet another subtle reason why the old BlazeQueryEnvironment#eval made sense (and why it was unfortunately not compatible with the streaming query evaluation model from the beginning). -- PiperOrigin-RevId: 150081619 MOS_MIGRATED_REVID=150081619
* Simplify Attribute.Configurator, add dynamic configs support.Gravatar Greg Estren2017-03-14
| | | | | | | | | | | | | | Specifically: 1) Read BuildOptions instead of BuildConfiguration 2) Remove unused extra parameters 1) is especially useful for dynamic configs. Before this change, dynamic configs just didn't support attribute configurators. This is because support would require Skyframe-instantiating temporary intermediate configurations, which is horribly awkward and would massively complicate Bazel's dependency evaluation logic. Using BuildOptions instead of BuildConfiguration completely eliminates the problem. As a bonus, dynamic configs can compose attribute configurators with any other transitions (including splits). This actually makes them more powerful than static configs. Whether anyone wants to use that composition is a different story, but that's now a policy decision vs. a technical limitation. This should also come in handy for RuleClass configurators, which will likely also leverage this. -- PiperOrigin-RevId: 150080977 MOS_MIGRATED_REVID=150080977
* Avoid expanding NestedSets in IterablesChain BuilderGravatar Michajlo Matijkiw2017-03-14
| | | | | | | | Iterables.isEmpty winds up expanding the NestedSet, which isn't cheap. -- PiperOrigin-RevId: 150079225 MOS_MIGRATED_REVID=150079225
* Make mobile-install work with --use_singlejar_apkbuilder.Gravatar Adam Michael2017-03-14
| | | | | | | | | | | All .dex files to include in the APK must now either be in a zip file or be named "classes.dex". Now with test coverage! -- PiperOrigin-RevId: 150074347 MOS_MIGRATED_REVID=150074347
* apple_binary scopes link artifacts using child configuration for ↵Gravatar Cal Peyser2017-03-14
| | | | | | | | --experimental_objc_crosstool=all -- PiperOrigin-RevId: 150066766 MOS_MIGRATED_REVID=150066766
* Simplify the logic in CppCompileAction#updateActionInputs().Gravatar Lukacs Berki2017-03-14
| | | | | | | | This way, we'll eventually get closer to the ideal world where inputs are clearly classified as either mandatory, prunable, discovered or discovered and prunable. -- PiperOrigin-RevId: 150061912 MOS_MIGRATED_REVID=150061912
* Refactor scheduling of LTO Backend actions into CppLinkActionBuilderGravatar Googler2017-03-14
| | | | | | | | | | | | This was suggested in the review for unknown commit, which adds ThinLTO support to another client of CppLinkActionBuilder. The change required changing the constructor to take a FdoSupportProvider object instead of a FdoSupport object, so required changes to all callers. -- PiperOrigin-RevId: 150060046 MOS_MIGRATED_REVID=150060046
* A partial, manual rollback of commit 7af14dfdbd6addb779226c0a103b2a8dc72c16b1.Gravatar Lukacs Berki2017-03-14
| | | | | | | | This became necessary because extra actions for C++ compile actions require .h files, but the compiler only returns the .pcm files in the .d file for headers that it reads from the .pcm file. This is not a problem for correctness because the .pcm files depend on the headers, but that doesn't help the extra actions that would then only get the .pcm files. -- PiperOrigin-RevId: 150052839 MOS_MIGRATED_REVID=150052839
* Global cleanup change.Gravatar Googler2017-03-14
| | | | | | -- PiperOrigin-RevId: 150052200 MOS_MIGRATED_REVID=150052200
* Global cleanup change.Gravatar Googler2017-03-14
| | | | | | -- PiperOrigin-RevId: 150052074 MOS_MIGRATED_REVID=150052074
* Global cleanup change.Gravatar Googler2017-03-14
| | | | | | -- PiperOrigin-RevId: 150051360 MOS_MIGRATED_REVID=150051360
* --Gravatar Carmi Grushko2017-03-14
| | | | | PiperOrigin-RevId: 150019356 MOS_MIGRATED_REVID=150019356
* Use platform-specific path separator for --dependencyManifests.Gravatar Adam Michael2017-03-14
| | | | | | | | | This is read by PathListConverter which uses java.io.File#pathSeparator which is already platform-specific. -- PiperOrigin-RevId: 150008708 MOS_MIGRATED_REVID=150008708
* Implement coverage support for experimental_objc_libraryGravatar Cal Peyser2017-03-14
| | | | | | -- PiperOrigin-RevId: 149997687 MOS_MIGRATED_REVID=149997687
* Fix broken linkGravatar Jon Brandvein2017-03-14
| | | | | | -- PiperOrigin-RevId: 149969486 MOS_MIGRATED_REVID=149969486
* Clarify the log lines used when a command is interrupted to more obviously ↵Gravatar Nathan Harmata2017-03-14
| | | | | | | | disambiguate the case where the blaze grpc client tells the blaze grpc server to cancel a running command (e.g. the blaze user ctrl+c's the blaze client) between the case a streaming rpc call gets cancelled (e.g. when the grpc client hangs up). -- PiperOrigin-RevId: 149960615 MOS_MIGRATED_REVID=149960615
* Adding a temporary flag to Bazel to allow Platform override from the commandGravatar Ola Rozenfeld2017-03-14
| | | | | | | | | | | | | line. This will be used during development to test new toolchains in docker containers. Example usage: --experimental_remote_platform_override='entry:{ name:"a" value:"b" } entry:{ name:"c" value:"d" }' TESTED=local server -- PiperOrigin-RevId: 149933081 MOS_MIGRATED_REVID=149933081
* Remove an unused method from CppCompileAction.Gravatar Lukacs Berki2017-03-14
| | | | | | -- PiperOrigin-RevId: 149930121 MOS_MIGRATED_REVID=149930121
* Remove ` characters from java_common documentationGravatar Irina Iancu2017-03-14
| | | | | | | | | | as they will not get properly formatted. See current https://bazel.build/versions/master/docs/skylark/lib/java_common.html -- PiperOrigin-RevId: 149915047 MOS_MIGRATED_REVID=149915047
* Fix missing type params for Java7Gravatar Mark Schaller2017-03-12
| | | | | | -- PiperOrigin-RevId: 149813927 MOS_MIGRATED_REVID=149813927
* Remove usage of SynchronizedBatchCallback findTargetsBeneathDirectoryAsync; ↵Gravatar Nathan Harmata2017-03-12
| | | | | | | | | | by design, the callback passed in there is thread safe. A previous change accidentally introduced this unnecessary synchronization. Also move SynchronizedBatchCallback to the file with its only current usage. -- PiperOrigin-RevId: 149809083 MOS_MIGRATED_REVID=149809083
* Improve query error msg when a package has a broken Skylark loadGravatar Mark Schaller2017-03-12
| | | | | | | | | | | | | | | | | | | | | | | | The error message logged during query (and build) when a package has a broken Skylark load statement was not specific. Previously, it said "package contains errors:" and then the package name. Also, this error message was not emitted when using SkyQueryEnvironment and evaluating a query containing a "TargetsBelowDirectory" pattern (such as //foo/...) when a package below the specified directory had such an error. The approach taken by this CL is to include any package loading error message in the SkyValue produced by CollectPackagesUnderDirectoryFunction, and report them during evaluation of a TargetsBelowDirectory pattern. RELNOTES: Evaluation of commands on TargetsBelowDirectory patterns (e.g. //foo/...) matching packages that fail to load now report more detailed error messages in keep_going mode. -- PiperOrigin-RevId: 149802362 MOS_MIGRATED_REVID=149802362
* Global cleanup change.Gravatar Googler2017-03-12
| | | | | | -- PiperOrigin-RevId: 149797374 MOS_MIGRATED_REVID=149797374
* Remove experimental Java min classpath optimizationGravatar Liam Miller-Cushon2017-03-12
| | | | | | -- PiperOrigin-RevId: 149789440 MOS_MIGRATED_REVID=149789440
* Configurably block errors from universe eval in query environmentsGravatar Mark Schaller2017-03-12
| | | | | | | | | | | | Universe evaluation only occurs in the SkyQueryEnvironment implementation. This setting is a no-op for other QueryEnvironment implementations. This support is needed to correctly test an upcoming bugfix. -- PiperOrigin-RevId: 149786616 MOS_MIGRATED_REVID=149786616
* Add the remote_execution_properties attribute to the platform() rule. Gravatar John Cater2017-03-12
| | | | | | | | | | Part of #2219. -- Change-Id: Id82bdd5b3dfab1d2ea781d27dd98020966ce8fac Reviewed-on: https://cr.bazel.build/9271 PiperOrigin-RevId: 149782572 MOS_MIGRATED_REVID=149782572
* A no-op refactoring of BazelJavaSemantics to create a separate internal ↵Gravatar Kush Chakraborty2017-03-10
| | | | | | | | | | class which handles the Classpath substitution, and slightly simplifying the logic to obtain the main class. This is a partial rollforward of commit 786cfa2ed980e278c42ee474408844f7e3720385 (without the scary changes!) -- PiperOrigin-RevId: 149759252 MOS_MIGRATED_REVID=149759252
* Add java_common.create_provider to allow creating a java_common.provider Gravatar Irina Iancu2017-03-10
| | | | | | | | | | from already compiled jars. Progress on #2614. -- PiperOrigin-RevId: 149750579 MOS_MIGRATED_REVID=149750579
* GitProgressMonitor: also post about progress Gravatar Klaus Aehlig2017-03-10
| | | | | | | | | | In this way, git clone progress will also be shown in the experimental UI. -- Change-Id: Ic6f0f437ef9c403f82265b5bd0fa9059bd2abb97 Reviewed-on: https://cr.bazel.build/9314 PiperOrigin-RevId: 149746428 MOS_MIGRATED_REVID=149746428
* Clean up *GccStrategyGravatar Ulf Adams2017-03-10
| | | | | | | | | - use SimpleSpawn in SpawnGccStrategy - set PWD in CppCompileAction for consistency -- PiperOrigin-RevId: 149745059 MOS_MIGRATED_REVID=149745059
* Also report the spawn from the remote strategyGravatar Ulf Adams2017-03-10
| | | | | | | | | | It's silly that we require every spawn strategy to do this individually, and the new spawn scheduler will fix this. However, it's useful to add this for debugging. -- PiperOrigin-RevId: 149743992 MOS_MIGRATED_REVID=149743992
* Add the appropriate cxx_builtin_include_directory entries for clang to the ↵Gravatar Adam Michael2017-03-10
| | | | | | | | | | | | | | | | | | | | Android NDK crosstool created by android_ndk_repository. Also, stop setting -isystem for the builtin include directories in the clang toolchains. Previously, we were incorrectly setting cxx_builtin_include_directory for clang toolchains to the gcc include directories. We were also setting -isystem on these directories, so when an Android build attempted to include an NDK header (like arm_neon.h), clang got gcc's version of that header. A followup change will stop setting -isystem for gcc. Fixes https://github.com/bazelbuild/bazel/issues/2601. Note that I intentionally did not attempt to fix the bug for NDK10. NDK10 is very old, defaults to GCC and contains two separate clang/LLVMs. As such, it would be more complicated to get right and test properly. Also adds an integration test that attempts to compile an NDK header with clang. This change does not entirely fix Tensorflow's Android sample app build with NDK13 (the motivation for https://github.com/bazelbuild/bazel/issues/2601), however I believe that the remaining fixes are on Tensorflow's side. E.g. setting -Wno-c++11-narrowing in copts. -- PiperOrigin-RevId: 149719100 MOS_MIGRATED_REVID=149719100
* Adds linkmaps to the AppleDebugOutputsProvider for them to be consumed by ↵Gravatar Sergio Campama2017-03-10
| | | | | | | | dependents. -- PiperOrigin-RevId: 149702529 MOS_MIGRATED_REVID=149702529