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

Error using Gazelle extension with --incompatible_disallow_empty_glob enabled #431

Closed
cgrindel opened this issue Feb 8, 2023 · 1 comment · Fixed by #432
Closed

Error using Gazelle extension with --incompatible_disallow_empty_glob enabled #431

cgrindel opened this issue Feb 8, 2023 · 1 comment · Fixed by #432
Assignees

Comments

@cgrindel
Copy link
Contributor

cgrindel commented Feb 8, 2023

Error Message

ERROR: Traceback (most recent call last):
	File "/private/var/tmp/_bazel_chuck/91330c3c30ebaed046a35357439e8c08/external/bazel_skylib_gazelle_plugin/bzl/BUILD", line 28, column 13, in <toplevel>
		] + glob([
Error in glob: glob pattern 'testdata/**' 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: /Users/chuck/code/cgrindel/bazel-starlib/renovate/bazel_skylib-1.x/BUILD.bazel:15:15: Target '@bazel_skylib_gazelle_plugin//bzl:bzl' contains an error and its package is in error and referenced by '//:gazelle_bin'

It looks like the Gazelle extension is packaged without its test data. This glob causes the error when --incompatible_disallow_empty_glob is enabled. I suspect that we just need to explicitly set allow_empty = True in that glob.

@tetromino tetromino self-assigned this Feb 8, 2023
@cgrindel
Copy link
Contributor Author

cgrindel commented Feb 8, 2023

FYI. I am going to put up a PR in a moment.

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 a pull request may close this issue.

2 participants