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

--incompatible_disallow_empty_glob fails with local JDK #14646

Closed
erikkerber opened this issue Jan 26, 2022 · 5 comments
Closed

--incompatible_disallow_empty_glob fails with local JDK #14646

erikkerber opened this issue Jan 26, 2022 · 5 comments
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Rules-Java Issues for Java rules

Comments

@erikkerber
Copy link

Description of the problem / feature request:

Setting --incompatible_disallow_empty_glob fails on an empty blob in the local_jdk BAZEL.build file:

ERROR: Traceback (most recent call last):
--
  | File "/private/var/tmp/_bazel_user/757d2abf201e5b6570ee61ba6989ac5c/external/local_jdk/BUILD.bazel", line 177, column 16, in <toplevel>
  | srcs = glob(["include/**"]),
  | Error in glob: glob pattern 'include/**' 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).

Feature requests: what underlying problem are you trying to solve with this feature?

Use --incompatible_disallow_empty_glob

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

I believe have a local JDK installed and attempt to build with --incompatible_disallow_empty_glob

What operating system are you running Bazel on?

macOS 15.2

What's the output of bazel info release?

release 5.0.0

If bazel info release returns "development version" or "(@non-git)", tell us how you built Bazel.

N/A

What's the output of git remote get-url origin ; git rev-parse master ; git rev-parse HEAD ?

N/A

Have you found anything relevant by searching the web?

I have not

Any other information, logs, or outputs that you want to share?

Replace this line with your answer.

@gregestren gregestren added team-Rules-Java Issues for Java rules untriaged labels Jan 31, 2022
@comius
Copy link
Contributor

comius commented Feb 2, 2022

The problem is here

filegroup(

It's also interesting, because include directory is present on Mac OS.

@erikkerber Do you care to reveal what JDK version you're using? It should be located under /Library/Java/JavaVirtualMachines/*/Contents/Home

@comius comius added P3 We're not considering working on this, but happy to review a PR. (No assignee) and removed untriaged labels Feb 2, 2022
@erikkerber
Copy link
Author

Looks like jdk1.8.0_271.jdk

It might help to clarify I only see this on our CI environment, which uses hosted macOS machines where the configuration ownership is one step away from my team.

@brentleyjones
Copy link
Contributor

@Wyverald Could this get in 5.0.1?

@brentleyjones
Copy link
Contributor

@bazel-io fork 5.1

brentleyjones pushed a commit to brentleyjones/bazel that referenced this issue Feb 16, 2022
Fixes bazelbuild#14646

Closes bazelbuild#14687.

PiperOrigin-RevId: 426080540
(cherry picked from commit c2ddbd1)
Wyverald pushed a commit that referenced this issue Feb 16, 2022
Fixes #14646

Closes #14687.

PiperOrigin-RevId: 426080540
(cherry picked from commit c2ddbd1)

Co-authored-by: Ivo List <ilist@google.com>
@keith
Copy link
Member

keith commented Apr 3, 2023

Related bazelbuild/rules_java#101

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Rules-Java Issues for Java rules
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants