Open linzhp opened 1 year ago
Assigned to @katre for triage.
This happens with any cquery on //external
, because the magic external
package has a source root of Optional.empty
.
I'm going to keep investigating a fix.
The crash was added in d0b2d68783c1e23cc6bfa58b709aa8288ca3f6fe, because ConfiguredTargetFactory
is accessing the source root without checking whether the Optional
is present.
This crash isn't strictly due to cquery, I'm reassigning to @c-parsons who wrote the commit.
Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 90 days unless any other activity occurs. If you think this issue is still relevant and should stay open, please post any comment here and the issue will no longer be marked as stale.
This is still an issue we'd like to address, just has been deprioritized. At the very least, Bazel should not error with a crash (and stack trace) given such an input.
Description of the bug:
Bazel would crash when running
bazel cquery //external:all-targets
:What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
In a Bazel repo, run
bazel cquery //external:all-targets
Which operating system are you running Bazel on?
macOS
What is the output of
bazel info release
?release 6.0.0-homebrew
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 master; git rev-parse HEAD
?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