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

NPE with mod show_extension #22642

Closed
laurentlb opened this issue Jun 5, 2024 · 0 comments
Closed

NPE with mod show_extension #22642

laurentlb opened this issue Jun 5, 2024 · 0 comments
Labels
P2 We'll consider working on this in future. (Assignee optional) team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: bug

Comments

@laurentlb
Copy link
Contributor

Description of the bug:


$ bazel mod show_extension @bazel_skylib//foo%bar.bzl
FATAL: bazel crashed due to an internal error. Printing stack trace:
java.lang.NullPointerException: Cannot invoke "com.google.common.collect.ImmutableSetMultimap.keySet()" because the return value of "com.google.common.collect.ImmutableMap.get(Object)" is null
	at com.google.devtools.build.lib.bazel.bzlmod.modcommand.ModExecutor.displayExtension(ModExecutor.java:472)
	at com.google.devtools.build.lib.bazel.bzlmod.modcommand.ModExecutor.showExtension(ModExecutor.java:145)
	at com.google.devtools.build.lib.bazel.commands.ModCommand.execInternal(ModCommand.java:549)
	at com.google.devtools.build.lib.bazel.commands.ModCommand.exec(ModCommand.java:132)
	at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.execExclusively(BlazeCommandDispatcher.java:683)
	at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.exec(BlazeCommandDispatcher.java:252)
	at com.google.devtools.build.lib.server.GrpcServerImpl.executeCommand(GrpcServerImpl.java:607)
	at com.google.devtools.build.lib.server.GrpcServerImpl.lambda$run$1(GrpcServerImpl.java:676)
	at io.grpc.Context$1.run(Context.java:566)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)

Note that @bazel_skylib exists, but foo and bar.bzl don't.

This still crashes with last_green.

Which category does this issue belong to?

External Dependency

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

No response

Which operating system are you running Bazel on?

No response

What is the output of bazel info release?

release 7.1.0

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

No response

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

No response

Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.

No response

Have you found anything relevant by searching the web?

No response

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

No response

@github-actions github-actions bot added the team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. label Jun 5, 2024
@Wyverald Wyverald added P2 We'll consider working on this in future. (Assignee optional) and removed untriaged labels Jun 11, 2024
laurentlb added a commit to laurentlb/bazel that referenced this issue Jun 25, 2024
bazel-io pushed a commit to bazel-io/bazel that referenced this issue Jun 26, 2024
Fixes bazelbuild#22642

Closes bazelbuild#22887.

PiperOrigin-RevId: 646981159
Change-Id: I3fc42339ab7013d0a01e3f5feb16a781b799edd5
github-merge-queue bot pushed a commit that referenced this issue Jun 26, 2024
)

Fixes #22642

Closes #22887.

PiperOrigin-RevId: 646981159
Change-Id: I3fc42339ab7013d0a01e3f5feb16a781b799edd5

Commit
9c4e73d

Co-authored-by: Laurent Le Brun <laurentlb@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 We'll consider working on this in future. (Assignee optional) team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants