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

Workspace symbol wrong path #671

Closed
wants to merge 3 commits into from

Conversation

tatchi
Copy link
Collaborator

@tatchi tatchi commented Apr 13, 2022

Should fix #656

First commit adds a test that uses a copy_files stanza to reproduce the issue. The second commit implements the fix.

So instead of taking the filename from the cmt.cmt_sourcefile, we now use the pos_fname from the Mbrowse_raw.node location.

It actually fixes also issues with .pp.ml and .mll files:

.pp.ml (BEFORE)

Screen.Recording.2022-04-13.at.21.20.55.mov

.pp.ml (AFTER)

Screen.Recording.2022-04-13.at.21.17.21.mov

.mll (BEFORE)

Screen.Recording.2022-04-13.at.21.20.05.mov

.mll (AFTER)

Screen.Recording.2022-04-13.at.21.19.14.mov

Copy link
Member

@rgrinberg rgrinberg left a comment

Choose a reason for hiding this comment

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

LGTM. Could you add a changes entry?

cc @danidickstein your PR ocaml/merlin#1219 solved a similar issue I believe

@voodoos could you have a look at this as well?

@rgrinberg rgrinberg linked an issue Apr 14, 2022 that may be closed by this pull request
@voodoos
Copy link
Collaborator

voodoos commented Apr 14, 2022

Looks like a reasonable change.

@tatchi tatchi force-pushed the workspace-symbol-wrong-path branch from aeb0906 to 5177aff Compare April 14, 2022 20:38
@rgrinberg
Copy link
Member

Merged manually.

@rgrinberg rgrinberg closed this Apr 15, 2022
rgrinberg added a commit to rgrinberg/opam-repository that referenced this pull request Apr 15, 2022
CHANGES:

## Features

- Add support for dune in watch mode. The lsp server will now display build
  errors in the diagnostics and offer promotion code actions.

- Re-introduce ocamlformat-rpc (ocaml/ocaml-lsp#599, fixes ocaml/ocaml-lsp#495)

## Fixes

- Fix workspace symbols that could have a wrong path in some cases
  ([ocaml/ocaml-lsp#675](ocaml/ocaml-lsp#671))
@rgrinberg rgrinberg linked an issue May 16, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants