ocamllabs / vscode-ocaml-platform

Visual Studio Code extension for OCaml
ISC License
344 stars 74 forks source link

"Go to definition" doesnt work, even though everything else works fine including hover definitions #1236

Open clsd0 opened 1 year ago

clsd0 commented 1 year ago

I am using WSL and dune. I have made a very simple project: image image image image image I have built it with dune build, it compiles and works as you would expect. The hover definition on the A module from the a.ml file works just fine: image but when i use "Go to defintion" (Ctrl+click / F12) it opens the wrong file: image For some reason it opens A.ml instead of a.ml (Note that A.ml is not a real file in my project, so everything in the file will be marked as error), I cannot find any way to fix this behaviour, the go to definition thing doesn't seem to be able to comprehend that the module has capitalized first letter while the actual file is lower case.

mnxn commented 1 year ago

I'm surprised that the capitalization matters if it could open the file.

What is the error that is shown when you hover over the red underlined text?

clsd0 commented 1 year ago

What is the error that is shown when you hover over the red underlined text?

image

Running 'dune build' does not change the error

StamesJames commented 3 months ago

I have the same problem working in a vscode devcontainer. Also in the capitalized file that is opened all the other modules don't get recognized and give a "Unbound Module xyz" message. Is there already a workaround for this?