-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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 when creating a repository rule in a macro #21451
Labels
P1
I'll work on this now. (Assignee required)
team-ExternalDeps
External dependency handling, remote repositiories, WORKSPACE file.
type: bug
Comments
github-actions
bot
added
the
team-Rules-API
API for writing rules/aspects: providers, runfiles, actions, artifacts
label
Feb 21, 2024
@bazel-io fork 7.1.0 |
Cc @Wyverald |
Wyverald
changed the title
[8.0.0-pre.20240206.3] NPE when creating a repository rule in a macro
NPE when creating a repository rule in a macro
Feb 21, 2024
Wyverald
added
P1
I'll work on this now. (Assignee required)
team-ExternalDeps
External dependency handling, remote repositiories, WORKSPACE file.
and removed
untriaged
team-Rules-API
API for writing rules/aspects: providers, runfiles, actions, artifacts
labels
Feb 21, 2024
Thanks for the report! A fix is in flight. |
bazel-io
pushed a commit
to bazel-io/bazel
that referenced
this issue
Feb 21, 2024
… WORKSPACE repo rules Follow-up to bazelbuild@1cbf09d; beyond not recording those entries in the marker file, we shouldn't even record them in memory in the first place. This avoids nasty problems with unexported repo rules (gah) and should be an extremely tiny performance win as a bonus... Fixes bazelbuild#21451 PiperOrigin-RevId: 609010175 Change-Id: I90eb921b09068f327b42886ea0a1875374a94049
github-merge-queue bot
pushed a commit
that referenced
this issue
Feb 21, 2024
…rder for WORKSPACE repo rules (#21457) Follow-up to 1cbf09d; beyond not recording those entries in the marker file, we shouldn't even record them in memory in the first place. This avoids nasty problems with unexported repo rules (gah) and should be an extremely tiny performance win as a bonus... Fixes #21451 Commit e84d053 PiperOrigin-RevId: 609010175 Change-Id: I90eb921b09068f327b42886ea0a1875374a94049 Co-authored-by: Googler <[email protected]>
A fix for this issue has been included in Bazel 7.1.0 RC1. Please test out the release candidate and report any issues as soon as possible. Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
P1
I'll work on this now. (Assignee required)
team-ExternalDeps
External dependency handling, remote repositiories, WORKSPACE file.
type: bug
Description of the bug:
Starting from 8.0.0-pre.20240206.3 (more precisely this commit), I get an NPE when I try to execute a repository rule that I create in a macro.
The error message:
I suspect the solution is to add a null check to this code should have a null check (as the
entries
we get as a parameter is declared@Nullable
in the relevant constructor), but I'm not confident enough in the codebase to know if this signifies a deeper issue.Which category does this issue belong to?
Rules API
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Minimal example repository is https://github.com/blorente/repro-bazel-npe-feb-2024
After cloning, the issue should reproduce when running
USE_BAZEL_VERSION=rolling bazel build //...
Which operating system are you running Bazel on?
macOS, for the purposes of this issue.
What is the output of
bazel info release
?I've seen it starting with 8.0.0-pre.20240206.3
If
bazel info release
returnsdevelopment 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.
The bug was introduced in 9edaddd
Have you found anything relevant by searching the web?
Nothing on the issues in this repository.
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: