Open arbitrary-dev opened 6 years ago
This part
"filename":"/Users/**/Comment.hs"
looks strange to me. The filename is supposed to be a URI, and I don't know what the asterisks are doing in the middle.
Can you provide more detail on the project you are working on when this happens?
Asterisks were added by me, it's a simple path to a local filesystem on my MacOS machine.
The project is this one: https://github.com/yesodweb/yesod-scaffold/blob/sqlite/src/Handler/Comment.hs
I can reproduce this issue on Windows:
Request
{
"jsonrpc":"2.0",
"id":99,
"method":"textDocument/rename",
"params":{
"textDocument":{
"uri":"file:///c%3A/Users/myself/Documents/GitHub/haskell-ide-engine/src/Haskell/Ide/Engine/Options.hs"
},
"position":{
"line":18,
"character":15
},
"newName":"globalOptsParserThingy"
}
}
Response
{
"error":{
"code":-32603,
"message":"IdeError {ideCode = PluginError, ideMessage = \"rename: \\\"Couldn't get typechecked module for c:\\\\Users\\\\myself\\\\Documents\\\\GitHub\\\\haskell-ide-engine\\\\src\\\\Haskell\\\\Ide\\\\Engine\\\\Options.hs\\\"\", ideInfo = Null}"
},
"jsonrpc":"2.0",
"id":99
}
I am trying to dig into ghc-mod to find out what's going on!
I'm getting a similar error when trying to run lsp-rename
. Looks like:
Error from the Language Server: rename: "Couldn't get typechecked module for <filepath>"
Where <filepath>
is the full path of my current buffer.
+1 from me, I get this when trying to apply the "Prefix with _" rule for unused vars in Atom
{-# LANGUAGE TemplateHaskell #-}
module Foo where
foo :: Int
foo = 12
Minimal reproduction. With TH commented out renaming works. If module Bar
imports Foo
- renaming won't work in it either.
What kind of typechecked module HIE can't get?