Skip to content

Commit f9ea4ac

Browse files
authored
fix(windows): unbreak CI with allow_empty (bazel-contrib#3681)
We had an in-flight collision between two PRs. bazel-contrib#3679 added a cc_library, but Node.js doesn't ship the required headers on Windows, so it wouldn't work there. bazel-contrib#3621 disallows empty glob, which breaks because of the missing headers. Just add the allow_empty here to make it green.
1 parent 9007dc7 commit f9ea4ac

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

nodejs/repositories.bzl

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,17 @@ filegroup(
341341
)
342342
cc_library(
343343
name = "headers",
344-
hdrs = glob(["bin/nodejs/include/node/**"]),
344+
hdrs = glob(
345+
["bin/nodejs/include/node/**"],
346+
# Apparently, node.js doesn't ship the headers in their Windows package.
347+
# https://stackoverflow.com/questions/50745670/nodejs-headers-on-windows-are-not-installed-automatically
348+
# I see the same thing from downloading
349+
# https://nodejs.org/dist/v18.17.1/node-v18.17.1-win-x64.zip
350+
# and run
351+
# unzip -t ~/Downloads/node-v18.17.1-win-x64.zip | grep uv\\.h
352+
# -> no results ...
353+
allow_empty = True,
354+
),
345355
includes = ["bin/nodejs/include/node"],
346356
)
347357
""".format(

0 commit comments

Comments
 (0)