-
Notifications
You must be signed in to change notification settings - Fork 337
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
improvement: use pc for go to def when stale semanticdb #7028
base: main
Are you sure you want to change the base?
Conversation
…emanticdb), add report when missing definition)
): Future[DefinitionResult] = | ||
for { | ||
fromCompiler <- | ||
if (path.isScalaFilename && !isAmmonnite(path)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we just keep the current order for Ammonite? With this change we would not use compiler for Ammonite, right?
I wonder if we could just adjust tests to take that into account?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can also fix it and map generated Ammonite files to source files like we do for Scala CLI, if we want to still have Ammonite support.
Reordering is only half of a fix since for local symbols using pc will lead to generated sources. But I can also do that, if don't know where we are with Ammonite support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I raised the topic on discord again and will start pushing it. In the meantime I don't think we want to work on any fixes, which we will be removing in the future.
So if it's too much work let's just leave it as is then.
private var fallbackDefn: Option[DefinitionResult] = None | ||
private var nonLocalGuesses: List[String] = List.empty | ||
|
||
private var fundScaladocDef = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private var fundScaladocDef = false | |
private var foundScaladocDef = false |
@@ -233,7 +233,7 @@ class DefinitionLspSuite | |||
|package a | |||
|object B/*L1*/ { | |||
| def main/*L2*/() = { | |||
| println/*Predef.scala*/(A/*;A.scala:2;A.scala:3*/("John")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the idea here was to show both object and case class. Any idea why this changed?
resolves: #7027