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

Build breakage with --incompatible_disallow_empty_glob and local SDK #3312

Closed
adam-azarchs opened this issue Oct 5, 2022 · 0 comments · Fixed by #3313
Closed

Build breakage with --incompatible_disallow_empty_glob and local SDK #3312

adam-azarchs opened this issue Oct 5, 2022 · 0 comments · Fixed by #3313

Comments

@adam-azarchs
Copy link
Contributor

What version of rules_go are you using?

0.35.0

What version of gazelle are you using?

0.24.0

What version of Bazel are you using?

5.3.1

Does this issue reproduce with the latest releases of all the above?

Yes.

What operating system and processor architecture are you using?

Linux / x86-64

Any other potentially useful information about your toolchain?

n/a

What did you do?

Registering a local go sdk as the toolchain, attempt to build with

--incompatible_disallow_empty_glob

What did you expect to see?

Working build.

What did you see instead?

ERROR: Traceback (most recent call last):
        File "/mnt/bazelbuild/user/adam.azarchs/267a865d5f7763da8199c0cd15d6e22f/external/go_sdk/BUILD.bazel", line 128, column 9, in <toplevel>
                glob([
Error in glob: glob pattern 'misc/wasm/**' 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`).

This problem was introduced in #3266, which pulls the wasm files into the build. Unfortunately, that change didn't update https://github.com/bazelbuild/rules_go/blob/8226b88bd82ebab2b7a4db096e9c30c53a1600df/go/private/sdk.bzl#L225-L227
so the result is an empty glob there.

That's not great for people who want to use --incompatible_disallow_empty_glob, but it's actually worse for people who want to build WASM with a local toolchain, where they might want to actually have those files, but won't.

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.

1 participant