Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ build --noenable_bzlmod
# feature flags
#

# value [auto, on, off]
# 'auto' is platform dependent ('on' on Linux and QNX, 'off' on other OS) and the default value if the flag is not set
#build --//:feature_acl=off
# value [True, False]. Default: False.
# Here we turn on the setting for Linux in this repo. Downstream consumers are unaffected.
build:linux --//:feature_acl=True
Comment on lines +49 to +50
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I like this approach. It changes the semantics since this file is only respected for the iceoryx repository. For our users that means that ACL is now suddenly deactivated by default. What's wrong with the previous approach?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in the ticket, the previous approach caused broken builds in CIs such as ours and the Bazel BCR where libacl is not installed on the host (and should not be).

As you mentioned that Bazel is only really supported from the upcoming 3.0 version I feel this default isn't set in stone, wdyt?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not set in stone, but since bazel was not supported in v2.0, quite a lot of our users which need bazel are already using v2.95. I know especially about users who are still using the WORKSPACE approach with bazel 6.2, that's why I'm more concerned with that one and I think we didn't silently break anything for them with the recent PRs. This one would be a silent break since libacl would not be used anymore by default.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could be added to the change log / release notes and then it's not as silent anymore ;)

7 changes: 3 additions & 4 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,16 @@
#
# SPDX-License-Identifier: Apache-2.0

load("@bazel_skylib//rules:common_settings.bzl", "string_flag")
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
load("@buildifier_prebuilt//:rules.bzl", "buildifier")

exports_files(["LICENSE"])

exports_files(["VERSION"])

# values: auto, on, off
string_flag(
bool_flag(
name = "feature_acl",
build_setting_default = "auto",
build_setting_default = False,
visibility = ["//visibility:public"],
)

Expand Down
37 changes: 1 addition & 36 deletions iceoryx_platform/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#
# SPDX-License-Identifier: Apache-2.0

load("@bazel_skylib//lib:selects.bzl", "selects")
load("@rules_cc//cc:defs.bzl", "cc_library")
load("//bazel:configure_file.bzl", "configure_file")
load("//bazel:configure_version.bzl", "configure_version")
Expand Down Expand Up @@ -67,42 +66,8 @@ configure_version(
)

config_setting(
name = "acl_auto",
flag_values = {
"//:feature_acl": "auto",
},
)

config_setting(
name = "acl_enabled",
flag_values = {
"//:feature_acl": "on",
},
)

selects.config_setting_group(
name = "acl_linux_enabled",
match_all = [
":linux",
":acl_auto",
],
)

selects.config_setting_group(
name = "acl_qnx_enabled",
match_all = [
":qnx",
":acl_auto",
],
)

selects.config_setting_group(
name = "cfg_feature_acl",
match_any = [
":acl_enabled",
":acl_linux_enabled",
":acl_qnx_enabled",
],
flag_values = {"//:feature_acl": "True"},
)

configure_file(
Expand Down
Loading