Bazel 0.13 has just been released!
BUILD / bzl files
- The flag
--incompatible_show_all_print_messagesis removed. Messages generated by print statements from any package will be displayed as debug messages. - The
--incompatible_disallow_uncalled_set_constructorflag is no longer available, the set constructor has been completely removed. Use depset instead. - Variables
PACKAGE_NAMEandREPOSITORY_NAMEare deprecated in favor of functions package_name() and repository_name(). - Do not auto-detect base in the int() function if the input starts with '0'.
- Strings have a new .elems() method that provides an iterator on the characters of the string.
Android
- The android.jar target
//tools/defaults:android_jarhas been moved to@bazel_tools//tools/android:android_jar. - In android_binary, the attribute
manifest_mergerhas been removed, and thelegacymerging strategy is no longer supported. Manifests are now merged according to the semantics on the Android Studio documentation page. - The AAR output of an
android_librarytarget now packages the mergedproguard.txtfrom theproguard_specsattribute. It does not contain the proguard specs of transitive dependencies. android_library AAR output now containsproguard.txt. - Enable dependency checking for aar_import targets.
C++
- Remove
optional_*_flagfields from CROSSTOOL, they are not used, and could be expressed using features. - Unified
action_configsfor static libraries. So instead of 4action_configsyou only have to specify onec++-link-static-library. - Properly handle tree artifacts on the link command line coming from a cc_library dependency. See example of usage. Generated header propagation is not yet supported.
- In Windows, you can now pass
--experimental_shortened_obj_file_path=trueto shorten the object file path. Use this flag to mitigate C++ compilation errors from too long paths on Windows. - You can now access three new functions in
windows_cc_configure.bzlviaload("@bazel_tools/tools/cpp:windows_cc_configure.bzl", "<function_name>") - Move (c/cxx)opts from
legacy_compile_flagstouser_compile_flagsbuild variable.
Objective C
- The j2objc configuration fragment has been exposed.
- Introduce
--incompatible_disable_objc_provider_resourcesto turn off all resource-related fields of the Objc provider.
Misc
- In the Debian and Fedora packages, the global bazelrc (typically installed at
/etc/bazel.bazelrc) is an empty file, removing the previous[--action_env](https://docs.bazel.build/versions/master/command-line-reference.html#flag--action_env)and[--test_env](https://docs.bazel.build/versions/master/command-line-reference.html#flag--test_env)defaults. If the file has been changed on your local system, your package manager may report that you need to manually merge the change. - The
BUILD_TIMESTAMPfield involatile-status.txtnow contains seconds (and not milliseconds) since the epoch. For more information, see the User's Manual. - Bazel now displays information about remote cache hits and execution strategies used in its UI after every build and test. It also adds a corresponding "process stats" line to BuildToolLogs event in BEP.
- Print correct build result for builds with
--aspectsflag. - Removed support for
bazel dump --vfs, as it's no longer meaningful.
Community update
- Salesforce released a tool to migrate from Maven to Bazel.
- Ulf Adams gave a talk at SF Scala: Bazel - a Brief Overview.
Discuss on Hacker News.