aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* Clarify Mutability invariants, refactor some testsGravatar brandjon2017-09-29
| | | | | RELNOTES: None PiperOrigin-RevId: 170343759
* Remove the null lipo context collector from the objc rules, which do not use ↵Gravatar cpeyser2017-09-29
| | | | | | LIPO. Remove the check that requires a context collector to be present. PiperOrigin-RevId: 170341259
* Skylint: check for bad operationsGravatar fzaiser2017-09-29
| | | | | | | | So far, only checks for usages of '+' on dictionary literals and comprehensions. RELNOTES: none PiperOrigin-RevId: 170336917
* Release 0.6.0 (2017-09-28)Gravatar Bazel Release System2017-09-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Baseline: 87cc92e5df35d02a7c9bc50b229c513563dc1689 Cherry picks: + a615d288b008c36c659fdc17965207bb62d95d8d: Rollback context.actions.args() functionality. + 7b091c1397a82258e26ab5336df6c8dae1d97384: Add a global failure when a test is interrupted/cancelled. + 95b0467e3eb42a8ce8d1179c0c7e1aab040e8120: Cleanups for Skylark tracebacks + cc9c2f07127a832a88f27f5d72e5508000b53429: Remove the status xml attribute from AntXmlResultWriter Incompatible changes: - Noop flag --deprecated_generate_xcode_project deleted. - Objects in Skylark are converted to strings in a more descriptive and less harmful way (they don't leak information that shouldn't be accessed by Skylark code, e.g. nondeterministic memory addresses of objects). - `set` is deprecated in BUILD and .bzl files, please use `depset` instead. Ordering names have also been changed, please use "default", "postorder", "preorder", and "topological" instead of "stable", "compile", "naive_link", and "link" correspondingly. - Integer overflow (on signed 32 bit numbers) in BUILD/bzl files is an error. - Keyword-only syntax in a function definition is now forbidden e.g. `def foo(a, *, b)` or `def foo(a, *b, c)` - --incompatible_comprehension_variables_do_not_leak defaults to "true." Iteration variable becomes inaccessible after a list/dict comprehension. New features: - There is now a 'siblings' query function. See the query documentation for more details. - Added the print_action command, which outputs the actions needed to build a given target in the form of an ExtraActionSummary proto in text format. - android_binary now supports proguard_apply_dictionary to specify a custom dictionary to use for choosing names to obfuscate classes and members to. Important changes: - 'strip' action is now configured via feature configuration - Flags from action_config get added first to the command line first, before the flags from features. - `bazel info output_path` no longer relies on the root directory filename being equal to the workspace name. - The `print` function now prints debug messages instead of warnings. - speedup of incremental dexing tools - --announce_rc now controls whether bazelrc startup options are printed to stderr. - Removing a few unused objc_provider keys. - Improved logging when workers have to be restarted due to its files having changed. - Top-level `if` statements are now forbidden. - Java protos are compiled to Java 7 bytecode. - All Android builds now use the desugar tool to support some Java 8 features by default. To disable, use the --nodesugar_for_android flag. - Skylark-related options may now appear as "common" command options in the .bazelrc - Python is now required to build bazel. - When the lvalue of an augmented assignment is a list, we now throw an error before evaluating the code (e.g. `a, b += 2, 3`). - New --build_runfile_manifests flag controls production of runfiles manifests. - Enable debug info for Java builds - Allow java_lite_proto_library in the deps of android rules. - .so files in APKs will be memory-page aligned when android_binary.nocompress_extensions contains ".so" and --experimental_android_use_nocompress_extensions_on_apk is specified. - Skylark providers can specify allowed fields and their documentation. - Support ctx.actions.args() for more efficient Skylark command line construction. - The remote HTTP/1.1 caching client (--remote_rest_cache) now distinquishes between action cache and CAS. The request URL for the action cache is prefixed with 'ac' and the URL for the CAS is prefixed with 'cas'. - `JavaInfo` is a preferred alias to `java_common.provider`. - J2ObjC version updated to 2.0.3. - A new Java coverage implementation is available. Makes possible coverage for Skylark JVM rules. - Make proguard_apply_dictionary also apply to class and package obfuscation, not just class members. - When using the dictionary literal syntax, it is now an error to have duplicated keys (e.g. {'ab': 3, 'ab': 5}). - android_binary.nocompress_extensions now applies to all files in the APK, not just resources and assets. - The apple_genrule rule that is distributed with Bazel has been deleted. Users who wish to use genrules with Xcode's DEVELOPER_DIR set should use the rules in https://github.com/bazelbuild/rules_apple instead. - The swift_library rule that is distributed with Bazel has been deleted. Users who wish to compile Swift should use the rules in https://github.com/bazelbuild/rules_apple instead.
* Make windows_export_all_symbols feature work for cc_binaryGravatar Yun Peng2017-09-28
| | | | | | | | | | | | | | | Now Bazel can also export symbols when building dynamic library from cc_binary. The interface library generated can be accessed by interface_library output group. The DEF file can still be accessed by def_file output group even when windows_export_all_symbols feature is not specified. This is useful when users want to filter symbols in DEF file before using it, for example, working around the 64K symbols number limit. Change-Id: I5b4dae0840e20037c00d500181c40b5faedfdcd8 PiperOrigin-RevId: 170330409
* Automated rollback of commit 411039319c1c67f2b9c8a7ada9e0a11d9bd4023f.Gravatar elenairina2017-09-28
| | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks coverage for android_test (N/A). Can be reproduced with unknown commit. *** Original change description *** Rollforward change of Java coverage logic. RELNOTES: None. *** Original change description *** Automated rollback of commit 8d6fc64b18c7e35b93f5c43dae1dbd2f8cae2147. PiperOrigin-RevId: 170322801
* Polish the interface of CppCompileActionBuilderGravatar hlopko2017-09-28
| | | | | | | Some of the setters didn't return the builder, this cl fixes that. RELNOTES: None. PiperOrigin-RevId: 170313892
* Make the state in RuleContext explicitGravatar ulfjack2017-09-28
| | | | | | | | | | | | | | | | | | | | | This isn't ideal - RuleContext should not have state, but this ended up happening between adding a cache and refactoring how make variables are discovered. I have carefully traced back all callers that provide custom make variable suppliers and added an init call to their rule initialization. Note that the ConfigurationMakeVariableContext is _cached_, so callers that call in without any make variable suppliers and then call again with them would get the context from the previous call. We now enforce that the ConfigurationMakeVariableContext is only initialized once, and that this happens before any usage, which is slightly better than the previous state, where initialization was silently ignored on any subsequent call. Progress on #2475. PiperOrigin-RevId: 170312285
* Set --experimental_allow_android_library_deps_without_srcs to false by ↵Gravatar jingwen2017-09-28
| | | | | | | default in AndroidConfiguration. RELNOTES: android_library targets are no longer allowed to use deps to export targets implicitly; please use android_library.exports instead. PiperOrigin-RevId: 170243241
* Fix comment typo.Gravatar gregce2017-09-28
| | | | PiperOrigin-RevId: 170240695
* Update bazel_apple_test to run on XCode 9.Gravatar John Cater2017-09-28
| | | | | | | Fixes #3827. Change-Id: Ie51650a3df6f40d2aa2c3ec016c00c98ce18c3de PiperOrigin-RevId: 170237678
* Expose JavaRuleOutputJarsProvider in java_common.provider, when available.Gravatar Googler2017-09-28
| | | | | | | | | | | | I'm not attempting to fix b/65618333 here, just handling one case currently breaking users (JavaInfo created via java_common.compile). My temporary workaround attempt to expose this information in the soy custom rule failed (unknown commit) -- to fix users we really need java_common changes. RELNOTES: Expose output jars and jdeps in java_common.provider, when available. PiperOrigin-RevId: 170236096
* More narrowly specify SkyframeExecutor#prepareExecution as ↵Gravatar janakr2017-09-28
| | | | | | #detectModifiedOutputFiles and move implementation to SequencedSkyframeExecutor. PiperOrigin-RevId: 170230031
* Add 'compiler' and 'libc' attributes to cc_toolchain. If platform/toolchainGravatar cpeyser2017-09-28
| | | | | | | resolution is used, use these attribute values to choose a CToolchain from --crosstool_top instead of --compiler and --glibc. PiperOrigin-RevId: 170217186
* Removed unsafe public API methods for mutable types (list/dict)Gravatar brandjon2017-09-28
| | | | | | | Instead of this escape hatch, we'll encourage outside code to construct and use a legitimate Mutability object. RELNOTES: None PiperOrigin-RevId: 170210739
* Show --experimental_repository_cache in Bazel options : ↵Gravatar Jingwen Chen2017-09-28
| | | | | | | | https://github.com/search?q=experimental_repository_cache&type=Issues&utf8=%E2%9C%93) Closes #3745. PiperOrigin-RevId: 170206914
* Add required/advertised Skylark providers.Gravatar elenairina2017-09-28
| | | | | | | This is needed to advertise and request JavaInfo (a native declared provider) instead of JavaCompilationArgsProvider. RELNOTES: None. PiperOrigin-RevId: 170205997
* Skylark tests: add support for negative testsGravatar laurentlb2017-09-28
| | | | | | | | Multiple tests can be specified in the same file. An expected error (regex) can be specified in the test. RELNOTES: None. PiperOrigin-RevId: 170204356
* Limit the use of LinkCommandLine#getBuildInfoHeaderArtifacts and #getLinkstampsGravatar hlopko2017-09-28
| | | | | RELNOTES: None. PiperOrigin-RevId: 170203679
* Mock cc toolchain is registered in module instead of in PlatformOptions.Gravatar cpeyser2017-09-28
| | | | PiperOrigin-RevId: 170200236
* deps -> exports in bazel mobile-install stub app.Gravatar ajmichael2017-09-28
| | | | | RELNOTES: None PiperOrigin-RevId: 170198788
* Simplify make variable expansion call sitesGravatar ulfjack2017-09-28
| | | | | | Progress on #2475. PiperOrigin-RevId: 170197341
* Windows,Android: support long paths in toolGravatar Laszlo Csomor2017-09-28
| | | | | | | | | | | | //tools/android/aar_embedded_jars_extractor.py now supports long paths using the same junction-creating trick as aar_resources_extractor does. Fixes https://github.com/bazelbuild/bazel/issues/3808 Change-Id: I2db25b0536ac3a97f4a04191bc398eb236923a7c PiperOrigin-RevId: 170193093
* Updating the remote execution API to the googleapis version.Gravatar Ola Rozenfeld2017-09-27
| | | | Change-Id: I57c86685aebd31691009002d0998f6ce444695ab
* Rewrite CppHelper linkopts expansion to take a list and return a listGravatar ulfjack2017-09-27
| | | | | | Progress on #2475. PiperOrigin-RevId: 170187908
* Simplify RuleContext APIGravatar ulfjack2017-09-27
| | | | | | | | | Use ConfigurationMakeVariableContext instead of passing in lists of MakeVariableSuppliers. Progress on #2475. PiperOrigin-RevId: 170182945
* Windows, aar_resources_extractor: longpath bugfixGravatar Laszlo Csomor2017-09-27
| | | | | | | | | | | | | | | | | | Fix a bug in the Android tool aar_resources_extractor: open the compressed data and the target file as file descriptores, rather than using aar.extract. This way we can shorten the directories in the relative path of the extracted file, because we can open the target file via a junction and thus work around long path limitations. //tools/android:aar_resources_extractor_test now passes on Windows. Change-Id: I9f5c7de2279ad8769e53e015b8334a58a76cd989 PiperOrigin-RevId: 170181143
* Android, Python tools: bugfix in junction.pyGravatar Laszlo Csomor2017-09-27
| | | | | | | | | junction.TempJunction now can create all parent directories of the junction target if they don't exist. Change-Id: I3e9cf34e78a3eb1ef9415036b791843a3b37f7c1 PiperOrigin-RevId: 170176180
* ExperimentalEventHandler: clean up in afterCommandGravatar Klaus Aehlig2017-09-27
| | | | | | | | | | | The experimental event handler honors the AfterCommandEvent which tells to clean up resources. Do so properly, by also flushing output and resetting the terminal (and then flushing it). As a nice side effect, this event handler does not need a separate release handling from the command dispatcher. Change-Id: If93cfa1b0f8d12e94fa4f57c9e2ee67362bd7d11 PiperOrigin-RevId: 170175617
* Reorganise the srcs_version attribute of py_binary/py_test/py_library rules:Gravatar Googler2017-09-27
| | | | | | | | | | | make the default for srcs_version be "PY2AND3" (while leaving default_python_version at "PY2"), since that's a more likely situation and a more obvious error condition. (Having PY2 as the default caused 2to3 to be used a lot more than necessary, which in turn can both hide and cause bugs.) Also, use attribute value restrictions to limit srcs_version and default_python_version to sensible values for the specific rule type. PiperOrigin-RevId: 170174546
* Fix markup in Build Event Protocol documentationGravatar Alex Vandiver2017-09-27
| | | | | | Closes #3765. PiperOrigin-RevId: 170172072
* BEP: also report baseline coverageGravatar Klaus Aehlig2017-09-27
| | | | | | | ...as part of the TargetComplete message. Change-Id: I8aa321a2810c3926db943f32cb1811a169e34dd7 PiperOrigin-RevId: 170171458
* remove unused code for unused aapt flagsGravatar ajmichael2017-09-27
| | | | | RELNOTES: None PiperOrigin-RevId: 170136145
* expect desugar metadata in conventional META-INF directory used by jar toolGravatar kmb2017-09-27
| | | | | | RELNOTES: none PiperOrigin-RevId: 170121935
* Adds option bes_keywords BEP publishing.Gravatar Googler2017-09-27
| | | | PiperOrigin-RevId: 170121049
* Add new option categorization and tagging information to HelpCommand's output.Gravatar ccalvarin2017-09-27
| | | | | | | | | | | | | If setting flag --use_new_category_enum, group the options by the new categories in both the command line output and the "everything-as-html" output used for the generated docs at https://bazel.build/versions/master/docs/command-line-reference.html. In the html output, the effect and metadata tags are listed for each option, with links to their descriptions at the bottom of the page. The tags only appear in the terminal output in -l/--long/--help_verbosity=long, and only the names appear. This is still experimental as the majority of options do not yet use the new categorization system. The new output can be seen in command-line-reference.html format by adding the new flag to the "help everything-as-html" line in //src/main/java/com/google/devtools/build/lib:gen_command-line-reference. The html output is in the same order as before (by blaze rule, with inherited options not repeated), which means it still has duplicate options, that should ideally be fixed separately. I propose either dropping the high-level grouping and just grouping the options by documentation category, or potentially grouping them by optionsbase in some non-class-naming way, and listing the commands that they apply to, as more and more optionsbases are used by multiple commands without being inherited (for example, all BuildEventServiceOptions are listed 20 times). People probably use ctrl-f to navigate this page anyway. Once we know that we only list each option once, we can actually have links to the options, which will make it possible to have links in the expansion lists. Issue #3758 RELNOTES: added experimental --use_new_category_enum to the help command to output options grouped by the new type of category. PiperOrigin-RevId: 170116553
* Refactor srcs-less android_library rules: deps -> exports.Gravatar jingwen2017-09-27
| | | | | | | | | | | This CL captures the BUILD files and macro callers of native.android_library which use deps without srcs or local resources (exports_manifest, assets_dir, resource_files, etc). Using deps to implicitly export targets will be deprecated soon; please use android_library.exports instead. Follow-up CL to this LSC by brendandouglas@: https://docs.google.com/document/d/1h2ay0i9Tyun6rJ3a7cFT3YrMar9qYoCEv9dZ_pXOSzY LSC timeline:[] RELNOTES: None. PiperOrigin-RevId: 170090131
* Add charset to action key computation of ParameterFileWriteAction.Gravatar twerth2017-09-27
| | | | | RELNOTES: None PiperOrigin-RevId: 170088757
* Move the canonicalization of an option value to the option value itself.Gravatar ccalvarin2017-09-27
| | | | | | | Ideally, the canonical form we output from OptionUtils would be the same as for the command canonicalize-flags, but that must wait for dependencies to be cleaned up. Still, in the meantime, keep the --foo=1 normalization of --foo, and apply it to all other boolean flag values (t,true,yes,y, and false equivalents), so that the canoncalize-flags output is more canonical, even if it isn't using the --[no]foo form yet. RELNOTES: Boolean flag values will now get normalized to 1 or 0 in canonicalize-flags output. PiperOrigin-RevId: 170084599
* Make gzipped pkg_tar outputs repeatableGravatar Philipp Schrader2017-09-27
| | | | | | | | | | | | | | | The current implementation allows the gzip module to use the current time as a timestamp. Python2 unfortunately doesn't expose this in the tarfile module so it's easy to overlook. This patch separates the gzip process by creating a separate file object manually and bypassing the gzip compression in the tarfile module. Fixes #1844 Change-Id: I19b265bf55314d38bdd53ccf20c49ecfe6d7618b PiperOrigin-RevId: 170077036
* Add integration tests for android_sdk_repository() and ↵Gravatar jingwen2017-09-27
| | | | | | | | | | | | | | | | | | | | | android_ndk_repository() for testing invalid directory path attributes, and improve error descriptiveness. Moved AndroidRepositoryUtils logic into an abstract AndroidRepositoryFunction that Android{S,N}dkRepositoryFunction extends from. Examples of error messages: 1) Invalid NDK path ERROR: Analysis of target '//examples/android/java/bazel:hello_world' failed; build aborted: in target '//external:android/crosstool': no such package '@androidndk//': Could not read RELEASE.TXT in Android NDK: /tmp/RELEASE.TXT (No such file or directory) Unable to read the Android NDK at /tmp, the path may be invalid. Is thepath in android_ndk_repository() or ANDROID_NDK_HOME set correctly? If the path is correct, the contents in the Android NDK directory may have been modified. Please remove the NDK and download it again with the Android SDK manager. 2) Invalid SDK path ERROR: Analysis of target '//examples/android/java/bazel:hello_world' failed; build aborted: no such package '@androidsdk//com.android.support': Expected directory at /tmp/platforms but it is not a directory or it does not exist. Unable to read the Android SDK at /tmp, the path may be invalid. Is the path in android_sdk_repository() or ANDROID_HOME set correctly? If the path is correct, the contents in the Android SDK directory may have been modified. Please remove the SDK and download it again with the Android SDK manager. GITHUB: #3740 RELNOTES: None. PiperOrigin-RevId: 170068567
* Use @SafeVarargs for AbstractObjectCodecTest constructorGravatar brandjon2017-09-27
| | | | | RELNOTES: None PiperOrigin-RevId: 170064410
* Make build_event_stream_test more portableGravatar aehlig2017-09-27
| | | | | | | | | - Make regexp to look for more strict; 'success' is too generic a keyword as it also matches the UI output 'Build did NOT complete successfully'. - Do not rely on backticks throwing away trailing carriage returns; mask them instead. PiperOrigin-RevId: 170063590
* Skylint: ignore naming conventions for importsGravatar fzaiser2017-09-27
| | | | | | | | Often the author of a file doesn't have control over the naming in its dependencies, so we shouldn't warn about these. RELNOTES: none PiperOrigin-RevId: 170062766
* Collect action cache hits, misses, and reasons for the misses.Gravatar jmmv2017-09-27
| | | | | | | | As a bonus, this brings in a bunch of new unit tests for the ActionCacheChecker. RELNOTES: None. PiperOrigin-RevId: 170059577
* Ensure that SpawnResults make their way back to the SpawnActions that caused ↵Gravatar ruperts2017-09-27
| | | | | | | them to be created. RELNOTES: None. PiperOrigin-RevId: 170058295
* Limit //external:android_sdk_for_testing to only the minimum files needed.Gravatar ajmichael2017-09-27
| | | | | | | | | | Note that the support libraries are excluded on Windows, because Windows runfiles are zipped and the support libraries are very big. First step towards https://github.com/bazelbuild/bazel/issues/3663 RELNOTES: None PiperOrigin-RevId: 170057391
* Update version numbers in installer file names.Gravatar Googler2017-09-27
| | | | PiperOrigin-RevId: 170057335
* Skylint: check that load statements are at the top of the fileGravatar fzaiser2017-09-27
| | | | | RELNOTES: none PiperOrigin-RevId: 170057295
* Make UnionFileSystem accept all paths Bazel can throw at it.Gravatar ccalvarin2017-09-27
| | | | | | | | | Instead of relying on a character-by-character StringTrie, segment paths based on PathFragments. This means UnionFS can accept any path that Bazel stores internally, removing the ASCII limitations. This also means removing the ability to have a filesystem bound for sub-PathFragments, /foo/barbar, /foo/barqux could have the same filesystem bound at /foo/bar. This feature was tested for when a use case was envisioned, but it was never used, so removing it is safe. RELNOTES: None. PiperOrigin-RevId: 170054656