atom-haskell / ide-haskell

Haskell IDE plugin for Atom editor

Home Page:https://atom.io/packages/ide-haskell

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

In-editor/gutter messages aren't displayed for standalone files (by neither backend)

ulidtko opened this issue · comments

Basically, I get this on saving a standalone file (non-cabal, non-stack, HelloWorld-style):

screenshot

There's no tooltip, no gutter icon — the error is present only in the IDE-Haskell bottom panel.

I've tried switching builtin/linter frontend (with atom restarts) — to no success.

I didn't spot anything relevant in the devtool console.

However, one thing is off-place: the filename is malformed. The file open on screenshot is /home/ulidtko/Test.hs, and ipmp-main is a project directory. As you can see in the panel, the filename-of-error shown is /home/ulidtko/src/ipmp-main/home/ulidtko/Test.hs which is obviously wrong. I guess, that's what causes a filename mismatch and absent lints.

If I move my Test.hs under the project directory (so now it's /home/ulidtko/src/ipmp-main/Test.hs), the issue ceases, and I can see correct lint markers as expected:

screenshot

I believe, there's a subtle bug in here. If given pointers on how to approach this, I can try a fix and submit a PR.

Ack, sorry, this got lost in the inbox. Your analysis is correct, but I'm not clear on what exactly produces the observed behaviour. Are you using ghc-mod? GHCI via ide-haskell-repl? Do you somehow get error messages using ide-haskell-cabal from standalone files?

I've spent some time staring at the sources, and I believe I've found the issue. I didn't test this extensively though due to lack of time. If you could confirm that haskell-ghc-mod v2.2.5 and ide-haskell-repl v0.8.7 are indeed fixed, that would be great. Thanks in advance.

@lierdakil that was with ghc-mod backend.


Hmm, I've just retested this on the latest Atom 1.35.1 (all latest packages), and it no longer repro's, with and without ide-haskell-cabal. I guess I'll just close this then. Thanks for pingback!

I've spent some time staring at the sources, and I believe I've found the issue.

Perhaps dump here what you found, to ease later recall if ever needed again. For now I'm OK with closing the issue, since I no longer have a valid repro case.

To be clear, the latest package versions are supposed to be fixed via atom-haskell-archive/haskell-ghc-mod@461f438 and atom-haskell/ide-haskell-repl@2a6515e. So the fact that you can't reproduce on the latest package versions is reassuring rather than surprising.

I think you've basically confirmed that those changes do fix the issue (at least as reported). So I'm going to close this as fixed. Feel free to open a new one (or indeed revive this one) if you run into something similar again.