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

Debugging java in Intellij doesn't work - throws exception #1281

Closed
MarinaGrec opened this issue Oct 17, 2019 · 6 comments
Closed

Debugging java in Intellij doesn't work - throws exception #1281

MarinaGrec opened this issue Oct 17, 2019 · 6 comments
Labels
lang: java Java rules integration product: IntelliJ IntelliJ plugin topic: debugging Issues related to debugging type: bug

Comments

@MarinaGrec
Copy link

The latest commit to the aspect (the move to JavaInfo) has broken the debug capability. Reverting the java_classpath.bzl to one of the previous versions, enables to debug again.
The error thrown:

ERROR: /Users/marina.grechuhin/Development/development-tests/uint_monorepo/matching_service_api/BUILD:42:1: in @intellij_aspect//:java_classpath.bzl%java_classpath_aspect aspect on scala_binary rule //matching_service_api:matching_service_api: Traceback (most recent call last): File "/Users/marina.grechuhin/Development/development-tests/uint_monorepo/matching_service_api/BUILD", line 42 @intellij_aspect//:java_classpath.bzl%java_classpath_aspect(...) File "/private/var/tmp/_bazel_marina.grechuhin/db941774b3163d57cafe88c408233562/external/intellij_aspect/java_classpath.bzl", line 21, in _runtime_classpath_impl struct(output_groups = {"runtime_classp...)}) File "/private/var/tmp/_bazel_marina.grechuhin/db941774b3163d57cafe88c408233562/external/intellij_aspect/java_classpath.bzl", line 22, in struct _get_runtime_jars(target) File "/private/var/tmp/_bazel_marina.grechuhin/db941774b3163d57cafe88c408233562/external/intellij_aspect/java_classpath.bzl", line 27, in _get_runtime_jars target[JavaInfo].compilation_info.runtime_classpath object of type 'NoneType' has no field 'runtime_classpath'

@jin
Copy link
Member

jin commented Oct 18, 2019

Please provide your version information (IntelliJ Menu -> Bazel -> File an Issue on GitHub, and copy the version information here)

@MarinaGrec
Copy link
Author

Version information

IdeaUltimate: 2019.2.3
Platform: Mac OS X 10.15
Bazel plugin: 2019.10.01.1.1
Bazel: 0.29.1

@KaoruDev
Copy link

I believe this issue has more to do with https://github.com/bazelbuild/rules_scala than with the plugin itself. scala_rules still uses the old provider API, which this commit (to the intellij plugin repo) changes to the new version: 5f03bde

Downloading version 2019.08.06 from here: https://plugins.jetbrains.com/plugin/8609-bazel/versions fixes the issue I was seeing (this particular version doesn't have that nice dropdown menu)

This is what I previously had:

#### Version information
IdeaUltimate: 2019.2.3
Platform: Mac OS X 10.14.6
Bazel plugin: 2019.10.14.0.0
Bazel: 0.29.1

where the issue arrised

@ittaiz
Copy link
Member

ittaiz commented Nov 5, 2019

so the issue isn't with rules_scala but rather with Bazel itself (creating a faulty JavaInfo from starlark), I've created an issue there and I sent a possible fix in #1347

@KaoruDev
Copy link

A combination of 1.2.1 and the latest plugin fixes this issue for me.

Version information

IdeaUltimate: 2019.2.4
Platform: Mac OS X 10.14.6
Bazel plugin: 2019.11.14.0.1
Bazel: 1.2.1

@alice-ks
Copy link
Collaborator

alice-ks commented Feb 3, 2021

From the latest comments, it sounds as if this issue was already resolved and shouldn't be present in current plugin + Bazel versions.

@alice-ks alice-ks closed this as completed Feb 3, 2021
@mai93 mai93 added product: IntelliJ IntelliJ plugin topic: debugging Issues related to debugging labels Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang: java Java rules integration product: IntelliJ IntelliJ plugin topic: debugging Issues related to debugging type: bug
Projects
None yet
Development

No branches or pull requests

6 participants