Skip to content

Go to Definition and Peek Definition are not working properly when definition is found inside the current module #10

@nebtrx

Description

@nebtrx

First, congratulations on the excellent job with this extension and the engine. Great amount of features and real fast performance! Cheers!

I noticed a couple of issues with extensions tho.

When you try to navigate or peak the definition of a function defined inside the same module it peaks or navigates a to a source file with the same content but in a different location like for example: /private/var/folders/c3/stw488g51wncmp9g4d4wdjnm0000gn/T/ghc-mod63671/GADT16807282475249.hs.

I'm not sure how the extension works internally but I'd guess that file acts as some kind of cache. The main issue here is that modying that file won't reflect the changes on the original file, obviously. Also, the issue doesn't happen if the definition lies on another module file. It appeared to be related somehow with ghc-mod(based on the cache file path) so I tried to reproduce it with and without ghc-mod on my path and it persisted. Anyway, it seems like the engine actually shares some code with ghc-mod project so, that seems reasonable.

As additional information, I'm on macOS 10.13 High Sierra and I tried with two different resolvers: lts-8.15 and lts-9.0. There is no output for the Haskell Language Server while performing the Go to Definition and Peek Definition. However, I noticed this output when the extension loaded:

[Error - 3:08:09 PM] haskell-lsp:Got setTraceNotification ignoring
[Error - 3:08:09 PM] haskell-lsp:no handler for. Object (fromList [("jsonrpc",String "2.0"),("params",Object (fromList [("settings",Object (fromList [("languageServerHaskell",Object (fromList [("maxNumberOfProblems",Number 100.0)]))]))])),("method",String "workspace/didChangeConfiguration")])

It seems totally unrelated with the current issue but perhaps it helps. Let me know if you need anything from me so I can help you unravel this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions