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

Starlark crashes evaluating repository_ctx.which("") #12216

Closed
chandlerc opened this issue Oct 3, 2020 · 0 comments
Closed

Starlark crashes evaluating repository_ctx.which("") #12216

chandlerc opened this issue Oct 3, 2020 · 0 comments
Assignees
Labels
team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: bug untriaged

Comments

@chandlerc
Copy link

Description of the problem / feature request:

I have a repository rule with repository_ctx.which("") (the empty string comes from some computation, but its not relevant here).

The result is:
Caused by: net.starlark.java.eval.Starlark$UncheckedEvalException: java.lang.IllegalArgumentException: Child must not be empty string ('')

(and a bunch of stack trace)

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

See above.

What operating system are you running Bazel on?

Linux

What's the output of bazel info release?

2020/10/03 08:47:38 Using unreleased version at commit d69744dca68f8258762d53a01d8dca3afb7ed2ac
Starting local Bazel server and connecting to it...
development version

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

I use Bazelisk and the last_green version.

chandlerc added a commit to chandlerc/llvm-bazel that referenced this issue Oct 3, 2020
I thought the `which` API would be well behaved here, but it produces
a hard error on a `None` argument. Using a default of `""` doesn't work
either because of bazelbuild/bazel#12216
chandlerc added a commit to google/llvm-bazel that referenced this issue Oct 3, 2020
I thought the `which` API would be well behaved here, but it produces
a hard error on a `None` argument. Using a default of `""` doesn't work
either because of bazelbuild/bazel#12216
@laurentlb laurentlb added team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website and removed team-Starlark labels Oct 9, 2020
@mai93 mai93 self-assigned this Jan 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: bug untriaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants