-
Hi, while i'm mostly using code-generation features ( As this target has quite some effect on build-time, i'm trying to turn it off by default and allow to enable explicitly (for use in CI). Do the rules of this project, e.g. The following should demonstrate the issue: load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
bool_flag(
name = "flag",
build_setting_default = False,
visibility = ["//visibility:public"],
)
config_setting(
name = "with_canary",
flag_values = {
":flag": "true",
},
)
# working
# built with bazelisk build --//:flag //...
# not built with bazelisk build //...
cc_binary(
name = 'test',
srcs = ['test.cc'],
target_compatible_with = select({
":with_canary": [],
"//conditions:default": ["@platforms//:incompatible"],
}),
)
# not working
# always built
cpp_grpc_library(
name = "xxx-api-grpc-canary",
protos = code_gen_deps_xxx_api +
code_gen_deps_yyy_api,
target_compatible_with = select({
":with_canary": [],
"//conditions:default": ["@platforms//:incompatible"],
}),
) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I think this is related to #218, where some more attrs need propagating within the library macro. I'll be adding this for 4.3.0 in #227 |
Beta Was this translation helpful? Give feedback.
I think this is related to #218, where some more attrs need propagating within the library macro. I'll be adding this for 4.3.0 in #227