aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build
Commit message (Collapse)AuthorAge
* Extract ActionContext to a top-level classGravatar ulfjack2017-06-19
| | | | PiperOrigin-RevId: 159423459
* Make equality, comparison and 'in' operators not associative.Gravatar laurentlb2017-06-19
| | | | | | | | | | | | I'm not using a --incompatible-change flag because it's not available in the parser. We could pass it, but I think this is trivial to fix and unlikely to happen in real code (if it does, there was most likely a bug). RELNOTES[INC]: Operators for equality, comparison, 'in' and 'not in' are no longer associative, e.g. x < y < z is now a syntax error. Before, it was parsed as: (x < y) < z. PiperOrigin-RevId: 159422042
* Rewrite the Executor/ActionExecutionContext splitGravatar ulfjack2017-06-19
| | | | | | | Move everything to ActionExecutionContext, and drop Executor whereever possible. This clarifies the API, makes it simpler to test, and simplifies the code. PiperOrigin-RevId: 159414816
* Roll forward R generation for Robolectric behind a flag to enable testingGravatar Googler2017-06-19
| | | | | RELNOTES: none PiperOrigin-RevId: 159263527
* Close file handles in ActionCache before bazel cleanGravatar Yun Peng2017-06-19
| | | | | | | Fixed https://github.com/bazelbuild/bazel/issues/3043 Change-Id: Ibbe6ba945bbd439cd84676fcb7fd7ecbbb99e5f0 PiperOrigin-RevId: 159261292
* Automated g4 rollback of commit 923d7df521f67d031b288180560848bd35e20976.Gravatar brandjon2017-06-19
| | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks dozens of targets in the nightly with Tool Failure errors *** Original change description *** Clean up turbine action creation Support disabling javac fallback for actions without a direct classpath, and only use the 'JavacTurbine' mnemonic for spawns that require javac-turbine due to annotation processing to make it easier to collect metrics on that. Finally, remove --java_header_compilation_direct_classpath now that it has been productionized and enabled by default. PiperOrigin-RevId: 159260596
* Ban the combination of buildfiles/loadfiles and --output=location.Gravatar nharmata2017-06-19
| | | | | | RELNOTES[INC]: The --output=location flag to 'bazel query' cannot be used with query expressions that involve the 'buildfiles' or 'loadfiles' operators. This also applies to 'genquery' rules. PiperOrigin-RevId: 159259061
* Static-ize ConfigurationBuilderEnvironment.Gravatar mstaib2017-06-19
| | | | | | | | | This inner class has no reason to be non-static that I can see. This should have no effect on memory if I understand how Java memory usage works, but it confused me, so I cleaned it up. RELNOTES: None. PiperOrigin-RevId: 159255460
* Make NoBuildEvent an instance of BuildEventGravatar Klaus Aehlig2017-06-19
| | | | | | | | | | | Not all bazel invocations produce a BuildStartingEvent; in fact, not all commands include building. Those invocations produce a NoBuildEvent instead. However, some of those invocations, like "query", might still have important machine-readable information to report, like errors in BUILD files. So, make the NoBuildEvent a build event, capable of starting a stream of build events. Change-Id: I7cab65f029cdc0176ea5c4970308de296fb73177 PiperOrigin-RevId: 159230205
* Safe-guard against broken client environmentsGravatar Ulf Adams2017-06-19
| | | | | | | | | | | | | | The code previously threw StringIndexOutOfBoundsException if the client env contained just a variable name with no '=' or value. Fixed #3196. Change-Id: I5afcaa398ab2e8bacc709445f50ba363659cadbb Closes #3197. Change-Id: I5afcaa398ab2e8bacc709445f50ba363659cadbb PiperOrigin-RevId: 159222809
* Change TestTimeout's rangeMax values so that isInRangeFuzzy will flag tests ↵Gravatar Googler2017-06-19
| | | | | | | | | that are potentially timeout flaky and getSuggestedTestTimeout is less likely to suggest timeouts that can result in timeout flakiness. Also modernized and refactored TestTimeout to be more understandable. RELNOTES: Adjust the thresholds for --test_verbose_timeout_warnings so that it can recommending timeout increases and won't recommend timeouts that are too close to the actual timeout. PiperOrigin-RevId: 159222380
* Rewrite StandaloneSpawnStrategy to use LocalSpawnRunnerGravatar ulfjack2017-06-19
| | | | PiperOrigin-RevId: 159221067
* ResourceFilter persists ordering of resources when filteringGravatar Googler2017-06-19
| | | | | | | | | | | | Before this change, resource filtering by densities could rearrange the ordering of resources. However, resource merging behavior is dependant on resource ordering, so changing the order could lead to changed merge results. Instead, ensure that the filtered resources appear in the same order as they did in the original list of resources. RELNOTES: none PiperOrigin-RevId: 159219647
* Require parentheses around tuple in list comprehension filtering.Gravatar laurentlb2017-06-19
| | | | | | | | | | | This affects only the tuple that appears after 'if' inside a list comprehension. Since a truth value is expected, it's very unlikely to break existing code. It's technically a breaking change, but it's not worth introducing a flag for this. RELNOTES: Parentheses around the tuple are now mandatory in [a for b in c if 1, 2] PiperOrigin-RevId: 159218397
* A bunch of unrelated cleanups:Gravatar nharmata2017-06-16
| | | | | | | | | | -Have SkylarkImportLookupFunction include causes in the SkyFunctionExceptions it throws. -Better transitive skyframe error declarations in ASTFileLookupFunction. -Have ErrorInfo differentiate between direct and transitive transience. -Introduce ErrorInfoManager and have ParallelEvaluator/ParallelEvaluatorContext use it. RELNOTES: None PiperOrigin-RevId: 159163186
* Fix duplication and re-ordering issues in ExternalPackageUtil.Gravatar John Cater2017-06-16
| | | | | Change-Id: Ie0e64b2e03f5208bc3a6d9522f25e7f11ec4dbd5 PiperOrigin-RevId: 159156497
* Automated g4 rollback of commit da56606563ee9df438db93392f681bf2abb4ac97.Gravatar brandjon2017-06-16
| | | | | | | | | | | | | | | | | | | | | | | | | | NO_SQ=Only failing TAP targets in our project are from an unrelated bug. *** Reason for rollback *** Initially we thought this broke just a few builds that were fixed in the depot. The scope is wider than that, affecting at least these two targets: [] [] There are hundreds of other failures in the TGP results that we haven't traced to a cause yet, but it's troubling that this CL was implicated twice in the small sampling I did. [] *** Original change description *** Use JavaCompilationArtifacts instead of JavaCompilationArgs to store Java compilation artifacts. Round-tripping through JavaCompilationArgs loses dependency information that upstream compilations use to optimize compile time classpaths. PiperOrigin-RevId: 159154375
* Rollback the copt-changing functionality of the extension_safe attributeGravatar cparsons2017-06-16
| | | | | | | | | | This change impacted build times of builds with libraries that needed to be built both extension-safe and non-extension-safe. This also caused duplicate symbol issues in such builds. The extension_safe attribute will now be a no-op, with subsequent removal to follow. RELNOTES: The extension_safe attribute of apple_binary no longer validates transitive dependencies are compiled against extension_safe APIs. PiperOrigin-RevId: 159142000
* Unconditionally shut down the execution tool, even after catastrophes.Gravatar shreyax2017-06-16
| | | | | RELNOTES: None. PiperOrigin-RevId: 159132957
* Fix resource filtering bug in interaction between densities and API versionGravatar Googler2017-06-16
| | | | | | | | | | | | | | | | | | | | ResourceFilter, following Aapt's behavior, ignored the 'version' qualifier. However, ResourceFilter also filters by densities, which is not supposed to ignore the version qualifier. Change ResourceFilter to only ignore the version qualifier when filtering by resource_configuration_filters, not densities. Without this change, when filtering by density, ResourceFilter would treat, for example, res-hdpi-v4/foo.png and res-hdpi-v11/foo.png as identical, even though they have different versions, and only use one of them when building the newly filtered list of resources. Instead, they should both be included. Also include a unit test that covers this behavior. Rather than add this in AndroidBinaryTest, create a new ResourceFilterTest class. To support that, move ResourceFilter from using the test-unfriendly RuleContext class to the easy-to-fake RuleErrorConsumer whenever possible. RELNOTES: none PiperOrigin-RevId: 159122507
* Add more methods to ExternalPackageUtil to load all rules of a specificGravatar John Cater2017-06-16
| | | | | | | rule class. Change-Id: Iaa830658a62de661f16e100d24b2d1a3e66af638 PiperOrigin-RevId: 159104714
* Mitigate GC churn in module map file writes: No need to pin entire contents ↵Gravatar felly2017-06-16
| | | | | | in memory. Instead, write to the output stream incrementally. PiperOrigin-RevId: 159046844
* Automated g4 rollback of commit 5c2dc673a3ad2aa52f25c6f7d767671ba3e9b02c.Gravatar corysmith2017-06-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Appears that the generated R classes are not correct, causing test failures. *** Original change description *** Automated g4 rollback of commit 1be84ee92a825694b0c0026ac77134f8a084bd9c. *** Reason for rollback *** Rolling forward with the generated resources directory being created for tests without resources. *** Original change description *** Automated g4 rollback of commit d028d7854d3e95d97143945a1ec32944e5e4594b. *** Reason for rollback *** Breaks 1000+ targets in the depot: [] *** Original change description *** Generate pre-reconciled ids R classes for dependen... *** RELNOTES: None PiperOrigin-RevId: 159032530
* Fix couple of code blocks, doc paths in docgen templates.Gravatar dzc2017-06-16
| | | | | | | | | * Replace ```shell with ```sh to fix jekyll build errors * Fix paths in docgen templates for new docs site directory structure. * Add jekyll build output directories to gitignore. RELNOTES: None PiperOrigin-RevId: 159020213
* Remove useless comments.Gravatar nharmata2017-06-16
| | | | | | | (2) was on the wrong line anyway. RELNOTES: None PiperOrigin-RevId: 159010312
* Simplify data binding documentation.Gravatar gregce2017-06-16
| | | | PiperOrigin-RevId: 158999549
* Cleanup: addressing comments from commit ↵Gravatar olaola2017-06-16
| | | | | | | 9eea05d068a06ab642dd9d86d46ee5fa2e36b02e. RELNOTES: n/a PiperOrigin-RevId: 158988688
* Add support for the '0o' octal prefix for integers.Gravatar laurentlb2017-06-16
| | | | | | RELNOTES: Octal prefix '0' is deprecated in favor of '0o' (use 0o777 instead of 0777). PiperOrigin-RevId: 158982649
* ctx.empty_action now allows depset as inputsGravatar laurentlb2017-06-16
| | | | | RELNOTES: None. PiperOrigin-RevId: 158977418
* Remove unused interface PreprocessorGravatar Klaus Aehlig2017-06-16
| | | | | Change-Id: I008c16d747c5d06f433af14cd0793536cff2723e PiperOrigin-RevId: 158975286
* Revamp JavaToolchain:Gravatar lberki2017-06-16
| | | | | | | | | | | | - Rely on existing infrastructure to verify that attributes only contain a single artifact and that mandatory attributes are specified - Add single artifact modifiers to attributes that need them - Remove "final" modifiers from method variables (we don't use them in Blaze) - Replace deprecated #add() with #addProvider() Since this relies on existing infrastructure, I thought adding tests is redundant. I did test it manually, though, to be extra safe by testing what happens if these attributes contain an empty filegroup or a filegroup with multiple artifacts in it. RELNOTES: None. PiperOrigin-RevId: 158975017
* Switching to Watcher API instead of wait_for_completion, in preparation forGravatar olaola2017-06-14
| | | | | | | | | deprecating the wait_for_completion field. Note on errors: in the RemoteWorker, I currently handle all errors as onError of the watch call. Other options are: pass them as the operation error field, and pass some of them as the onError of the execute call. For now, I'm just using the simplest option; the Bazel client is ready to handle all possible options. RELNOTES: none PiperOrigin-RevId: 158974207
* ctx.action now allows depset as inputsGravatar laurentlb2017-06-14
| | | | | RELNOTES: None. PiperOrigin-RevId: 158973112
* Introduce --incompatible_load_argument_is_label (1st argument of load must ↵Gravatar laurentlb2017-06-14
| | | | | | | | | be a label). RELNOTES: First argument of 'load' should be a label. Path syntax is deprecated (label should start with '//' or ':'). PiperOrigin-RevId: 158971314
* Propagate postable events further upGravatar Klaus Aehlig2017-06-14
| | | | | | | | | | | | With the introduction of the ExtendedEventHandler, SkyFunctions were given the possibility to post additional Postable events in addition to the standard events. As SkyFunctions have to be restartable, events are collected first and only posted after the function is finished. Make sure that this also applies to postable events and they are not dropped. Change-Id: Ie1c3a0134935c75ea984fa2cc924e7327a9da81f PiperOrigin-RevId: 158964337
* 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
* Fix local execution to not throw an exceptionGravatar ulfjack2017-06-14
| | | | | | | | The SpawnInputExpander returns null for empty files, but the ActionInputPrefetcher does not expect null values, and implementations may throw NPE. PiperOrigin-RevId: 158960425
* Use EventHandler even before we have a Reporter instanceGravatar ulfjack2017-06-14
| | | | | | | ...instead of relying on all the methods to call printErrLn with exactly the right format string. PiperOrigin-RevId: 158951236
* Add a FileProvider (which all ConfiguredTargets should have) to ↵Gravatar lberki2017-06-14
| | | | | | | | | PackageGroupConfiguredTarget. This fixes a crash when a package_group was referenced in an attribute that requires specific file types. RELNOTES: None. PiperOrigin-RevId: 158950996
* Move external package rule loading into a shared utility class.Gravatar John Cater2017-06-14
| | | | | Change-Id: I3f6664768791a63bf2f9e254b290d07623336ef6 PiperOrigin-RevId: 158902487
* Introduce --incompatible_comprehension_variables_do_not_leakGravatar laurentlb2017-06-14
| | | | | | | | | | | | | When the flag is activated, variables in list comprehensions do not leak anymore. Even if a variable was defined before the loop, it's not accessible after the loop. This change allows us to detect any breakage and ensures that no user is accessing loop variables after the loop. This will make possible for us to change the behavior and follow Python 3 semantics in the future. RELNOTES: None. PiperOrigin-RevId: 158895514
* Change link_static to linkstatic.Gravatar Googler2017-06-14
| | | | | | The attribute is linkstatic not link_static. PiperOrigin-RevId: 158883927
* Map LIPO to ThinLTO when LLVM compiler is used.Gravatar Googler2017-06-14
| | | | | | | | | | | | This change maps LIPO to ThinLTO when a LLVM compiler is used for building, with a warning. This change is necessary for the following reason. The compiler team is planning to flip the default compiler from GCC to LLVM and this change will migrate all LIPO users of GCC to LLVM with ThinLTO + FDO (LIPO equivalent) without any changes to build scripts. RELNOTES[NEW]: LIPO maps to ThinLTO for LLVM builds. PiperOrigin-RevId: 158875330
* BlazeModule.workspaceInit: also pass the BlazeRuntime to the callGravatar ulfjack2017-06-14
| | | | | | | | In order for BlazeModule.workspaceInit to be self-contained, also pass in the BlazeRuntime; we have use cases where this context is relevant, and there's currently no other way to get a reference to the BlazeRuntime. PiperOrigin-RevId: 158861142
* Make packages able to handle Postables as wellGravatar Klaus Aehlig2017-06-14
| | | | | | | | Packages can remember events associated with reading the package; also make them aware of additional Postable events. Change-Id: Id7933de7e364b142d0c95fd774585d3271204b2b PiperOrigin-RevId: 158853675
* Add support for zipped LLVM profile files.Gravatar Googler2017-06-14
| | | | | | | | | | | | | | | | | | | This change is a follow-up to a recent change which allowed LLVM raw profile files to be directly used with blaze. This change allows zipped LLVM raw profile files. This uses //tools/zip:zipper to extract the zipped file contents. This also adds a new option to //tools/zip:zipper, 'j', to junk directories while unzipping. Tested: blaze test //devtools/blaze/integration:fdo_test blaze test //third_party/ijar/test:zip_test RELNOTES[NEW]: Zipped LLVM profiles are now supported. PiperOrigin-RevId: 158849516
* Bump the blaze max jobs and warning threshold to keep up with the times.Gravatar felly2017-06-14
| | | | PiperOrigin-RevId: 158847561
* Simplify BlazeModule.beforeCommandGravatar ulfjack2017-06-14
| | | | | | | | | | | Don't pass the Command annotation explicitly, but add it to CommandEnvironment instead; most modules don't need it in the first place, so it was a lot of boilerplate for not much. Also change it so that the command is passed to the constructor. Add some documentation to the beforeCommand method. PiperOrigin-RevId: 158847128
* Also filter stderr when parse_showincludes feature is enabledGravatar Yun Peng2017-06-13
| | | | | | | | | | On Windows, cl.exe generates include information to stdout. But when using the cuda compiler(nvcc.exe) to invoke cl.exe, it's redirected to stderr. So we need to parse the output of stderr as well. Change-Id: I9a763a6eefa531932bf1077ef4155f6bda934240 PiperOrigin-RevId: 158842448
* Windows, Bazel client: pass Unix root as JVM flagGravatar Laszlo Csomor2017-06-13
| | | | | | | | | | | | | The Bazel client will pass the --host_jvm_args=-Dbazel.windows_unix_root=<path> flag to the server (computed from $BAZEL_SH), and the server will no longer shell out to cygpath to compute this value. Fixes https://github.com/bazelbuild/bazel/issues/2983 Change-Id: Iacc2e2eb70eacafdf7bbcad68d375ba9eadc6ee1 PiperOrigin-RevId: 158830675