Skip to content

Conversation

@xvw
Copy link
Collaborator

@xvw xvw commented Jan 21, 2026

Add a custom request for merlin-locate-types

cc @liam923, the major difference of Merlin is the inclusion of the field set which is a compact representation of every reacheables types.

@xvw xvw force-pushed the custom-request-locate-types branch from 706b78d to ab9c8d4 Compare January 28, 2026 10:57
}
```

`set` is a compacted version of every occured types.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • I think the result spec here does not match the actually returned json ? Data objects have type and result fields

  • "every occured type" sounds very wrong 😅

  • Also, could you elaborate on the expected usage of the "set" field ? Does it provide information that is not available otherwise ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, in Emacs with the in-house xref extension, and in VSCode, the UI is very limitated, so from my POV, for the moment, we do not know how to deal with that kind of structural answer. So the set is just a compact way to handle every "reachable type", since we do not rebuilt the type expression inside the client.|
(So just iterating on set seems legit)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But could this compact representation be inferred from the rest of the result on the client side ? If it is, then is it really worth it to make the protocol more complex to spare that work to the clients ? (not saying we shouldn't, just trying to weight the pro and cons)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But could this compact representation be inferred from the rest of the result on the client side ?

Yes.

If it is, then is it really worth it to make the protocol more complex to spare that work to the clients ?

Yes I think it make sense when it is possible.
For me, the goal of the protocol is to give a quick-as-possible way to extend clients, so I expect from a client perspective to reduce the logic to handle at the client side. (Like for Type Enclosing)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright. (Still need to fix the doc so that it matches the actual results I think)

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