2023.2 Highlighting "Cannot Resolve" Error with GemlinScala. Works with 2023.1.5
Answered
Heads up:
In my specific situation, I began experiencing syntax highlighting issues after upgrading to 2023.2. When I reverted to 2023.1.5, the functionality was immediately restored. I made no changes to the code. I tried common troubleshooting steps such as removing the .idea
directory, clearing the cache, and deleting the target
folder, but none of these solutions worked. This is a Play project, and sbt run
still functions and build out my product, though this is not related to the IDE issue.
I'll provide more details once I receive specific instructions regarding what information is needed.
Please sign in to leave a comment.
It'll be appreciated if you can provide a sample project.
Ethan, thank you for responding quickly to this. Would it be possible to do a "code with me" session sometime next week, that would be easiest for you to at least see what's going on and also you get access to my env? The project is complex to just provide one, and also, I am under time pressure to get my work done. Since I reverted it will be a while before I can do a repro of this. If this goes on for a while, I will try to create a bare-bone Play project.
P.S.: I just realized that both versions are on my system. So that will make this a bit easier.
If you try to execute a `Go to` on those unresolved items, it looks like IDEA did not parse or index the file right. In the secreen shot after this one, I will show you when it is working right for this library. Some parts of the same library does show the stuff correctly.
Working Right Situation
So, I thought g.V()<something> has an issue but that isn't the case either. The following `g.V(userV)` does find the `outE` member following it.
This is what I see when hovering over .outE() after g.V() call.
My Guess - the `has` method has several different call argument types, and when the IDE encounters this type of situation for this library (it uses Shapeless) it cannot determine which one to select.
OK, I think I now understand better (likely) what's going on.
The GremlinScala library uses Shapeless https://github.com/milessabin/shapeless/ and I do not use it directly, but it does seem to do some "cutting edge" stuff in dynamically allowing types (I think.)
Other classes and mothods are working right because they just use the out-of-the-box typing systems out of Scala.
So my guess is that anyone using Shapeless could run into this issue.
Ethan, I now confirm that it is now broke in the Scala Plugin that goes with 2023.2 and it was working fine with 2022.1.5. Hope that this is sufficient information for your team to tackle. If you want a reproducible sample, I am willing to try to build one for your team. I know there are other priorities in Jetbrains, but hope this will be resolved by the next round of release. I will stick with 1.5, it works really fine for what I do.
Hi,
It'll be appreciated if you can provide a sample.
I tried the https://github.com/mpollmeier/gremlin-scala-examples but did not exactly reproduce the issue in the "has" keyword.
Hi Ethan,
OK, I will try to get to that this weekend.