Skip to content

Conversation

@pielas
Copy link
Contributor

@pielas pielas commented Oct 22, 2025

No description provided.

): Int = {
if (toplevels.isEmpty && type_hierarchy.isEmpty && toplevelMembers.isEmpty)
if (
toplevels.isEmpty && type_hierarchy.isEmpty && toplevelMembers.isEmpty && implicitClassMembers.isEmpty
Copy link
Contributor

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;
Copy link
Contributor

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 = {
Copy link
Contributor

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
Copy link
Contributor

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,
Copy link
Contributor

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

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants