-
Notifications
You must be signed in to change notification settings - Fork 395
Completions for workspace implicit classes #7919
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
base: main
Are you sure you want to change the base?
Completions for workspace implicit classes #7919
Conversation
| ): Int = { | ||
| if (toplevels.isEmpty && type_hierarchy.isEmpty && toplevelMembers.isEmpty) | ||
| if ( | ||
| toplevels.isEmpty && type_hierarchy.isEmpty && toplevelMembers.isEmpty && implicitClassMembers.isEmpty |
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.
Couldn't we reuse ToplevelMember for now? And jsut add different kind there?
| public class ImplicitClassMemberResult { | ||
| public final String methodSymbol; | ||
| public final String methodName; | ||
| public final String classSymbol; |
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.
Don't we just need the class here?
| } | ||
| } | ||
|
|
||
| override def onChange(docs: TextDocuments, path: AbsolutePath): Unit = { |
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.
We are not using semanticdb, why is this needed?
| s"[MetalsSymbolSearch] Querying implicit class members for type: $paramTypeSymbol" | ||
| ) | ||
|
|
||
| val totalCached = wsp.implicitClassMembers.values.flatten.size |
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 would do all that in the compiler itself, it's much easier to do there. I would just index any implicit classes and then check in the presentation compiler if they apply to the current member.
| * @param range The range of the implicit class in the source file | ||
| */ | ||
| case class ImplicitClassMember( | ||
| classSymbol: String, |
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 would just cache classSymbol, we can't really get the anything else from indexing
No description provided.