-
Notifications
You must be signed in to change notification settings - Fork 30
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
Promote synthetic definitions into normal definitions if they share names #404
Promote synthetic definitions into normal definitions if they share names #404
Conversation
…ames Previously, we generated synthetic definitions for all synthetic definitions. However, this meant that "find references" never showed results for synthetic symbols share the same name as the non-synthetic definition. This commit changes that so synthetic definitions that share the same name as the non-synthetic symbol are included with "find references" results. While testing this change I noticed that we don't handle synthetic constructor parameters so I added support for those along the way.
@bobheadxi The pr-auditor check failed with a cryptic error message https://github.com/sourcegraph/lsif-java/runs/5334788397?check_suite_focus=true#step:4:34
Any advice on how to troubleshoot that? |
@olafurpg we use |
Ah I see - @olafurpg this PR seems to be from a fork, I'm not sure how API access to set status updates on a fork's commits works |
When I hover
in
It sometimes gives |
@wchau I'm able to reproduce! That's an issue outside of lsif-java that needs to be fixed in the Sourcegraph backend. Both the case class and the object are defined at the same location and there appears to b non-determinism related to which symbol docstring gets displayed in the hover. I've added a reminder to report an upstream issue in the sourcegraph/sourcegraph erpo |
I can open PRs from the main repo but what should the pr-auditor do for PRs from external contributors? I have a preference for opening PRs from my fork instead of the main repo because I like push a lot of WIP branches while keeping the main repo clean. I don't like cloning a repo with lots of WIP branches from the maintainers. |
@wchau I opened a followup issue to address the non-deterministic hovers https://github.com/sourcegraph/sourcegraph/issues/32044 |
Fixes #403
Previously, we generated synthetic definitions for all synthetic
definitions. However, this meant that "find references" never showed
results for synthetic symbols share the same name as the non-synthetic
definition. This commit changes that so synthetic definitions that share
the same name as the non-synthetic symbol are included with "find
references" results.
While testing this change I noticed that we don't handle synthetic
constructor parameters so I added support for those along the way.
Test plan
Snapshot tests included in the diff. I also tested the change manually in this URL here https://sourcegraph.com/github.com/sourcegraph/sbt-sourcegraph@e2f71270ea518766c65097b1f17e97b55059d792/-/blob/example/foo.scala?L3:13#tab=references