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 non-existent paths being included in globs #145

Merged
merged 2 commits into from
Jan 11, 2024

Conversation

robinlinden
Copy link
Contributor

@robinlinden robinlinden commented Jan 11, 2024

I hit this after updating to v2.2.0 where the new zig sdk only includes a any-macos-any include folder.

 ERROR: Traceback (most recent call last):
	File "/home/runner/.cache/bazel/_bazel_runner/a9f0723b1e9e47cd91eaa9d5188be59d/external/zig_sdk/BUILD", line 11, column 14, in <toplevel>
		declare_files(
	File "/home/runner/.cache/bazel/_bazel_runner/a9f0723b1e9e47cd91eaa9d5188be59d/external/hermetic_cc_toolchain/toolchain/defs.bzl", line 257, column 36, in declare_files
		all_includes = [native.glob(["lib/{}/**".format(i)]) for i in target_config.includes]
Error in glob: glob pattern 'lib/libc/include/x86_64-macos.11-none/**' didn't match anything, but allow_empty is set to False (the default value of allow_empty can be set with --incompatible_disallow_empty_glob).
ERROR: /home/runner/.cache/bazel/_bazel_runner/a9f0723b1e9e47cd91eaa9d5188be59d/external/zig_sdk/BUILD: no such target '@@zig_sdk//:aarch64-linux-musl_cc': target 'aarch64-linux-musl_cc' not declared in package '' defined by /home/runner/.cache/bazel/_bazel_runner/a9f0723b1e9e47cd91eaa9d5188be59d/external/zig_sdk/BUILD (Tip: use `query "@zig_sdk//:*"` to see all the targets in that package)

@CLAassistant
Copy link

CLAassistant commented Jan 11, 2024

CLA assistant check
All committers have signed the CLA.

@@ -1,6 +1,7 @@
test --sandbox_default_allow_network=false
test --test_output=errors

build --incompatible_disallow_empty_glob
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice!

@motiejus motiejus merged commit 750383a into uber:main Jan 11, 2024
5 checks passed
@motiejus
Copy link
Collaborator

Thanks!

@robinlinden robinlinden deleted the fix-disallow-empty-glob-build branch January 11, 2024 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants