-
Notifications
You must be signed in to change notification settings - Fork 207
Incorrect file uri #551
Comments
What operating system are you using? |
It's OS X:
|
I have the same issue on macOS High Sierra 10.13.x, in Visual Studio Code. I think it's solved temporarily by rebooting (I'll try to verify this). I've also ran into cases where clicking any of the error messages in one of those temporary files would open said file and also create a new file but with number at the end incremented by 1. |
This might have been (re)introduced by the new URI handling changes to haskell-lsp. Can someone confirm if this issue affects afb99e6 or prior? |
It would be helpful if the full path of the original file could be provided. |
I installed it at home on my Ubuntu 17.10 and I don't have this issue. Seems like an OSX-specific issue though. |
@Leonti could you provide the full path of the original file you were facing this issue with? |
Here are the paths on my machine. Everytime I open
in Visual Studio Code it creates a new tmp file. Right now
Close -> Open again and we have
The old tmp files are deleted whenever a new one is created so that when I now click errors reported for |
My path was: |
Hmm, the paths look fairly straightforward, so there shouldn't be any weird URI decoding/encoding issues. I'll try to make a branch of HIE that logs all of this properly so I can see what's going wrong. Unfortunately I don't have an OSX machine on hand, so you guys would have to test it. |
Would be happy to test! |
i am also on macos and having probably same issue in a different way. when i check the logs i see things like Also when i go to definition of a function i find myself on file with the temp path like above. And this one occurs only if the function on the same file. When going from another file it seems OK. right now i can't supply detailed logs but i will as soon as possible. |
Can somebody use wz1000@052e1bc and provide me debug logs? Run hie with
and upload the log file to gist or pastebin or some such service |
I don't have this problem using macOS High Sierra.
environment as below OS
VSCode
hie
|
@nrskt Ok, the commit you are using is almost a month old. So we know that the issue is recently introduced. Can anyone on OSX do a bisect to figure out which commit introduced this? |
@wz1000 i checked out the commit you mentioned and here is the log file: https://gist.github.com/zekzekus/a1d9bd37fb592492bf58f314137b6e10 bisecting is taking too much while rebuilding. if i could know a working commit it would be much easier. if log's doesn't work i can try to bisect anyway. |
@zekzekus Could you test if changing line 60 in haskell-ide-engine/submodules/ghc-mod/core/GhcMod/FileMapping.hs from
to
fixes the issue? |
We were requested to use makeAbsolute instead of canonicalizePath, for windows users. on HaRe. See RefactoringTools/HaRe#67 |
@wz1000 i observe same behaviour. here is the log file with the change you mentioned. https://gist.github.com/zekzekus/5965ce24f9bc448a2cbd9f4318524a5c |
Ok, so I need more logs: wz1000@052e1bc |
I can confirm that
I did do |
Here is my debug output with wz1000/haskell-ide-engine@052e1bc: This is the interesting bit:
|
@wz1000 I tried changing to |
OK, I seem to have figured out the problem. I added a canonicalizePath in the wrong place in my original fix. The issue should be fixed by alanz/ghc-mod#9 Thanks for all the help and patience. You can test out the change by
|
The real issue seems to be that we lost this line https://github.com/alanz/ghc-mod/blob/47e200a728a575f407ee6f9893d9a1e77b1b5325/core/GhcMod/FileMapping.hs#L52 somewhere along the line |
@wz1000 Thanks a lot! Thanks again for the awesome tool! |
Hi!
First of all, thanks for the great IDE engine, I believe this will be the future of Haskell IDE tooling.
I have a problem though, my project compiles and works fine, but I get errors coming from
/private/var/folders/...
folder, for example:As you can see the file path is
file:///private/var/folders/hm/3t_b50tj3ng1fj3g4p9zgcn02hg99c/T/ghc-mod12335/PayslipCalculatorSpec12334-0.hs
Also when I have real errors in my files the files they are not displayed in files themselves, but rather in those temporary files in
/private/var/folders/..
I experience it both in Atom and VSCode, this is a screenshot from Atom
The cloned version is
53cd497168d83759a9cc25cff98a3134be0906c2
and it's installed using:Let me know if you need more information.
Cheers,
Leonti
The text was updated successfully, but these errors were encountered: