build(bazel): update to bazel 0.27.0 and fix compat in @angular/bazel package (#31019)
ctx.actions.declare_file now used in @angular/bazel ng_module rule as ctx.new_file is now deprecated. Fixes error: ``` File "ng_module.bzl", line 272, in _expected_outs ctx.new_file(ctx.genfiles_dir, (ctx.label.name ...")) Use ctx.actions.declare_file instead of ctx.new_file. Use --incompatible_new_actions_api=false to temporarily disable this check. ``` This can be worked around with incompatible_new_actions_api flag but may as well fix it proper so downstream doesn't require this flag due to this code. Also, depset() is no longer iterable by default without a flag. This required fixing in a few spots in @angular/bazel. fix: foo PR Close #31019
This commit is contained in:

committed by
Kara Erickson

parent
f7e9659c4d
commit
28d3bfc416
@ -20,3 +20,7 @@ build --symlink_prefix=/
|
||||
# Turn on managed directories feature in Bazel
|
||||
# This allows us to avoid installing a second copy of node_modules
|
||||
common --experimental_allow_incremental_repository_updates
|
||||
|
||||
# Temporary flag to for using nodejs rules 0.31.1 with Bazel 0.27.0
|
||||
# TODO(gregmagolan): remove after updating to next nodejs rules release
|
||||
common --incompatible_depset_is_not_iterable=false
|
||||
|
@ -25,6 +25,7 @@ load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_reposi
|
||||
|
||||
# Bazel version must be at least the following version because:
|
||||
# - 0.26.0 managed_directories feature added which is required for nodejs rules 0.30.0
|
||||
# - 0.27.0 has a fix for managed_directories after `rm -rf node_modules`
|
||||
check_bazel_version(
|
||||
message = """
|
||||
You no longer need to install Bazel on your machine.
|
||||
@ -33,7 +34,7 @@ Try running `yarn bazel` instead.
|
||||
(If you did run that, check that you've got a fresh `yarn install`)
|
||||
|
||||
""",
|
||||
minimum_bazel_version = "0.26.0",
|
||||
minimum_bazel_version = "0.27.0",
|
||||
)
|
||||
|
||||
# Setup the Node.js toolchain
|
||||
|
Reference in New Issue
Block a user