aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main
Commit message (Collapse)AuthorAge
* Automated rollback of commit 71479d3ef1627a30b9ec75ca50e6a90cf7db6377.Gravatar ruperts2018-07-27
| | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** http://https://github.com/bazelbuild/bazel/commit/71479d3ef1627a30b9ec75ca50e6a90cf7db6377 broke thousands of targets in the nightly, notably: //abuse/ares/rulesystem/generator/python/rule_set:main (x1754) //net/encapdecap/common/templates:gen_dr_scopes (x903) //testing/cloud/vex/public:vex_main_internal (x782) //wireless/android/play/playlog/server:playlog_server (x401) *** Original change description *** C++: Removes calls to setCcLinkparamsStore of CcLinkingInfo.Builder This is in preparation for deleting CcLinkParamsStore. All remaining calls to the setCcLinkparamsStore method of the CcLinkingInfo builder have been removed. RELNOTES:none PiperOrigin-RevId: 206361808
* Automated rollback of commit 7e87730de985b7099b9b683571d58efdaab70890.Gravatar ccalvarin2018-07-27
| | | | | | | | | | | | | | | | | *** Reason for rollback *** Go back to the default constructor - instead of requiring everywhere to know the correct hash function, we'll have the default rely on global state. It will make transition easier, even if it makes the origin of the hash less obvious. *** Original change description *** Remove default MD5 in most of Bazel's virtual filesystems. This forces the ex-default to be explicit in a lot of tests, but I'd rather that than have the risk of implicit md5-use in production code. To keep this CL smaller, do not remove the default from UnixFS quite yet. RELNOTES: None. PiperOrigin-RevId: 206358838
* Automated rollback of commit db01c6f926bcb4774d901797c59f51dd54c05624.Gravatar janakr2018-07-27
| | | | | | | | | | *** Reason for rollback *** Rolling forward with fixes. *** Original change description *** PiperOrigin-RevId: 206339696
* Simplify tree artifact directory check, and avoid an extra system call.Gravatar felly2018-07-27
| | | | | | RELNOTES: None PiperOrigin-RevId: 206328416
* 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
* Update ProjectFileSupport to take an OptionsParser.Gravatar Googler2018-07-27
| | | | | RELNOTES: None. PiperOrigin-RevId: 206310700
* Add an option to compress the JSON trace profile.Gravatar twerth2018-07-27
| | | | | | | chrome://tracing is able to load gzipped profiles out of the box. RELNOTES: None PiperOrigin-RevId: 206308018
* Add a flag to split test.xml generation into a separate SpawnGravatar ulfjack2018-07-27
| | | | | | | | | | At this time, this is only implemented for the StandaloneTestStrategy. This solves a race condition on Posix-like systems, where we cannot guarantee that the pipes are actually fully flushed to disk when the test process exits, and this can cause the test.xml to be empty, which makes it hard to debug issues. (The test.log files do not show up in normal CI systems, only the test.xml files.) Progress on #4608. PiperOrigin-RevId: 206292179
* Experimental UI: on limited output, reserve capacity for post-build statusGravatar Klaus Aehlig2018-07-27
| | | | | | | | | | | | | When the experimental UI is asked to limit its overall output, reserve a certain fraction for output to be generated after the build is complete. In this way, at least a final status, or a bit of the test summary, is shown. Also, to help staying within the limit also for small limits, from a certain threshold onwards, more severely restrict the output we allow for each individual action. Change-Id: I912aec0dd17639d9864133a10359f93537b473ad PiperOrigin-RevId: 206288651
* Remove load() from contents.Gravatar Googler2018-07-26
| | | | | | | This was missed in earlier patch. RELNOTES: None. PiperOrigin-RevId: 206276771
* Generalize fix to not emit a -gensrc.jar if the annotation processor ↵Gravatar cushon2018-07-26
| | | | | | | | classpath is non-empty but there are no annotation processors to run. PiperOrigin-RevId: 206244327
* Fix skydoc following of nontrivial relative labels.Gravatar cparsons2018-07-26
| | | | | | | Previously, only trivial relative paths (within the same package) were handled correctly. Now paths such as ":foo/bar.bzl" are handled appropriately. RELNOTES: None. PiperOrigin-RevId: 206237161
* Don't retain memory used by Artifact->owner Label multimap after it's been ↵Gravatar janakr2018-07-26
| | | | | | used at the start of execution. PiperOrigin-RevId: 206230049
* Remove default MD5 in most of Bazel's virtual filesystems.Gravatar ccalvarin2018-07-26
| | | | | | | | | This forces the ex-default to be explicit in a lot of tests, but I'd rather that than have the risk of implicit md5-use in production code. To keep this CL smaller, do not remove the default from UnixFS quite yet. RELNOTES: None. PiperOrigin-RevId: 206223521
* Modify --subcommands to allow pretty printing the arguments of a subcommandGravatar ahumesky2018-07-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | as a list, rather than as a single line (i.e., newline delimited rather than space delimited). Before: SUBCOMMAND: # //src/main/java/com/google/devtools/build/lib:string_util [action 'Building src/main/java/com/google/devtools/build/lib/libstring_util.jar (2 source files) [for host]'] (cd /tmp/devbazel_output_base/execroot/io_bazel && \ exec env - \ LC_CTYPE=en_US.UTF-8 \ external/embedded_jdk/bin/java -XX:+UseParallelOldGC -XX:-CompactStrings '--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED' '--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED' '--patch-module=java.compiler=external/bazel_tools/third_party/java/jdk/langtools/java_compiler.jar' '--patch-module=jdk.compiler=external/bazel_tools/third_party/java/jdk/langtools/jdk_compiler.jar' '--add-opens=java.base/java.nio=ALL-UNNAMED' -jar external/bazel_tools/tools/jdk/JavaBuilder_deploy.jar @bazel-out/host/bin/src/main/java/com/google/devtools/build/lib/libstring_util.jar-2.params) After: SUBCOMMAND: # //src/main/java/com/google/devtools/build/lib:string_util [action 'Building src/main/java/com/google/devtools/build/lib/libstring_util.jar (2 source files) [for host]'] (cd /tmp/devbazel_output_base/execroot/io_bazel && \ exec env - \ LC_CTYPE=en_US.UTF-8 \ external/embedded_jdk/bin/java \ -XX:+UseParallelOldGC \ -XX:-CompactStrings \ '--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED' \ '--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED' \ '--add-exports=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED' \ '--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED' \ '--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED' \ '--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED' \ '--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED' \ '--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED' \ '--patch-module=java.compiler=external/bazel_tools/third_party/java/jdk/langtools/java_compiler.jar' \ '--patch-module=jdk.compiler=external/bazel_tools/third_party/java/jdk/langtools/jdk_compiler.jar' \ '--add-opens=java.base/java.nio=ALL-UNNAMED' \ -jar \ external/bazel_tools/tools/jdk/JavaBuilder_deploy.jar \ @bazel-out/host/bin/src/main/java/com/google/devtools/build/lib/libstring_util.jar-2.params) RELNOTES: --subcommands can now take a "pretty_print" value ("--subcommands=pretty_print") to print the arguments of subcommands as a list for easier reading. PiperOrigin-RevId: 206213009
* Keep track of tree artifact inputs in CustomCommandLine.Builder .Gravatar Googler2018-07-26
| | | | PiperOrigin-RevId: 206203357
* Make skydoc java binary publicly visible.Gravatar cparsons2018-07-26
| | | | | RELNOTES: None. PiperOrigin-RevId: 206195789
* Make timestamps of InternalOrderedBuildEvent immutable.Gravatar Googler2018-07-26
| | | | | | Similar to the sequence number, the timestamp should be immutable and computed when the event is enqueued (not at serialization time). PiperOrigin-RevId: 206186036
* Fix databinding after ↵Gravatar cushon2018-07-26
| | | | | | https://github.com/bazelbuild/bazel/commit/9b29a1bd7bbe37500b28a6508cb82ca1943c75b5 PiperOrigin-RevId: 206182289
* PiperOrigin-RevId: 206181674Gravatar shahan2018-07-26
|
* Target pattern eval: use the same number of threads as loadingGravatar ulfjack2018-07-26
| | | | | | | | Instead of using the default thread pool size of 200, use the number set for the loading phase. This is in preparation for interleaving the loading and target pattern eval phases. PiperOrigin-RevId: 206172915
* Use the path resolver when dealing with tree artifacts.Gravatar felly2018-07-26
| | | | | RELNOTES: None PiperOrigin-RevId: 206157591
* Add a flag to make Apple rules not share C++ compile actions.Gravatar lberki2018-07-26
| | | | | | | | | | | | | | | | | | | This is accomplished by: - Setting the APPLE_CROSSTOOL configuration distinguisher in AppleCrosstoolTransition - Doing nothing in AppleCrosstoolTransition in case we are already in an Apple configuration so that funky use cases like a binary having a dependency on a swift_library both directly and through an objc_library work - Adding the "apl-" prefix to the output directory name in APPLE_CROSSTOOL configurations Plus a few minor cleanups: - Removed some unused methods - Nopped out --enable_apple_crosstool_transition if the new flag is set - Nopped out --target_uses_apple_crosstool if the new flag is set These latter reduce the possible space of Apple configurations, thus making the code a bit more comprehensible. RELNOTES: None. PiperOrigin-RevId: 206157413
* Add the .py3 extension as a valid Python source.Gravatar Googler2018-07-26
| | | | | RELNOTES: None. PiperOrigin-RevId: 206156886
* Reduce the set of profiler events for the json profileGravatar ulfjack2018-07-26
| | | | | | | This significantly reduces the size of the resulting profiles. Do we need the events that I remove? What do we do with the data? Who knows? PiperOrigin-RevId: 206153368
* C++: Removes calls to setCcLinkparamsStore of CcLinkingInfo.BuilderGravatar plf2018-07-26
| | | | | | | | This is in preparation for deleting CcLinkParamsStore. All remaining calls to the setCcLinkparamsStore method of the CcLinkingInfo builder have been removed. RELNOTES:none PiperOrigin-RevId: 206128439
* 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 ce8f52060e2cf1e5a49a522039f0cba2a340f7e3.Gravatar cushon2018-07-25
| | | | PiperOrigin-RevId: 206102499
* Remove the gen_jars output groupGravatar cushon2018-07-25
| | | | | RELNOTES: Removed the gen_jars output group PiperOrigin-RevId: 206092599
* Cache default parameter values for skylark methods, and compute types of ↵Gravatar cparsons2018-07-25
| | | | | | | | | Param annotations only once. This change has been manually verified to greatly reduce analysis time (~50%) on very large builds, as it mitigates a previous regression brought on by the migration of @SkylarkSignature to @SkylarkCallable. RELNOTES: None. PiperOrigin-RevId: 206063684
* Weave the artifact path resolver through the Spawn execution context.Gravatar felly2018-07-25
| | | | | RELNOTES: None PiperOrigin-RevId: 206063489
* Automated rollback of commit 16dde0de06a3a4157a13e7e7264afeb6a50b2dde.Gravatar janakr2018-07-25
| | | | | | | | *** Reason for rollback *** Crash (see linked bug). PiperOrigin-RevId: 206060905
* [Perf] Remove unnecessary ImmutableMap.copyOf invocation.Gravatar Taras Tsugrii2018-07-25
| | | | | | | | | `keyWordArgs` is already `ImmutableMap<String, Object>` and `copyOf` contains enough overhead to show up on parse profiles. Closes #5651. PiperOrigin-RevId: 206051798
* [Skylark] Support dictionaries in structs when serializing them using ↵Gravatar Taras Tsugrii2018-07-25
| | | | | | | | | | | | | | | | | struct.to_json. Dictionaries are frequently used for generic configuration descriptions especially given that `struct` is not allowed in build files. In order to be JSON-compatible, only dictionaries with string keys are allowed. Technically Python also allows integers and booleans by automatically converting them to strings, but this is confusing and not necessarily a good thing to do. Fixes #5542 Closes #5543. PiperOrigin-RevId: 206049754
* Expose the JavaConfiguration get fields to Skylark for the android_sdk rule.Gravatar Googler2018-07-25
| | | | | RELNOTES: none. PiperOrigin-RevId: 206035881
* Allow the AndroidResourcesInfo to be created from Skylark.Gravatar Googler2018-07-25
| | | | | RELNOTES: none. PiperOrigin-RevId: 206035420
* Remove unused method "hasActionFilesystem()".Gravatar felly2018-07-25
| | | | | | RELNOTES: None PiperOrigin-RevId: 206021118
* 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
* Add a --server_javabase startup option as an alias for the LHS --host_javabaseGravatar cushon2018-07-25
| | | | | | | | | | to avoid confusion between the LHS and RHS host_javabases. The LHS --host_javabase option should be considered deprecated and will eventually be removed. RELNOTES: Rename the startup flag --host_javabase to --server_javabase to avoid confusion with the build flag --host_javabase PiperOrigin-RevId: 206015757
* Use the single-string arg formatter for param file format.Gravatar tomlu2018-07-25
| | | | | | | This avoids bazel crashes for illegally formatted strings. Previously the code would assume that a correct string was passed with only minimal validation. RELNOTES: None PiperOrigin-RevId: 206012819
* Experimental UI: only write on flush for limited outputGravatar Klaus Aehlig2018-07-25
| | | | | | | | | | When there is a hard limit on the output of the experimental UI, change the behavior to only write to the underlying stream on flush. In this way, we can avoid semantically incomplete writes at the moment we run out of characters. Change-Id: I024c776ae2139d76d380bb89d13b8fe61d6cfe51 PiperOrigin-RevId: 206000817
* 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
* Use a structured Exception type for the "unexpected short read" error ↵Gravatar nharmata2018-07-25
| | | | | | | detected by FileSystemUtils#readWithKnownFileSize. RELNOTES: None PiperOrigin-RevId: 205995852
* Remove LoadingResultGravatar ulfjack2018-07-25
| | | | | | | | | | | Instead, refactor the code to use TargetPatternPhaseValue exclusively. This removes the need to convert from TargetPatternPhaseValue to LoadingResult, and prepares for interleaving. It also reduces the number of Skyframe calls which may speed up null builds a bit, as a followup for https://github.com/bazelbuild/bazel/commit/1067310e18cb9ac203110726de0be53bdc403cea. PiperOrigin-RevId: 205989338
* Add the thread name as metadata to the Json profileGravatar ulfjack2018-07-25
| | | | PiperOrigin-RevId: 205985818
* Remove AbstractQueueVisitor.runConcurrently and .activeParallelTasks whichGravatar Googler2018-07-25
| | | | | | | aren't used anymore. RELNOTES: None. PiperOrigin-RevId: 205984908
* Fake a JavaStrictCompilationArgsProvider if there's none.Gravatar twerth2018-07-25
| | | | | | | | | There were convoluted cases with multiple JavaInfo created from Skylark that didn't have the JavaStrictCompilationArgsProvider. If these were to be merged and later forwarded with exports we would miss them as dependencies. RELNOTES: None PiperOrigin-RevId: 205980933
* Skip invalidation entirely if the diff is emptyGravatar ulfjack2018-07-25
| | | | PiperOrigin-RevId: 205980620
* remote: fix race on download error. Fixes #5047Gravatar buchgr2018-07-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | For downloading output files / directories we trigger all downloads concurrently and asynchronously in the background and after that wait for all downloads to finish. However, if a download failed we did not wait for the remaining downloads to finish but immediately started deleting partial downloads and continued with local execution of the action. That leads to two interesting bugs: * The cleanup procedure races with the downloads that are still in progress. As it tries to delete files and directories, new files and directories are created and that will often lead to "Directory not empty" errors as seen in #5047. * The clean up procedure does not detect the race, succeeds and subsequent local execution fails because not all files have been deleted. The solution is to always wait for all downloads to complete before entering the cleanup routine. Ideally we would also cancel all outstanding downloads, however, that's not as straightfoward as it seems. That is, the j.u.c.Future API does not provide a way to cancel a computation and also wait for that computation actually having determinated. So we'd need to introduce a separate mechanism to cancel downloads. RELNOTES: None PiperOrigin-RevId: 205980446