Skip to content
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

Search for a symbol in workspace looks into .pp.ml files #548

Closed
ulugbekna opened this issue Nov 11, 2021 · 10 comments
Closed

Search for a symbol in workspace looks into .pp.ml files #548

ulugbekna opened this issue Nov 11, 2021 · 10 comments
Labels
bug Something isn't working
Milestone

Comments

@ulugbekna
Copy link
Collaborator

Searching for a symbol in workspace uses .pp.ml files, it seems, which users can't actually open.

image

@ulugbekna ulugbekna added the bug Something isn't working label Nov 11, 2021
@tatchi
Copy link
Collaborator

tatchi commented Nov 17, 2021

Am I right that .pp.ml files are related to ppxes? What should be done in that case?

We can filter out sourcefiles that end with .pp.ml from the result but in that case and given that I understand it correctly, we'll lose symbols from files that are preprocessed by a ppx. Is that acceptable?

@tatchi
Copy link
Collaborator

tatchi commented Nov 24, 2021

I stumbled upon that PR in the merlin repo which seems to be related to the same issue: ocaml/merlin#1219

The proposed fix looks pretty easy and consist of falling back to a corresponding .ml/.mli file. According to this comment, locations should be preserved.

I got curious and tried that solution. It seems to show good results:

Screen.Recording.2021-11-24.at.06.39.35.mov

@tatchi
Copy link
Collaborator

tatchi commented Apr 12, 2022

The fix has been merged upstream and is included in merlin 4.5 ocaml/merlin#1219

I know that there's an ongoing effort to unvendor Merlin so I assume that when that's done, we will have an up to date version of Merlin that contains the fix ? cc @rgrinberg

@rgrinberg
Copy link
Member

We don't plan to unvendor merlin. Once I will update our fork of it, the fix should be included.

@tmattio
Copy link
Collaborator

tmattio commented Apr 12, 2022

We don't plan to unvendor merlin.

I thought we agreed that was the plan though?

The fork is making a lot of people's life more difficult, and merlin maintainers have agreed to upstream the patches in principle.

@rgrinberg
Copy link
Member

I remember agreeing about reducing the patches but certainly not un vendoring merlin.

The difficulties imposed by the fork can be solved by deleting the vendored directory once all the patches are upstreamed.

@tmattio
Copy link
Collaborator

tmattio commented Apr 12, 2022

I'm confused. Do you mean that you intend to keep vendoring merlin even if all the patches are upstreamed?

@rgrinberg
Copy link
Member

Exactly

@tatchi
Copy link
Collaborator

tatchi commented Apr 13, 2022

The fix has been merged upstream and is included in merlin 4.5 ocaml/merlin#1219

I think I've been confused. I don't think the upstream change would have fixed that issue (at least without any changes from our side). Anyway, good news is that #671 should fix the issue 🤗

@rgrinberg rgrinberg linked a pull request Apr 14, 2022 that will close this issue
@tatchi tatchi added this to the 1.11.0 milestone Apr 15, 2022
@tatchi
Copy link
Collaborator

tatchi commented Apr 15, 2022

Closed #671

@tatchi tatchi closed this as completed Apr 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants