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 empty glob results #1828

Merged
merged 4 commits into from
Nov 9, 2022
Merged

Fix empty glob results #1828

merged 4 commits into from
Nov 9, 2022

Conversation

avdv
Copy link
Member

@avdv avdv commented Nov 4, 2022

Fixes #1827

I did enable the --incompatible_disallow_empty_glob flag and found a few problems with glob calls by it.

Unfortunately, we cannot yet flip the switch to disallow empty glob results, since the embedded bazel_tools repository of the Bazel version we are using is not yet ready:

https://github.com/bazelbuild/bazel/blob/f64b7553607e1d3572611cc5011c498e3cd4505c/tools/jdk/jdk.BUILD#L165-L169

That is the reason the bindist checks fail with an error:

ERROR: Traceback (most recent call last):
	File "/private/var/tmp/_bazel_runner/d1e3bdaa0c37ce8d00ecff62b05849c3/external/local_jdk/BUILD.bazel", line 168, column 16, in <toplevel>
		srcs = glob(["conf/**"]),
Error in glob: glob pattern 'conf/**' 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: /private/var/tmp/_bazel_runner/d1e3bdaa0c37ce8d00ecff62b05849c3/external/bazel_tools/tools/jdk/BUILD:336:6: Target '@local_jdk//:jdk' contains an error and its package is in error and referenced by '@bazel_tools//tools/jdk:jdk'

After review, I'll remove the flag again so CI will pass.

@avdv avdv changed the title Disallow empty glob results by default Fix empty glob results Nov 7, 2022
@avdv avdv force-pushed the disallow-empty-glob branch from 73eb1aa to b0ff209 Compare November 7, 2022 10:47
avdv added 3 commits November 7, 2022 11:50
* the lz4 package only contains the binaries, use the `lz4.out` output instead
* select the library files depending on the OS
This was actually a typo, since the directory is called `cabal-binary/` but since "**" already
matches all files recursively, remove the unneeded glob call.
@avdv avdv force-pushed the disallow-empty-glob branch from b0ff209 to 7366ce7 Compare November 7, 2022 10:51
@avdv avdv marked this pull request as ready for review November 7, 2022 10:54
@avdv avdv requested a review from k1nkreet November 7, 2022 10:54
WORKSPACE Show resolved Hide resolved
Copy link
Contributor

@k1nkreet k1nkreet left a comment

Choose a reason for hiding this comment

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

LGTM

@avdv avdv added the merge-queue merge on green CI label Nov 9, 2022
Since we are still using Bazel 4, we need to disable this flag again because the bazel_tools
repository is not ready for it yet.
@mergify mergify bot merged commit a27bc92 into master Nov 9, 2022
@mergify mergify bot deleted the disallow-empty-glob branch November 9, 2022 08:44
@mergify mergify bot removed the merge-queue merge on green CI label Nov 9, 2022
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.

rules_haskell does not build with incompatible_disallow_empty_glob
2 participants