aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
Commit message (Collapse)AuthorAge
* C++: Rename CcCompilationInfo to CcCompilationContextInfo.Gravatar plf2018-04-03
| | | | | | | | | This is done so that the name CcCompilationInfo can be used for the C++ provider that will wrap all providers for compilation, similar to JavaInfo in Java. RELNOTES:none PiperOrigin-RevId: 191445120
* Automated rollback of commit e8bed799d59526541afa2a0e9ef5d4c49e3ba390.Gravatar corysmith2018-04-03
| | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Rolling forward with improved handling and testing for Styleables, and correct package management. *** Original change description *** Automated rollback of commit a76f7db51a90cc2e35c1d66782056c310729eef0. *** Reason for rollback *** Breaks Kix. *** Original change description *** Modify the .flat decompilation to account for multiple configurations by converting the aapt2 proto ConfigValue to a FolderConfiguration. Adds new aapt2 compiled deserialization test. RELNOTES: None PiperOrigin-RevId: 191444658
* Add stats about cache hits and execution strategies to Bazel's UI.Gravatar Googler2018-04-03
| | | | | | | Fixes: 2846 RELNOTES: Bazel now displays information about remote cache hits and execution strategies used in its UI after every build and test, and adds a corresponding line "process stats" to BuildToolLogs in BEP. PiperOrigin-RevId: 191441770
* Add methods to parse resources without assetsGravatar asteinb2018-04-03
| | | | | | | | | | | | | | - Add ParsedAndroidResources to wrap AndroidResources and resource parsing output. - Implement parse() method in AndroidResources, and support for it elsewhere - Move some supporting methods to the right place (setting up an aapt2 sdk for tests goes to the base test rule, and creating a dummy DataBinding zip goes to the DataBinding class). - Tests for new parse() method, including support for getting a test RuleContext instance RELNOTES: none PiperOrigin-RevId: 191436027
* Remove the unused method IdleServerTasks#continueProcessing() .Gravatar lberki2018-04-03
| | | | | | | IdleServerTasks could probably be implemented in a much simpler way, but let's keep this change a simple deletion. One step at a time. RELNOTES: None. PiperOrigin-RevId: 191418738
* Make the BUILD_TIMESTAMP build info entry contain the number of seconds ↵Gravatar lberki2018-04-03
| | | | | | | | | | | (instead of milliseconds) since the epoch. This fixes the build stamp data in Bazel itself and is also consistent with what we do internally at Google. Fixes https://github.com/bazelbuild/bazel/issues/4469 . RELNOTES[INC]: BUILD_TIMESTAMP now contains seconds (and not milliseconds) since the epoch. PiperOrigin-RevId: 191418132
* Remove CcToolchainProvider#getEnvironment() and all the supporting ↵Gravatar lberki2018-04-03
| | | | | | | | | | | infrastructure. This was added in unknown commit to provide a different environment to Apple toolchains, then its use removed in unknown commit in favor of getting the environment variables from the CToolchain proto. I haven't done my research if that's a better approach, but it looks like it (the less hard-coded stuff we have in Java, the better), but worst of all is surely to have *two* such mechanisms. RELNOTES: None. PiperOrigin-RevId: 191411878
* Remove Android jar from android_local_test bootclasspathGravatar ajmichael2018-04-02
| | | | | | | | | Instead, treat it as a regular compile-time library dependency. This fixes Java8 compilation in android_local_test. RELNOTES: None PiperOrigin-RevId: 191359834
* Remove some unnecessary params.Gravatar nharmata2018-04-02
| | | | | RELNOTES: None PiperOrigin-RevId: 191354727
* Serialize PythonUtils#GET_INIT_PY_FILES as a singleton so that object equalityGravatar cpeyser2018-04-02
| | | | | | holds in the check in Runfiles.Builder#merge. PiperOrigin-RevId: 191341008
* Moves the decision to enable memoization from codecs to the top-level ↵Gravatar shahan2018-04-02
| | | | | | | | invocation. Also, makes it benign to registerInitialValue when memoization is disabled. PiperOrigin-RevId: 191338253
* Add noneable=true to several parameters of list and dict methodsGravatar cparsons2018-04-02
| | | | | RELNOTES: None. PiperOrigin-RevId: 191329591
* Add codec for ImmutableMultimap.Gravatar cpeyser2018-04-02
| | | | PiperOrigin-RevId: 191323243
* Automated rollback of commit 9bfbefc13f2b6ae9a86fd46a8470e3b4cd8efd1a.Gravatar asteinb2018-04-02
| | | | | | | | | | | | | | *** Reason for rollback *** Roll forward with fix and test - turns out I didn't distinguish properly between list and item seperators. *** Original change description *** Rollback "Allow Merge action to take an interface as primary, not just ResourceContainer", as it breaks some android rule integration tests. RELNOTES: none PiperOrigin-RevId: 191322706
* Deduplicate the list of valid CPUsGravatar Googler2018-04-02
| | | | | RELNOTES: None. PiperOrigin-RevId: 191320863
* Rollback "Allow Merge action to take an interface as primary, not just ↵Gravatar cparsons2018-04-02
| | | | | | | ResourceContainer", as it breaks some android rule integration tests. RELNOTES: none PiperOrigin-RevId: 191304264
* Create proguard.txt in android_library AAR output.Gravatar ajmichael2018-04-02
| | | | | | | | | The proguard.txt is the concatenation of the proguard_specs on the android_library rule itself. Note that it does not include transitively defined proguard_specs. Fixes https://github.com/bazelbuild/bazel/issues/4467 RELNOTES: android_library AAR output now contains proguard.txt PiperOrigin-RevId: 191302610
* Change profiling to only accept strings for its "description" argument. ↵Gravatar janakr2018-04-01
| | | | | | Profiling can hold onto objects for the duration of the build, and some of those objects may be temporary that should not be persisted. In particular, UnixGlob and its inner classes should not outlive loading and analysis. For the most part, care was taken in this CL to only use strings that required no additional construction, mainly to minimize garbage (retaining references to newly created strings is not as great a concern since only the strings corresponding to the slowest K tasks are retained, for some relatively small values of K). Action descriptions for actually executing actions are eagerly expanded because that work is minimal compared to the work of actually executing an action. PiperOrigin-RevId: 191251488
* Enable bulk writes in the HttpBlobStoreGravatar ulfjack2018-04-01
| | | | | | | | | | Second attempt of https://github.com/bazelbuild/bazel/commit/0654620304728a5aecadd58138e96c41135d24e7, which I am rolling back. The problem is that FilterOutputStream.write is just plain wrong and we shouldn't inherit FilterOutputStream at all, but instead do it manually (which actually requires less code). This was a performance regression in https://github.com/bazelbuild/bazel/commit/deccc485603c004daad959fd747f1c0c9efc4f00. Fixed #4944. PiperOrigin-RevId: 191215696
* build and test KeepScanner tool open-sourceGravatar kmb2018-03-30
| | | | PiperOrigin-RevId: 191159996
* BEP: Cached test actions post execution info from TestResultGravatar ulfjack2018-03-30
| | | | | | Currently, the TestResult does not have an execution info, but that may change in the future. PiperOrigin-RevId: 191148241
* BEP: Report the correct exit code for blaze coverageGravatar ulfjack2018-03-30
| | | | | | The BuildEventStreamer was checking the command name for the exact string "test" for test-specific handling, even though coverage is also a test command. PiperOrigin-RevId: 191137755
* Automated rollback of commit 0654620304728a5aecadd58138e96c41135d24e7.Gravatar ulfjack2018-03-30
| | | | | | | | | | | | | | | | *** Reason for rollback *** Not a proper fix. *** Original change description *** Enable bulk writes in the HttpBlobStore This was a performance regression in https://github.com/bazelbuild/bazel/commit/deccc485603c004daad959fd747f1c0c9efc4f00. Fixed #4944. PiperOrigin-RevId: 191133416
* Don't test for reference equality of the underlying IOException. It's ↵Gravatar nharmata2018-03-30
| | | | | | | overkill for these unit tests. RELNOTES: None PiperOrigin-RevId: 191122418
* Improve performance and output of bazel_determinism_test.Gravatar Philipp Wollermann2018-03-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't ask me how so many things can be wrong in a single test... Progress towards #4770. FYI @rupertks @buchgr @ulfjack ## Replace 25000 invocations of perl with a single "sha256sum" This speeds up the test by a factor 2x on my iMac (before: 1200s, now: 600s). On macOS, "shasum" is a Perl script. Instead of simply passing all input files to the thing at once, we were invoking it once per file. This means roughly 25,000 invocations of Perl per test run. And it's even worse - it wasn't just a call to that Perl script, it was wrapped in a "cat | shasum | cut" pipeline, resulting in silent data loss when you accidentally passed multiple input files to the thing, 75,000 processes being spawned just to compute hashes and losing the file name of what was actually hashed. WTF. Also, we were using SHA256 to essentially verify that two directory trees are equal. For this purpose, relying on SHA1 should be absolutely fine - and that is, provided by a good native implementation, four times faster than `shasum`. It saves another 10 seconds of the overall run. With this change, the test also prints the result of a failed determinism check in an easier to read format "filename hash" instead of "hash filename" and on top of that, it also prints the filenames in the diff on macOS, which was missing formerly. Without this, it was basically impossible to debug failures of this test on macOS, as you couldn't see *which files were different*. You had *one* job, bazel_determinism_test. Before: ``` -- Test log: ----------------------------------------------------------- --- /private/var/tmp/_bazel_buildkite/30004132848cb6cbb0d8bc124cd9712b/bazel-sandbox/8820973750646175047/execroot/io_bazel/_tmp/e503f3f3df14b71e247bc3d7d9bf3608/sum1 2018-03-28 18:00:43.000000000 +0000 +++ /private/var/tmp/_bazel_buildkite/30004132848cb6cbb0d8bc124cd9712b/bazel-sandbox/8820973750646175047/execroot/io_bazel/_tmp/e503f3f3df14b71e247bc3d7d9bf3608/sum2 2018-03-28 18:10:34.000000000 +0000 @@ -10417,0 +10418 @@ +ecd53ba69a8d479d3fa4234e959f869cd10f7ebc68860d2b7915879f8b8b2c54 @@ -10605 +10605,0 @@ -f1954b59039b74d0a0ee3b2bced748604b95b8455a5bf80489296bd81878a5c8 ------------------------------------------------------------------------ ``` Now (I artificially introduced non-hermeticism to show how a failure would look like): ``` -- Test log: ----------------------------------------------------------- --- /private/var/tmp/_bazel_philwo/7a01905b4627ca044e5e3f5ad5b14d26/bazel-sandbox/5464595340038418595/execroot/io_bazel/_tmp/e503f3f3df14b71e247bc3d7d9bf3608/sum1 2018-03-30 17:12:39.000000000 +0000 +++ /private/var/tmp/_bazel_philwo/7a01905b4627ca044e5e3f5ad5b14d26/bazel-sandbox/5464595340038418595/execroot/io_bazel/_tmp/e503f3f3df14b71e247bc3d7d9bf3608/sum2 2018-03-30 17:17:27.000000000 +0000 @@ -903 +903 @@ -bazel-bin/src/bazel 31d811338ca364f0631560dd4d29406dd6a778ce +bazel-bin/src/bazel 8f009173894730b00a1d1d6349af7d10f4d21cf3 @@ -5656 +5656 @@ -bazel-bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar f5ec8c4415ad8ecdc0385affc68f2dd4dbf241ef +bazel-bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar 9899ae35cf431087a34a830bfdaf19d99616689c @@ -8343 +8343 @@ -bazel-bin/src/main/java/com/google/devtools/build/lib/worker/_javac/worker/libworker_classes/com/google/devtools/build/lib/worker/WorkerFactory.class 780baa17c19ef99ef0b9291db1791ed8e0f1b231 +bazel-bin/src/main/java/com/google/devtools/build/lib/worker/_javac/worker/libworker_classes/com/google/devtools/build/lib/worker/WorkerFactory.class d45c14f09e73e7fcdf01f96aa32646c87b704bc2 @@ -8359 +8359 @@ -bazel-bin/src/main/java/com/google/devtools/build/lib/worker/libworker.jar 60e3afbfec17da7e44c1f0f61cf2a446196717be +bazel-bin/src/main/java/com/google/devtools/build/lib/worker/libworker.jar 70f557e87d1b32b2e46c79554fe6bf3b89aeaf6e @@ -11343 +11343 @@ -bazel-genfiles/src/install_base_key 3fad754e4ea19bd1120df5bf16e1f39372e6b9fe +bazel-genfiles/src/install_base_key 7d7e8b62493912c5ec153032e104640e3980e6b3 @@ -11376 +11376 @@ -bazel-genfiles/src/package.zip 1ce3431b021ca338806162eca72ff84118001df5 +bazel-genfiles/src/package.zip 65f4801d91bbe10cba0d2d4d55c7cf319cd6722d ------------------------------------------------------------------------ test_determinism FAILED: Non-deterministic outputs found! . ``` ## Remove obsolete check for BAZEL_TEST_XTRACE That string does not appear anywhere in our repo, except for these two lines in the test, so there's no point in checking for it. ## Remove obsolete check for Java 7 That was about time. ## Performance improvements and usability fixes - There's no need to use mktemp to create a unique directory under TEST_TMPDIR, as every test suite has its own TEST_TMPDIR. - There's no need to remove stuff, as this will just degrade performance and make debugging harder. The surrounding Bazel or system will clean up later. - There's no need to copy bazel-bin/src/bazel to ./bazel1 before calling it, as you can just call the built bazel from its original location. - There's no need to run "bazel clean" before the second "bazel build" invocation - it's better to just use two separate output_bases. This is faster and also makes debugging easier, as you can compare the two output_bases in case of a test failure. - There's no need to call "diff" twice - we can just save the output immediately in the `if` block. Closes #4945. PiperOrigin-RevId: 191118833
* Migrate SkylarkDict and MutableList methods to use @SkylarkCallable instead ↵Gravatar cparsons2018-03-30
| | | | | | | of @SkylarkSignature. RELNOTES: None. PiperOrigin-RevId: 191112273
* Enforce @SkylarkCallable must have a non-empty doc string or explicitly be ↵Gravatar cparsons2018-03-30
| | | | | | | documented=false. RELNOTES: None. PiperOrigin-RevId: 191112140
* Enable bulk writes in the HttpBlobStoreGravatar ulfjack2018-03-30
| | | | | | | | This was a performance regression in https://github.com/bazelbuild/bazel/commit/deccc485603c004daad959fd747f1c0c9efc4f00. Fixed #4944. PiperOrigin-RevId: 191109352
* Make RuleClass serializable and remove Environment from it, since it was ↵Gravatar janakr2018-03-30
| | | | | | | | only being used for the transitive hash code and transitive label of its globals, which can be passed in explicitly. Assert along the way that the transitive label of its globals is always non-null. That is currently the case, although there seems to be no hard invariant of the system that it is true. Might as well tighten it now. PiperOrigin-RevId: 191103310
* Remove category checking from incompatible changes.Gravatar ccalvarin2018-03-30
| | | | | | | String categories are deprecated, replace this special-cased value with a specific OptionMetadata tag, TRIGGERED_BY_ALL_INCOMPATIBLE_CHANGES. RELNOTES: None. PiperOrigin-RevId: 191069412
* Make the client's java startup command line list all startup options.Gravatar ccalvarin2018-03-30
| | | | | | | | | | | We expect that the client passes all startup options to the server, default or explicit. The server's listing of default values should not matter. Yet for a number of these options, the default value in the server was relied upon, because the server command line was not constructed with the client's default value included. Fix visible cases of this, long term this should be tested for, so the invariant is not broken again. This has been the documented expectation for a long time, but a number of violations have crept up over time. Update the comments that lead to this expectation to be more realistic. Add debug statement that shows which options are changed when startup options cause the server to be restarted. The detailed logs will only be seen if --client_debug is set to TRUE. RELNOTES: None. PiperOrigin-RevId: 191066983
* Automated rollback of commit a76f7db51a90cc2e35c1d66782056c310729eef0.Gravatar corysmith2018-03-30
| | | | | | | | | | | | | | *** Reason for rollback *** Breaks Kix. *** Original change description *** Modify the .flat decompilation to account for multiple configurations by converting the aapt2 proto ConfigValue to a FolderConfiguration. Adds new aapt2 compiled deserialization test. RELNOTES: None PiperOrigin-RevId: 191058952
* add singlejar variant to bazel that includes Android desugar dependency checkingGravatar kmb2018-03-29
| | | | PiperOrigin-RevId: 190999682
* Make indenting consistent in android_local_test docs.Gravatar ajmichael2018-03-29
| | | | | | | Also add missing comma in BUILD file. RELNOTES: None PiperOrigin-RevId: 190994359
* This change adds the writing of the remote execution log to a file behind an ↵Gravatar Googler2018-03-29
| | | | | | experimental flag. It also adds a logging handler for Execute calls so that they are logged. PiperOrigin-RevId: 190991493
* Modify the .flat decompilation to account for multiple configurations by ↵Gravatar corysmith2018-03-29
| | | | | | | | | converting the aapt2 proto ConfigValue to a FolderConfiguration. Adds new aapt2 compiled deserialization test. RELNOTES: None PiperOrigin-RevId: 190976708
* Allow Merge action to take an interface as primary, not just ResourceContainerGravatar asteinb2018-03-29
| | | | | | | | | | | | | | In future reviews, we will use this to be able to pass assets and resources individually. Introduce replacement for ResourceContainerConverter that can handle generics and should be about as flexible. To support that replacement, slightly improve how CustomCommandLine handles generics. RELNOTES: none PiperOrigin-RevId: 190970298
* Support source versions newer than 8 in Bazel's annotation processorsGravatar cushon2018-03-29
| | | | | | This quiets some build warnings. PiperOrigin-RevId: 190958692
* Remove Target from TargetPatternPhaseValue. Use the sets of targets that ↵Gravatar mjhalupka2018-03-29
| | | | | | | | would have been in TargetPatternPhaseValue to construct Postables that would use information from the TargetPatternPhaseValue. Tag TargetPhasePatternValue with @AutoCodec. PiperOrigin-RevId: 190958515
* Remove pdie.Gravatar ccalvarin2018-03-29
| | | | | | | pdie and die are pretty similar, pdie just adds the errno string or equivalent from GetLastErrorString(). Make this explicit. This makes message formatting more clear in preparation for moving these all to BAZEL_LOG. RELNOTES: None. PiperOrigin-RevId: 190957255
* Pass resources and assets seperately into parse and compile actionsGravatar asteinb2018-03-29
| | | | | | | | | | | This will eventually allow us to parse or compile assets and resources separately. Also, remove a no-op null check that was making the code confusing, and some unneeded resource filtering that was doing the same. RELNOTES: none PiperOrigin-RevId: 190951667
* Allow setting the value which BazelPackageLoader returns for ↵Gravatar carmi2018-03-29
| | | | | | | | | native.bazel_version. This allows it to work in workspaces that use https://github.com/bazelbuild/bazel-skylib/blob/a5e23fd4c0b766f38f80d5edf10073ce990b2fa1/lib/versions.bzl RELNOTES: None PiperOrigin-RevId: 190950709
* Fixing issue with external j2objc protos (reattempt at #4058)Gravatar Mike Lewis2018-03-29
| | | | | | | | | | | | | | | | | | This is a re-attempt at https://github.com/bazelbuild/bazel/pull/4058 which got reverted via https://github.com/bazelbuild/bazel/issues/4780 #4780 was being caused because cc plugin and j2objc plugin used different paths for outputs. I also manually verified that this works for both external cc_proto_librarys and external j2objc java_proto_libraries. The output files are created without a repository, but the expected filenames have them This resolves issues when having a proto_library from an external build file. cc @c-parsons @pmbethe09 Closes #4793. PiperOrigin-RevId: 190950452
* Rename LocalResourceContainer to AndroidResources and remove asset code from itGravatar asteinb2018-03-29
| | | | | | | | | | | | | As part of decoupling Android resources and assets, rename LocalResourceContainer to AndroidResources and remove asset code from it. Some general asset and manfiest code still remains and will be dealt with in future changes. Remove LocalResourceContainer from the ParsingActionBuilder, since it's always used to build the ResourceContainer that is subsequently passed in. RELNOTES: none PiperOrigin-RevId: 190945260
* Remove startup JVM version checkGravatar cushon2018-03-29
| | | | | | | | | | | | This was added during the JDK 7->8 transition to improve the diagnostic when an older-than-supported host_javabase was used. The version number handling doesn't work with JDK 9 (see [1]), and using Bazel binaries with a bundled host_javabase avoid the error entirely so the message is less important. [1] http://openjdk.java.net/jeps/223 PiperOrigin-RevId: 190944476
* Split AndroidAssets class out of LocalResourceContainerGravatar asteinb2018-03-29
| | | | | | | | | | AndroidAssets will be the new home for asset-related code (including, in the future, from ResourceContainer). This is the first step towards decoupling Android asset and resource processing. LocalResourceContainer will be replaced with resource-specific code in the next change. RELNOTES: none PiperOrigin-RevId: 190936954
* C++: Remove headers from input to linking action.Gravatar plf2018-03-29
| | | | | | | | | Headers were made an input to the linking action simply to get an error when we have a src-less cc_library with declared but missing headers. Since there was no compilation action, the headers were not an input to any action and there was no error when the files were missing. After discussing it with the team, it was decided that this is not needed anymore. Files can be missing as long as they are not consumed. RELNOTES:none PiperOrigin-RevId: 190915591
* Rename Blaze -> Bazel in Cpp optionsGravatar andy g scott ?2018-03-29
| | | | | | Closes #4909. PiperOrigin-RevId: 190895706
* Use SpawnResult.getWallTime for test duration if availableGravatar ulfjack2018-03-28
| | | | | | | | Note that the wall time is not always set, especially for cached or remotely executed actions, so we keep the current code around for now. Progress on #4808. PiperOrigin-RevId: 190857756
* Introduce FastHotKeyAtomicLongMap#getCounter. This is useful for when ↵Gravatar nharmata2018-03-28
| | | | | | | clients have a particular super-hot key, and want to avoid the cpu cost of doing a map lookup. RELNOTES: None PiperOrigin-RevId: 190848508