Bazel 0.17 is out. The language and the API have been renamed from Skylark to Starlark. See the announcement and the dedicated GitHub repository.

We are now using our own Homebrew Tap. See the blog post for details.

Over the last few weeks, we've been updating our roadmaps on the website.

Below are the main changes since 0.16.

Remote Execution API V2

Migrated to Remote Execution API v2. See Remote API repository, and RE API revisions document. Major API changes include:

Execute / Watch have been combined and the separate Watcher API has been deprecated.

Output files/directories and Platform have moved from Action to Command. Action is now referenced by Digest.

Inline outputs have been deprecated.

Action and Command are now uploaded together with ActionResult on local execution.

Query

The new (experimental) aquery command allows the retrieval of analysis time information for the action graph.

Starlark

If the same artifact is generated by two distinct but identical actions, and a downstream action has both those actions' outputs in its inputs, the artifact now appears twice in the downstream action's inputs. If this causes problems in Starlark actions, use the uniquify=True argument in Args.add_all .

argument in . A rule error is now thrown if a rule implementation function returns multiple providers of the same type. Use the --incompatible_disallow_conflicting_providers flag to make your code is forward-compatible.

Windows

The --experimental_shortened_obj_file_path flag has been deprecated. Bazel now always generates a short object file path. For more details, see this doc.

flag has been deprecated. Bazel now always generates a short object file path. For more details, see this doc. When the BAZEL_SH environment variable is not set and Bazel searches for bash.exe , Bazel no longer looks for git bash and no longer recommends installing it as a bash implementation. See issue #5751.

C++

The FULLY_STATIC linking mode has been removed from C++ rules.

linking mode has been removed from C++ rules. Python wrapper scripts for MSVC have been removed.

Labels in C++ rules' linkopts attribute are no longer expanded unless they are wrapped. For example: $(location //foo:bar) .

Android

Fixed compatibility with aar_import when using aapt2. aapt2 is now supported for Android app builds without resource shrinking. To use it, pass the --android_aapt=aapt2 flag or define android_binary.aapt_version = "aapt2" in your BUILD file.

is now supported for Android app builds without resource shrinking. To use it, pass the flag or define in your BUILD file. Added support for Android NDK r17. The default STL is now libc++ . Support for targeting mips , mips64 and ARMv5 ( armeabi ) has been removed.

. Support for targeting , and ( ) has been removed. For Android incremental dexing actions, Bazel now persists its DexBuilder process across individual actions, with built-in caching of dexing outputs. Our benchmarks show a 1.2x speedup for clean local builds.

Apple

The standard xcode_VERSION feature now always uses exactly two components in the version, even if you specify --xcode_version with more or fewer than two.

Java

Support for java_runtime_suite has been removed. Use alias() with select() instead.

has been removed. Use with instead. JavaInfo outputs are now merged in java_common.merge() .

. Code coverage is now collected for Java binaries invoked from sh_test .

. java_common.compile now creates the native headers .jar file accessible via JavaInfo.outputs.native_headers .

now creates the native headers .jar file accessible via . The --host_javabase startup flag has been renamed to --server_javabase to avoid confusion with the --host_javabase build flag.

startup flag has been renamed to to avoid confusion with the build flag. The gen_jars output group has been removed.

output group has been removed. The Java runfiles library is now in @bazel_tools//tools/java/runfiles . The old target ( @bazel_tools//tools/runfiles:java-runfiles ) has been deprecated and will be removed in Bazel 0.19.0.

library is now in . The old target ( ) has been deprecated and will be removed in Bazel 0.19.0. Bazel now ships with Java Development Kit version 10.

The default java_toolchain no longer supports using JDK 8 as a --host_javabase . To use JDK 8 as a --host_javabase , also set --host_java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8 --java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8 . toolchain_hostjdk8 uses VanillaJavaBuilder, which does not support Error Prone, Strict Java Deps, or reduced classpaths, and disables header compilation.

External Repositories

Loading @bazel_tools//tools/build_defs/repo:git_repositories.bzl has been disabled. Load @bazel_tools//tools/build_defs/repo:git.bzl instead.

has been disabled. Load instead. New options --experimental_repository_hash_file and --experimental_verify_repository_rules allow the verification of repositories the directory generated against pre-recorded hashes. See documentation for those options.

Execution

The new --remote_cache_proxy flag allows remote HTTP caching connections via Unix domain sockets.

flag allows remote HTTP caching connections via Unix domain sockets. Open TCP connection count for remote caching is now limited to 100 by default. You can specify a different limit using the --remote_max_connections flag.

flag. The --subcommands flag now takes the pretty_print value ( --subcommands=pretty_print ), which prints the arguments of subcommands as a list for easier reading.

flag now takes the value ( ), which prints the arguments of subcommands as a list for easier reading. Bazel no longer defaults to non-sandboxed local execution when falling back from remote execution to local execution. Use the new --remote_local_fallback_strategy=<strategy> flag to specify the desired fallback strategy.

Miscellaneous

The deprecated no-op flag --show_package_location has been removed.

has been removed. Bazel now allows @ in package names. For example, node_modules/@namespace_foo/lib_bar (a common pattern for NPM) is now an allowed package name.

in package names. For example, (a common pattern for NPM) is now an allowed package name. The --defer_param_files flag now defaults to true . As a result, Bazel now writes the parameter file during action execution instead of as a separate action. This is faster and requires less memory than using a separate action. When using remote execution, pass the --materialize_param_files flag to inspect the file locally (for example, for debugging purposes).

flag now defaults to . As a result, Bazel now writes the parameter file during action execution instead of as a separate action. This is faster and requires less memory than using a separate action. When using remote execution, pass the flag to inspect the file locally (for example, for debugging purposes). Bazel now supports a .bazelignore file that tells Bazel directories to ignore. These directories still have to be well-founded and, in particular, must not contain symlink cycles.

Community

Did we miss anything? Fill the form to suggest content for a next blog post.

Thank you to our contributors!

This release contains contributions from many people at Google, as well as: Alex Beggs, Arielle Albon, Austin Schuh, Benjamin Peterson, Bin Lu, Clint Harrison, Dan Fabulich, David Ostrovsky, David Pursehouse, Ed Baunton, Ed Schouten, George Gensure, Gregor Jasny, Loo Rong Jie, Rishabh Chakrabarti, Robert Gay, Stephan Pleines, Taras Tsugrii, Vladimir Zaytsev, Wayou Liu, wylazy, and Yannic Bonenberger.

Thank you to everyone who contributed to this release!