We've just released Bazel 0.14!
BUILD and bzl files
- Labels starting with more than two slashes are disallowed (e.g.
/operator is deprecated in favor of
//(floor integer division). Try the
--incompatible_disallow_slash_operatorflag to ensure your code is forward-compatible.
- Args objects (
ctx.actions.args()) have new methods
add_joined()for building command lines using depsets. The
add()method has a new overload:
- Added flag
--incompatible_disallow_old_style_args_addto help migrate from
- FileType is deprecated and will be removed soon. Try the
--incompatible_disallow_filetypeflag to ensure your code is forward-compatible.
- Removed flag
ctx.actions.run_shell. Tools are label-type attributes marked
executable=True, whose runfiles are available to the action. Currently tools are passed in using the
inputsparameter, but in the future it will be required to pass them through
- You can now access runfiles (data-dependencies) from shell scripts in
sh_*rules in a platform-independent way. See top of //tools/bash/runfiles/runfiles.bash for usage information.
optional_compiler_flagfield was removed from
- Fixed start/end lib expansion for linking used with
lld. There were many cases where archive files were still being used with toolchains that support start/end lib.
fdo_profilerule that allows architecture-sensitive specification of fdo profiles. This rule has the same function as
--fdo_optimizeand will replace it in the future.
header_compilerto be an arbitrary executable.
java_toolchain.javacoptsby default; explicitly retrieving them using the experimental
- The JavaInfo provider created by
java_common.create_providernow includes both direct and transitive arguments in
--incompatible_disallow_legacy_javainfoflag to make an error the use of old-style JavaInfo provider construction methods (
- Add a new
JavaInfoprovider constructor. See design document.
- Command canonicalize-flags no longer reorders the flags.
- Remove vestigial
bazel runnow lets one run interactive binaries. The
BUILD_WORKING_DIRECTORYenvironment variables indicate the working directory and the workspace root of the Bazel invocation. Tests are provided with an approximation of the official test environment.
- Repository rules are no longer restricted to return
None. This is the first step in the transition towards generating WORKSPACE.resolved files, where source-like repository rules are expected to return the information needed to be a reproducible versions of themselves (for more details see the design document). At the moment, the return value is simply ignored (and debug-printed), but lifting the restriction allows rules to transition already.
- Bazel now supports running actions inside Docker containers. To use this feature, run
bazel build --spawn_strategy=docker --experimental_docker_image=myimage:latest.
- Remote execution works for Windows binaries with launchers.
- We replaced the
--experimental_local_disk_cache_pathflags into a single
--disk_cacheflag. Additionally, Bazel now tries to create the disk cache directory if it doesn't exist.
- Allow --workermaxinstances to take
MnemonicName=valueto specify max for each worker.
- We shared plans around a Rules Curation process. The goal is to promote a set of high quality rules, reduce breakages and improve stability of these rules.
- Yugui wrote a prototype version of rules_ruby.
- There is a new Google codelab on Building Android Apps with Bazel.
- cabal2bazel, a tool for fetching Haskell Cabal packages from Hackage into Bazel, was recently open sourced.
- Luc Perkins has created Colossus, a project on GitHub showing how Bazel can be used in a multi-lingual, microservice-driven setting. It uses Kubernetes, Go, Java, Docker, and gRPC.
- Ed Schouten started new rules for Latex.