-
Notifications
You must be signed in to change notification settings - Fork 304
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
java_binary rules labeled as manual disables the Debug icon #4546
Comments
Another workaround is to explicitly specify the manual targets in the project view (.bazelproject file) under the targets section. |
Thanks for adding this @rogerhu. I tried My
Do you expect |
It's supposed to stop applying the manual to exclude targets. There may be a bug somewhere we should check. |
Can you try to remove the target and use |
Yes it picks up the In my original project, the aspect invocation looks like:
So any test target marked as |
Yep, I just reviewed this issue. The aspect approach relies on |
Proof of concept here: 178be12 I think I'll need to hide this behind the extra option as well. |
I've dropped #5458 as a proposal to make this work for your issue! |
@sfc-gh-abalik It looks like this issue has been fixed and can be closed. |
Description of the bug:
Suppose I have this Java rule:
Because it is added with a
manual
tag, the IDE information (e.g.intellij-info.txt
) will not be generated for this rule (confirmed by looking inside thebazel-out
directory). There is a specific tag that excludes it here, which prevents the kind from derived. We can see this phenomenon in the UI:As a result, the Debug icon gets disabled. Without the metadata intellij-info.txt created, the Bazel kind cannot be determined. As a result, the run configuration is viewed as not debuggable here.
A few options I can see:
bazel query --output=label_kind //myapp:shaded_jar
to figure out if it can derive things regardless of the manual tag. Changes to the ProjectTargetFinder method is likely to invoke the Bazel command should this information not be retrieved fromintellij-info.txt
.#1 is the manual way to workaround the issue, #2 is the simplest, #3 is the most additive, and #4 may create other side effects.
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Add
manual
tag to the example: https://github.com/bazelbuild/bazel/blob/master/examples/java-native/src/main/java/com/example/myproject/BUILD#L7Sync the repo.
Add a Run Configuration with this target. Watch the debug icon get disabled!
Which Intellij IDE are you using? Please provide the specific version.
IntellIJ 2022.1 - but usiing upstream Bazel IntelliJ to repro
What programming languages and tools are you using? Please provide specific versions.
No response
What Bazel plugin version are you using?
No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
Confirmed that kind is null when manual tag is set:
Other references:
The text was updated successfully, but these errors were encountered: