Skip to content

When compiler error occurs, the extension stops working #129

@ghost

Description

When i open a new window of vscode, the extension works well. And while i am typing some codes, linter reports that the codes, which i've written, have an error(e.g. [ghcmod] parse error (possibly incorrect indentation or mismatched brackets), of course. Since then vscode-hie-server extension stops working. For example, when i hover mouse on a symbol, the popup message only shows Loading....

So, i looked into the log of vscode for this situation:

# For this time, the extension works well.

$ cat /Users/foo/Library/Application\ Support/Code/logs/20181230T175051/exthost1/output_logging_20181230T175052/4-Haskell\ HIE\ \(study\).log
2018-12-30 17:50:54.699438 [ThreadId 4] - run entered for hie-wrapper(hie-wrapper) Version 0.4.0.1, Git revision 337fd9bf6254b50820bfe73046353ae2c4f86b34 (2315 commits) x86_64 ghc-8.2.1
2018-12-30 17:50:54.701665 [ThreadId 4] - Current directory:/Users/foo/dev/study
2018-12-30 17:50:54.707812 [ThreadId 4] - Cradle directory:/Users/foo/dev/study
2018-12-30 17:50:54.708637 [ThreadId 4] - Using plain GHC version
2018-12-30 17:50:54.781151 [ThreadId 4] - Project GHC version:8.6.3
2018-12-30 17:50:54.781611 [ThreadId 4] - hie exe candidates :["hie-8.6.3","hie-8.6","hie"]
2018-12-30 17:50:54.782368 [ThreadId 4] - found hie exe at:/Users/foo/.local/bin/hie-8.6.3
2018-12-30 17:50:54.783003 [ThreadId 4] - args:["--lsp"]
2018-12-30 17:50:54.783339 [ThreadId 4] - launching ....



2018-12-30 17:50:54.802044 [ThreadId 4] - Using plain GHC version
2018-12-30 17:50:54.874546 [ThreadId 4] - Run entered for HIE(hie-8.6.3) Version 0.4.0.1, Git revision 337fd9bf6254b50820bfe73046353ae2c4f86b34 (2315 commits) x86_64 ghc-8.6.3
2018-12-30 17:50:54.875851 [ThreadId 4] - Current directory:/Users/foo/dev/study
2018-12-30 17:50:54.929107 [ThreadId 13] - UUsing hie version: Version 0.4.0.1, Git revision 337fd9bf6254b50820bfe73046353ae2c4f86b34 (2315 commits) x86_64 ghc-8.6.3
sing plain GHC version
Using hoogle db at: /Users/foo/.hoogle/default-haskell-5.0.17.hoo
# For this time, the extension doesn't work anymore. Take note of last line of log.

$ cat /Users/foo/Library/Application\ Support/Code/logs/20181230T175051/exthost1/output_logging_20181230T175052/4-Haskell\ HIE\ \(study\).log
2018-12-30 17:50:54.699438 [ThreadId 4] - run entered for hie-wrapper(hie-wrapper) Version 0.4.0.1, Git revision 337fd9bf6254b50820bfe73046353ae2c4f86b34 (2315 commits) x86_64 ghc-8.2.1
2018-12-30 17:50:54.701665 [ThreadId 4] - Current directory:/Users/foo/dev/study
2018-12-30 17:50:54.707812 [ThreadId 4] - Cradle directory:/Users/foo/dev/study
2018-12-30 17:50:54.708637 [ThreadId 4] - Using plain GHC version
2018-12-30 17:50:54.781151 [ThreadId 4] - Project GHC version:8.6.3
2018-12-30 17:50:54.781611 [ThreadId 4] - hie exe candidates :["hie-8.6.3","hie-8.6","hie"]
2018-12-30 17:50:54.782368 [ThreadId 4] - found hie exe at:/Users/foo/.local/bin/hie-8.6.3
2018-12-30 17:50:54.783003 [ThreadId 4] - args:["--lsp"]
2018-12-30 17:50:54.783339 [ThreadId 4] - launching ....



2018-12-30 17:50:54.802044 [ThreadId 4] - Using plain GHC version
2018-12-30 17:50:54.874546 [ThreadId 4] - Run entered for HIE(hie-8.6.3) Version 0.4.0.1, Git revision 337fd9bf6254b50820bfe73046353ae2c4f86b34 (2315 commits) x86_64 ghc-8.6.3
2018-12-30 17:50:54.875851 [ThreadId 4] - Current directory:/Users/foo/dev/study
2018-12-30 17:50:54.929107 [ThreadId 13] - UUsing hie version: Version 0.4.0.1, Git revision 337fd9bf6254b50820bfe73046353ae2c4f86b34 (2315 commits) x86_64 ghc-8.6.3
sing plain GHC version
Using hoogle db at: /Users/foo/.hoogle/default-haskell-5.0.17.hoo
hie-8.6.3: Prelude.head: empty list # <-------------------- This line is newly generated log.

To fix this situation, i have to restart vscode over again. Reopening the file doesn't work without restarting vscode...


Mac OS : 10.14.2(18C54)
vscode : 1.30.1(1.30.1)

$ stack --version | head -1
1.9.3 x86_64

$ stack ghc -- --version
The Glorious Glasgow Haskell Compilation System, version 8.6.3

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