Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix --incompatible_disallow_empty_glob=true for Bazel 8 #375

Merged
merged 1 commit into from
Jan 17, 2025
Merged
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
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cc_library(
name = @name@,
srcs = @srcs@,
hdrs = glob(["{}/**/*.h*".format(x) for x in @headers@]),
hdrs = glob(["{}/**/*.h*".format(x) for x in @headers@], allow_empty = True),
includes = @includes@,
copts = @copts@,
defines = @defines@,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
py_library(
name = @name@,
srcs = glob(["{}/**/*.py".format(x) for x in @tops@]),
srcs = glob(["{}/**/*.py".format(x) for x in @tops@], allow_empty = True),
data = glob(
include=[
"{}/**/*.*".format(x) for x in @tops@
] + [
"{}/*".format(x) for x in @eggs@
],
exclude=["**/*.py", "**/*.so"],
allow_empty = True,
) + @data@,
imports = @imports@,
deps = @deps@,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ cc_library(

py_library(
name = @name@,
srcs = glob(["{}/**/*.py".format(x) for x in @tops@]),
srcs = glob(["{}/**/*.py".format(x) for x in @tops@], allow_empty = True),
data = glob(
include=[
"{}/**/*.*".format(x) for x in @tops@
] + [
"{}/*".format(x) for x in @eggs@
],
exclude=["**/*.py", "**/*.so"],
allow_empty = True,
) + @data@,
imports = @imports@,
deps = @deps@,
Expand Down
3 changes: 2 additions & 1 deletion bazel_ros2_rules/ros2/tools/common.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def share_filegroup(name, share_directories):
"*/*.bash",
"*/*.dsv",
],
allow_empty = True,
) if " " not in path],
# NOTE(hidmic): workaround lack of support for spaces.
# See https://github.com/bazelbuild/bazel/issues/4327.
Expand All @@ -30,7 +31,7 @@ def interfaces_filegroup(name, share_directory):
"{}/**/*.msg".format(share_directory),
"{}/**/*.srv".format(share_directory),
"{}/**/*.action".format(share_directory),
]),
], allow_empty = True),
)

def incorporate_rmw_implementation(kwargs, env_changes, rmw_implementation):
Expand Down
Loading