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

Incorrect hover shown on case class definitions #495

Closed
ckipp01 opened this issue Aug 22, 2022 · 1 comment
Closed

Incorrect hover shown on case class definitions #495

ckipp01 opened this issue Aug 22, 2022 · 1 comment

Comments

@ckipp01
Copy link
Contributor

ckipp01 commented Aug 22, 2022

I'm not sure if this is the same root issues as #482 but I've been noticing that in some files where it's just a case class defined in Scala that the hover in sourcegraph just show def productElementName(x$1: Int): String instead of the desired case class. You can see this here:

https://sourcegraph.com/github.com/ckipp01/mill-github-dependency-graph/-/blob/domain/src/io/kipp/github/dependency/graph/domain/Detector.scala?L10:18&popover=pinned

Screenshot 2022-08-22 at 09 04 17

There are also times that the copy method is displayed instead of the actual case case definition like you see here:

https://sourcegraph.com/github.com/ckipp01/mill-github-dependency-graph/-/blob/domain/src/io/kipp/github/dependency/graph/domain/DependencySnapshot.scala?L16:18&popover=pinned

And finally at times I've seen it displayed as object as well like you can see here:

https://sourcegraph.com/github.com/ckipp01/mill-github-dependency-graph/-/blob/domain/src/io/kipp/github/dependency/graph/domain/Job.scala?L18:18&popover=pinned

I assume these are all the same root issues as #482 because these symbols are all defined in that file, albeit synthetics. And sometimes going back on the same symbol will show you a random one of the three above.

@olafurpg
Copy link
Member

Closing as duplicate of #482

The workaround is to emit LSIF directly with scip-java index --output=dump.lsif instead of going through the SCIP->LSIF conversion. The underlying issue is sourcegraph/scip#52, which is to update the SCIP->LSIF conversion to handle more the scenario where multiple symbols are defined in the same location (example: Scala case classes)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants