Skip to content

Commit

Permalink
Fix --incompatible_disallow_empty_glob=true for Bazel 8 (#375)
Browse files Browse the repository at this point in the history
  • Loading branch information
jwnimmer-tri authored Jan 17, 2025
1 parent 7f47134 commit b6fba61
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
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

0 comments on commit b6fba61

Please sign in to comment.