Bazel 1.0 has just been released. As we announced before we start following semantic versioning for Bazel releases. We'll maintain at least three-month stability windows between Bazel major (backward-incompatible) releases.
Incompatible changes
Before updating to Bazel 1.0, first check if your codebase is compatible either by running bazelisk --migrate or by building your code with Bazel 0.29.1 and the following flags:
-
--incompatible_assignment_identifiers_have_local_scope -
--incompatible_auto_configure_host_platform -
--incompatible_disable_legacy_proto_provider -
--incompatible_disable_nocopts -
--incompatible_disable_partition_default_parameter -
--incompatible_disable_proto_source_root -
--incompatible_disable_static_cc_toolchains -
--incompatible_disallow_hashing_frozen_mutables -
--incompatible_disallow_legacy_java_provider -
--incompatible_disallow_legacy_javainfo -
--incompatible_disallow_rule_execution_platform_constraints_allowed -
--incompatible_disallow_split_empty_separator -
--incompatible_do_not_emit_buggy_external_repo_import -
--incompatible_enable_profile_by_default -
--incompatible_generated_protos_in_virtual_imports -
--incompatible_make_thinlto_command_lines_standalone -
--incompatible_no_target_output_group -
--incompatible_remove_legacy_whole_archive -
--incompatible_require_java_toolchain_header_compiler_direct -
--incompatible_restrict_attribute_names -
--incompatible_restrict_named_params -
--incompatible_skip_genfiles_symlink -
--incompatible_tls_enabled_removed -
--incompatible_use_aapt2_by_default -
--incompatible_use_native_patch -
--incompatible_use_specific_tool_files -
--incompatible_windows_bashless_run_command -
--incompatible_windows_native_test_wrapper
Windows
-
genrulenow supportscmd_bash,cmd_ps, andcmd_batattributes for better integration on Windows. - C++: you can now get a generated DEF file from the
def_fileoutput group of cc_library. - MSYS2 / Bash: testing targets ("bazel test //foo"), running binary targets ("bazel run //bar"), and fetching repository rules no longer require MSYS2. See (respectively) the
--[no]incompatible_windows_native_test_wrapper,--[no]incompatible_windows_bashless_run_command, and--[no]incompatible_use_native_patchflags: all are enabled by default.
Execution
- Set
--experimental_allow_tags_propagationflag to propagate tags to the action's execution requirements from targets. Such tags should start with: no-, requires-, supports-, block-, disable-, cpu:. See #8830 for details. - All rules now have a default
exec_propertiesattribute just like the one on a platform rule. - All gRPC connections from Bazel will default to TLS enabled. To disable TLS use the grpc:// scheme in your URIs. Flags affected are:
--remote_cache,--remote_executorand--bes_backend. See #8061 for details. - Make either
--subcommandsor--verbose_failuresimply--materialize_param_files
Configurability
-
config_settingcan now check multiple values on "--foo=firstVal --foo=secondVal ..."-style flags - Platform-specific bazelrc: with
--enable_platform_specific_configyou can enable flags in bazelrc according to your host platform.
Android
-
aapt2is now enabled by default. To revert toaapt, set the--android_aapt=aaptflag. - Fixed Windows path issues with
aapt2. See the GitHub issue for more information.
C++
-
cc_*rules support non-transitive defines through alocal_definesattribute. - Bazel now supports ThinLTO builds on Linux for Clang versions 6.0 or above. ThinLTO can be enabled through
--features=thin_lto.
Java
- Deprecated Java-Starlark API
java_common.create_provideris removed. JavaInfo() legacy args (actions,sources,source_jars,use_ijar,java_toolchain,host_javabase) are removed (see #5821). -
maven_jarandmaven_servernow disallow using plain HTTP URLs without a specified checksum. If you are still usingmaven_jar, consider migrating torules_jvm_externalfor transitive dependency management. See #8607 for more information. - Added
sha256andsha256_srcattributes tomaven_jar. Please consider migrating to SHA-256 as SHA-1 has been deemed cryptographically insecure. Or, userules_jvm_externalto manage your transitive Maven dependencies with artifact pinning and SHA-256 verification support.
This release contains contributions from many people at Google, as well as Adam Liddell, Alessandro Patti, Arshabh Kumar Agarwal, Artem Pelenitsyn, Artem Zinnatullin, Benjamin Peterson, Emmanuel Goh, Farhim Ferdous, George Gensure, Keith Smiley, Kiril Videlov, Mantas Sakalauskas, Marwan Tammam, Matt Mukerjee, panzhongxian, Shachar Anchelovich, Stepan Koltsov, Stephan Wolski, Travis Clarke, Yannic Bonenberger, Yuta Saito.