haskell-ide-engine icon indicating copy to clipboard operation
haskell-ide-engine copied to clipboard

Unexpected bogus error diagnostic when exporting non-existant identifier

Open Anrock opened this issue 4 years ago • 2 comments

Given following Test.hs:

module Test (nonExistant) where

HIE produces:

    "diagnostics": [
        {
            "severity": 1,
            "range": {
                "start": {
                    "line": 0,
                    "character": 0
                },
                "end": {
                    "line": 1,
                    "character": 0
                }
            },
            "source": "bios",
            "message": ""
        },
        {
            "severity": 1,
            "range": {
                "start": {
                    "line": 0,
                    "character": 13
                },
                "end": {
                    "line": 0,
                    "character": 24
                }
            },
            "source": "bios",
            "message": "Not in scope: ‘nonExistant’"
        }
    ]

See first diagnostic object. Looks redundant and useless but worse than that it highlights whole line in my neovim setup and shadows real useful diagnostic. I had no idea wtf is going on until I examined output of HIE in verbose mode :(

Anrock avatar Dec 23 '19 22:12 Anrock

Yeah I've noticed this mysterious empty diagnostic too.

lukel97 avatar Dec 24 '19 03:12 lukel97

I've noticed this too, however only while running using coc.nvim, it doesn't happen in vscode. When vscode is driving hie doesn't even send the spurious diagnostic, weird

expipiplus1 avatar Feb 24 '20 15:02 expipiplus1