aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib
Commit message (Collapse)AuthorAge
* Enforce the new category and effect tags.Gravatar ccalvarin2017-07-03
| | | | | | | | | | All options need to explicitly list their category and effect. If they are uncategorized, this makes the lack of information obvious. Remove defaults from the annotation to enforce this. Also enforce the sanity check that no option should have UNKNOWN or NO_OP effects listed with other effect tags. Includes some last default sets for options I missed in the previous mass-setting change, and some that were added since. PiperOrigin-RevId: 160641861
* Add methods for filtering LocalResourceContainerGravatar Googler2017-07-03
| | | | | | | | | | | | | | | | | Dynamically Configured Resource Filtering change 1/6 To enable dynamically configured resource filtering, we'll need to be able to pass filtered resources into resource processing code used by android_library targets. The resource parsing action, used only in android_library targets, takes the LocalResourceContainer as an input, unlike android_binary processing code which never used it directly. Abstract the code for actually building the collection of resource roots out of the withResources method, and create an additional method for calling it from resource filtering. Also, split some common test code out of ResourceFilterTestBase to make a ResourceTestBase class for testing changes to this (and eventually, other) resource-oriented classes, and create LocalResourceContainerTest for this class in particular. RELNOTES: none PiperOrigin-RevId: 160640192
* Refactor PrinterGravatar vladmos2017-07-03
| | | | | | | It's now easier to customize Printer if in different situations objects should be printed differently. Also its API is cleaner now. Names of methods of SkylarkValue objects now reflect names of Skylark functions: SkylarkValue#repr and SkylarkPrintableValue#str. PiperOrigin-RevId: 160635154
* Make osx crosstool standalone (working without bazel patches)Gravatar hlopko2017-07-03
| | | | | | | | | | | | This cl promotes //tools/osx/crosstool to be fully specified on its own, without any blaze patches needed. While at it, I (think I) unified objc and c++ coverage features. Other than coverage, this cl only adds features that bazel would add otherwise. Ping #2420 RELNOTES: ObjC and C++ coverage feature is unified under name 'coverage' PiperOrigin-RevId: 160633192
* Introduce ctx.actions.write in place of ctx.file_action.Gravatar dslomov2017-06-30
| | | | | RELNOTES: None. PiperOrigin-RevId: 160630261
* Undo Java 8 updates to fix bootstrapping on MacOS.Gravatar laszlocsomor2017-06-30
| | | | | | | Fixes fallout from https://github.com/bazelbuild/bazel/commit/fda985b069ed4cc1966a6ced5743c396f91ac688. RELNOTES: none PiperOrigin-RevId: 160626838
* Implement ctx.actions.do_nothing instead of ctx.empty_actionGravatar dslomov2017-06-30
| | | | | RELNOTES: None. PiperOrigin-RevId: 160621674
* A little cosmetic cleanup in the wake of the Java 8 migration.Gravatar lberki2017-06-30
| | | | | RELNOTES: None. PiperOrigin-RevId: 160619371
* Implement retry logic for the gRPC calls in remote execution and caching. TheGravatar olaola2017-06-30
| | | | | | | | retry strategy may need tuning. Other behavior changes: swallowing gRPC CANCELLED errors when the thread is interrupted, as these are expected and just make debugging difficult. Also, distinguishing between the gRPC DEADLINE_EXCEEDED caused by the actual command timing out on the server vs. other causes (the former should not be retriable, while the latter should retry). TESTED=unit tests, remote worker on Bazel PiperOrigin-RevId: 160605830
* Slight refactoring, functional noop: uploadChunks will need to get a ↵Gravatar olaola2017-06-30
| | | | | | | Chunker.Builder in my next change, so all the from factory methods are removed. TESTED=unit test PiperOrigin-RevId: 160594730
* Automated conversion to Java 8Gravatar laurentlb2017-06-30
| | | | | | | With a few manual fixes for readability. RELNOTES: None. PiperOrigin-RevId: 160582556
* Remove --xcode_override_workspace_root and ↵Gravatar cparsons2017-06-30
| | | | | | | | | --experimental_use_absolute_paths_for_actions. These flags are old and unused -- with the deletion of xcodegen, addition of Tulsi, and near-migration to crosstool objc compilation, these flags are long-deprecated and are now cleaned up. RELNOTES: None. PiperOrigin-RevId: 160578161
* Add categories transition values to android options.Gravatar ccalvarin2017-06-30
| | | | | | Automated formatting fixes standardize the @Option annotation. PiperOrigin-RevId: 160567787
* {ios,macos}_minimum_os flags now default to {ios_macos}_sdk_version valuesGravatar cparsons2017-06-30
| | | | | RELNOTES: None. PiperOrigin-RevId: 160566592
* Decrease memory used by SpawnAction's param file builder.Gravatar tomlu2017-06-30
| | | | | | The previous implementation stores a copy of the param file's path fragment with an '@' prepended. This can add up if you have a lot of params files, but can be avoided by deferring that string expansion. PiperOrigin-RevId: 160559793
* Pick up default crosstool features in objc.Gravatar rduan2017-06-30
| | | | | RELNOTES: None. PiperOrigin-RevId: 160553181
* Add a #getBytes() method to DeterministicWriter that returns a ByteString. ↵Gravatar janakr2017-06-30
| | | | | | | | By default it just delegates to the existing #writeOutputFile, but implementations may choose to override if they have easy access to a ByteString. Also change some DeterministicWriter implementations that do have easy access to the ByteString. PiperOrigin-RevId: 160550028
* Lambda cleanupGravatar laurentlb2017-06-29
| | | | | RELNOTES: None. PiperOrigin-RevId: 160516183
* Add exports param to java_common.compile.Gravatar elenairina2017-06-29
| | | | | | | | This is a step forward to having the same semantics for java_library and custom Skylark rules that use java_common.compile, facilitating the migration from native Java rules to Skylark. Progress on #2614 PiperOrigin-RevId: 160513771
* Fix a few style issues.Gravatar lberki2017-06-29
| | | | | RELNOTES: None. PiperOrigin-RevId: 160510979
* Migrate the lib.server package to Java 8.Gravatar lberki2017-06-29
| | | | | RELNOTES: None. PiperOrigin-RevId: 160504704
* Add a lambda now that we can.Gravatar lberki2017-06-29
| | | | | RELNOTES: None. PiperOrigin-RevId: 160498120
* Remove resource_extractor from android_sdk rule.Gravatar ajmichael2017-06-29
| | | | | | | | | | resource_extractor has nothing to do with the Android SDK. Once upon a time, it was needed for jack support, so it was colocated with the jack attributes in android_sdk. Nowadays, it is used as a necessary step before singlejar can run to build the APK. RELNOTES: None PiperOrigin-RevId: 160479247
* Introduce new android_instrumentation_test rule.Gravatar ajmichael2017-06-29
| | | | | | | | | | | This rule works with the android_instrumentation, android_device_script_fixture and android_host_service_fixture rules to support testing Android applications. None of these rules are installed yet, because the forthcoming Android test runner is not yet open sourced. https://github.com/bazelbuild/bazel/issues/903. RELNOTES: None PiperOrigin-RevId: 160465920
* Add a FeaturePolicyConfiguration for supporting limited feature rollouts.Gravatar mstaib2017-06-29
| | | | | | | | | | A common need is to limit access to a rule or feature - restricting a feature which is being deprecated or controlling the rollout of a new feature. This change adds the feature_control_policy flag, which allows developers to easily manage this process. RELNOTES: None. PiperOrigin-RevId: 160454166
* Enable aapt2 support in library actions.Gravatar corysmith2017-06-29
| | | | | RELNOTES: None PiperOrigin-RevId: 160445869
* Make sure that objc_ and apple_binary pass the host/nonhost feature flag forGravatar Googler2017-06-29
| | | | | | | parity with the cc_ rules. RELNOTES:None. PiperOrigin-RevId: 160438691
* Remove implicit dependency of objc rules on //tools/objc:header_scannerGravatar cparsons2017-06-29
| | | | | | | | | The correct dependency is on @bazel_tools//tools/objc:header_scanner, and this is determined by configuration value. I have manually verified this fixes https://github.com/bazelbuild/bazel/issues/2723 . Ultimately we will want to follow up and write a regression test for rdeps functioning, but that is significantly harder than this quick fix. RELNOTES: None. PiperOrigin-RevId: 160424016
* Refactoring the ApplicationManifest for clarity:Gravatar corysmith2017-06-29
| | | | | | | | * Split the aar, library and binary packWith calls. * Remove unused argument from the new binary and library packWith calls. RELNOTES: None PiperOrigin-RevId: 160414867
* Add categories to BES-related optionsGravatar aehlig2017-06-29
| | | | | | | | | | The build event stream reports about events during the build, so it is logging (in a broad sense). The idividual options affect where we (remotely) log to, how eager we do it, etc. So they affect where the output (of the logging) goes to. RELNOTES: None PiperOrigin-RevId: 160409925
* Writing build events to a file is no longer experimentalGravatar aehlig2017-06-28
| | | | | | | | Reflect this by renaming the options appropriately. While there, also add categories to those options. RELNOTES: writing build events to a file is no longer experimental PiperOrigin-RevId: 160400332
* Add ActionEnvironment, which is a wrapper class for a fixed+inherited envGravatar ulfjack2017-06-28
| | | | | | | | | | | | | | | | We are currently tracking the action environment (computed from --action_env), and the test action environment (computed from --test_env, and not including the action env) as two pairs of fields, and a lot of callers haven't been updated to handle both parts (TestRunnerAction does, but many 'normal' actions don't). However, both parts have always both be handled, and moving them into a single abstraction makes it harder to accidentally miss one part. We'll subsequently need to update all the action implementations to use the new abstraction, and also update the Skylark API (or bypass it and always apply the action environment for all actions, except we don't know which configuration to use). PiperOrigin-RevId: 160386181
* BugReport: include ERROR on internal error messagesGravatar Klaus Aehlig2017-06-28
| | | | | | | | | | | | While a sentence like "bazel ran out of memory and crashed" should be human-readable enough, it seems that users often only scan for the word ERROR in the output and assume everything is fine, if it doesn't occur. Things get worse, if that procedure is scripted. While these kind of behaviors should be discouraged, mitigate the consequences by providing mainstream error messages. Change-Id: I5a032360881c53575bfbd37a471b96933622d3c5 PiperOrigin-RevId: 160385223
* Move verifyMarkerData into RepositoryFunctionGravatar Yun Peng2017-06-28
| | | | | | | | | | | | | And for new_XX_repository rules, add BUILD and WORKSPACE file into markerData. In markerData, key starting with FILE: can be an absolute label or an absoulte path, but the latter one will be depracated in future. Fixed https://github.com/bazelbuild/bazel/issues/3093 Change-Id: Ic3e16c123b3f1f781ab12c41d13f5e540b05686c PiperOrigin-RevId: 160382024
* Do not take all possible values of an attribute for selector lists of list ↵Gravatar shreyax2017-06-28
| | | | | | | | types when running query output. Instead, simply return a list of list types, each list type being the concatenation of each of the possible outputs in each select. RELNOTES: Make querying attributes formed by selector lists of list types more efficient by no longer listing every possible combination of attribute value but by more compactly storing the possible values of the list. PiperOrigin-RevId: 160326041
* Allow expansion flags to have values.Gravatar Googler2017-06-28
| | | | | | | This lets us change what it expands based on the argument passed to the flag. RELNOTES: Allows flags that expand to take values. PiperOrigin-RevId: 160298412
* Update the --incompatible_ flag requirements to use the metadata tag.Gravatar ccalvarin2017-06-28
| | | | | | Leave the category for now as the generated docs still do not use the new categorization. PiperOrigin-RevId: 160290297
* Rename RemoteUtils to GrpcUtilsGravatar ulfjack2017-06-28
| | | | PiperOrigin-RevId: 160285362
* Add a pretty printer for Skylark ASTsGravatar brandjon2017-06-28
| | | | | | | This can be used to canonically compare ASTs for equality, e.g. in tests. RELNOTES: None PiperOrigin-RevId: 160283160
* Add the default category and tag to all options.Gravatar ccalvarin2017-06-28
| | | | | | | | Move the default from the annotation to every mention. This makes the incompleteness explicit. Will add the defaults to test targets in a separate change. Once all dependencies are cleaned up, the Option annotation will no longer allow options without the documentationCategory or effectTag, to prevent new options being added without categories while we migrate to the new option categorization. PiperOrigin-RevId: 160281252
* BEP: Gracefully handle null configurationsGravatar Klaus Aehlig2017-06-28
| | | | | | | Those may occur, e.g., if the target is simply a source file. Change-Id: Ia64c54e8543dd93712b00428c443922c67e2b6cd PiperOrigin-RevId: 160278149
* Add more helpers to ParserGravatar brandjon2017-06-28
| | | | | | | This simplifies parsing a lone statement or expression in unit tests. RELNOTES: None PiperOrigin-RevId: 160276410
* Tests + cleanup + docs for ctx.actions.declare_{file,directory}Gravatar dslomov2017-06-28
| | | | | RELNOTES: None. PiperOrigin-RevId: 160273273
* Fix typo in JsonFormatFileTransport.javaGravatar Eric Dobson2017-06-28
| | | | | | | | Invlaid -> Invalid Closes #3119. PiperOrigin-RevId: 160270924
* BEP: also report test sizesGravatar Klaus Aehlig2017-06-28
| | | | | | | The size of a test is a relevant property of a test target. Report it. Change-Id: Ia529a11f4a6920bca7d233e3493640d319cca5ae PiperOrigin-RevId: 160268370
* Add 'ctx.actions.declare_directory'Gravatar dslomov2017-06-28
| | | | | RELNOTES: None. PiperOrigin-RevId: 160267763
* Turn unary minus into a proper AST nodeGravatar brandjon2017-06-28
| | | | | | | This unifies unary minus with NotExpression, and moves the minus logic from a fake builtin function into the interpreter proper. RELNOTES: None PiperOrigin-RevId: 160266266
* Enable connection pooling for the remote REST cacheGravatar Benjamin Peterson2017-06-27
| | | | | | | | | | | | | | | | | Connection pooling is a useful optimization for REST caches that are far away as it avoids constantly redoing the TCP handshake. It also prevents large builds from exhausting the local interface's source ports through tens of thousands of one-transaction connections. The default connection pool size of 20 is fairly arbitrary. Users probably want to set this to something close to the value of --jobs. We introduce some generic infrastructure for closing remote cache instances and use it to cleanly shutdown the connection pool between builds. Change-Id: I73adc29ecae15cc10a1217ffbaa483892bcd4f9a PiperOrigin-RevId: 160264681
* Add 'ctx.actions' and implement 'ctx.action.declare_file'.Gravatar dslomov2017-06-27
| | | | | RELNOTES: None. PiperOrigin-RevId: 160264501
* BuildEventStreamUtils: update TODO to reflect the new plan of actionGravatar aehlig2017-06-27
| | | | | | | | | It seems preferable to make the TestStatus in the build event protocol the primary one. So update the TODO entry to reflect the new plan to get rid of the old BlazeTestStatus. RELNOTES: None PiperOrigin-RevId: 160263709