haskell / haskell-language-server

Official haskell ide support via language server (LSP). Successor of ghcide & haskell-ide-engine.
Apache License 2.0
2.65k stars 355 forks source link

Problem starting ghcide on Windows and non english locale #809

Open pkapustin opened 4 years ago

pkapustin commented 4 years ago

Problem starting ghcide on a Windows 7 machine (32-bit, Russian locale). Same error for ghcide 0.0.5 and 0.0.6. Stack works without problems.

ghcide version: 0.0.6 (GHC: 8.6.5) (PATH: C:\Users\User\AppData\Roaming\local\bi
n\ghcide.exe) (GIT hash: 1b4cd9d8d7cf1ec12677e0e6877b8e8b3c74460f)
Ghcide setup tester in D:\haskell\src\test.
Report bugs at https://github.com/digital-asset/ghcide/issues

Step 1/6: Finding files to test in D:\haskell\src\test
Found 4 files

Step 2/6: Looking for hie.yaml files that control setup
Found 1 cradle

Step 3/6, Cradle 1/1: Implicit cradle for D:\haskell\src\test
Cradle {cradleRootDir = "D:\\haskell\\src\\test", cradleOptsProg = CradleAction:
 stack}

Step 4/6, Cradle 1/1: Loading GHC Session
ghcide: Cannot decode byte '\xad': Data.Text.Internal.Encoding.streamDecodeUtf8W
ith: Invalid UTF-8 stream
cocreature commented 4 years ago

Are you also using stack with a resolver that uses GHC 8.6.5? This looks like something that could also be caused by a GHC version mismatch. I’m not aware of anything specific that we do wtr to locales and this issue appears to be coming from the GHC API so not really sure what the difference between stack and ghcide is.

ndmitchell commented 4 years ago

See https://github.com/mpickering/hie-bios/issues/110#issuecomment-567224604 which got a similar error, although not sure if it's the same root cause. The Russian locale might be the problem - can you try UTF8 and see if that fixes it? Can you also check you are on the latest GHC everywhere, and that your stack global hasn't defaulted to a really old GHC?

We also don't test 32 bit, mostly because no one really uses it. It might be worth trying 64 bit.

pkapustin commented 4 years ago

Tested again today with latest ghcide, same error. It's only system locale that is Russian, all the source files are in UTF8. No mentions of older GHC in c:\sr\config.yaml, didn't find config.yaml under the user directory. No GHC installed globally, the machine has never been used for Haskell before. Also, can't try 64 bit on that machine as it is 32 bit, and the person doesn't have another machine at the moment.

ndmitchell commented 4 years ago

Yep, can you try making sure the console you run it from is set to UTF8. I think chcp 65001 does it on Windows. I appreciate the files are UTF8, but there may be something that is incorrectly reading the files in the default locale, leading of those issues. If it is that, then we need to go hunting for something that reads a file without specifying the locale (which, depressingly, is the default in Haskell-world). I'd almost be surprised if we didn't have something incorrectly specifying locale...

ndmitchell commented 4 years ago

FWIW, I can't find anything in ghcide that looks obviously wrong, but it's a nightmare to audit for. Looking at the hie.yaml file, I'm not sure how the Yaml library underneath loads files - it seems to be using the Posix API, but there might be CPP magic I'm missing.

One note from auditing both hie-bios and ghcide is that hie-bios consistently imports Text qualified as T. Ghcide has at least 5 identifiable different styles. A product of its history, but made grepping much harder.

alanz commented 4 years ago

A product of its history, but made grepping much harder.

We need a semantically aware search tool

ndmitchell commented 4 years ago

HLint has a semantically aware search tool - just type hlint grep. Either way, I'd still value consistency, at some point in the distant future (given the several important long running branches consistency at this point just means unnecessary merge conflicts).

alanz commented 4 years ago

It sounds like we should consider exposing hlint grep somehow in the ide.

pkapustin commented 4 years ago

Tried to switch the console to UTF8. Same error.

D:\haskell\src\semantic-parser>chcp 65001
Active code page: 65001

D:\haskell\src\semantic-parser>ghcide
ghcide version: 0.1.0 (GHC: 8.6.5) (PATH: C:\Users\User\AppData\Roaming\local\bi
n\ghcide.exe) (GIT hash: 0bf4e91ba4398c222dc7d6cd7666fffa6184d62c)
Ghcide setup tester in D:\haskell\src\semantic-parser.
Report bugs at https://github.com/digital-asset/ghcide/issues

Step 1/6: Finding files to test in D:\haskell\src\semantic-parser
Found 36 files

Step 2/6: Looking for hie.yaml files that control setup
Found 1 cradle

Step 3/6, Cradle 1/1: Implicit cradle for D:\haskell\src\semantic-parser
Cradle {cradleRootDir = "D:\\haskell\\src\\semantic-parser", cradleOptsProg = Cr
adleAction: Stack}

Step 4/6, Cradle 1/1: Loading GHC Session
ghcide: Cannot decode byte '\xad': Data.Text.Internal.Encoding.streamDecodeUtf8W
ith: Invalid UTF-8 stream
pkapustin commented 4 years ago

This is how the error looks inside VSCode.

problem

Ghcide plugin output:

ghcide version: 0.1.0 (GHC: 8.6.5) (PATH: C:\Users\User\AppData\Roaming\local\bin\ghcide.exe) (GIT hash: 0bf4e91ba4398c222dc7d6cd7666fffa6184d62c)
Starting LSP server...
If you are seeing this in a terminal, you probably should have run ghcide WITHOUT the --lsp option!
 Started LSP server in 3.95s
[DEBUG] Set files of interest to: [NormalizedFilePath "D:\\haskell\\src\\semantic-parser\\src\\Core\\Application.hs"]
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Opened text document: file:///d%3A/haskell/src/semantic-parser/src/Core/Application.hs
[DEBUG] Set files of interest to: [NormalizedFilePath "D:\\haskell\\src\\semantic-parser\\src\\Core\\ApplicationTypes.hs",NormalizedFilePath "D:\\haskell\\src\\semantic-parser\\src\\Core\\Application.hs"]
[DEBUG] Finishing shakeRun (took 0.08s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.18s)
[INFO] Opened text document: file:///d%3A/haskell/src/semantic-parser/src/Core/ApplicationTypes.hs
[DEBUG] Set files of interest to: [NormalizedFilePath "D:\\haskell\\src\\semantic-parser\\src\\Core\\ApplicationTypes.hs",NormalizedFilePath "D:\\haskell\\src\\semantic-parser\\src\\Core\\Application.hs",NormalizedFilePath "D:\\haskell\\src\\semantic-parser\\src\\Core\\Parsing.hs"]
[DEBUG] Starting shakeRun (aborting the previous one took 30.48s)
[DEBUG] Finishing shakeRun (took 36.84s, exception: AsyncCancelled)
[INFO] Opened text document: file:///d%3A/haskell/src/semantic-parser/src/Core/Parsing.hs
[DEBUG] Cancelled request IdInt 1
[DEBUG] Finishing shakeRun (took 0.12s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.04s)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 10.91s, exception: AsyncCancelled)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Cancelled request IdInt 4
[DEBUG] Cancelled request IdInt 5
[DEBUG] Cancelled request IdInt 6
[DEBUG] Cancelled request IdInt 7
[DEBUG] Cancelled request IdInt 8
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Cancelled request IdInt 10
[DEBUG] Finishing shakeRun (took 0.06s, completed)
[DEBUG] Set files of interest to: [NormalizedFilePath "D:\\haskell\\src\\semantic-parser\\src\\Core\\ApplicationTypes.hs",NormalizedFilePath "D:\\haskell\\src\\semantic-parser\\src\\Core\\Application.hs"]
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Closed text document: file:///d%3A/haskell/src/semantic-parser/src/Core/Parsing.hs
[DEBUG] Finishing shakeRun (took 0.09s, completed)
[DEBUG] Set files of interest to: [NormalizedFilePath "D:\\haskell\\src\\semantic-parser\\src\\Core\\ApplicationTypes.hs",NormalizedFilePath "D:\\haskell\\src\\semantic-parser\\src\\Core\\Application.hs",NormalizedFilePath "D:\\haskell\\src\\semantic-parser\\src\\Utils\\JsonUtils.hs"]
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Opened text document: file:///d%3A/haskell/src/semantic-parser/src/Utils/JsonUtils.hs
[DEBUG] Finishing shakeRun (took 0.01s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.06s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, exception: AsyncCancelled)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.02s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.04s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.02s, completed)
[INFO] Hover request at position 9:13 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 9:12 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.05s, exception: AsyncCancelled)
[DEBUG] Finishing shakeRun (took 0.02s, completed)
[INFO] Hover request at position 10:9 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 9:10 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.00s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 9:10 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 9:11 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 9:11 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.00s, completed)
[INFO] Hover request at position 9:11 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.00s, exception: AsyncCancelled)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 12:22 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 11:21 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.00s, completed)
[INFO] Hover request at position 9:8 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 9:8 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, exception: AsyncCancelled)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 9:8 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 9:9 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 9:9 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 9:11 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 9:10 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 11:12 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 9:11 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.02s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 9:13 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.02s, completed)
[INFO] Hover request at position 9:13 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.02s, completed)
[INFO] Hover request at position 9:13 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 12:14 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Set files of interest to: [NormalizedFilePath "D:\\haskell\\src\\semantic-parser\\src\\Core\\ApplicationTypes.hs",NormalizedFilePath "D:\\haskell\\src\\semantic-parser\\src\\Core\\Application.hs"]
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Closed text document: file:///d%3A/haskell/src/semantic-parser/src/Utils/JsonUtils.hs
[DEBUG] Finishing shakeRun (took 0.02s, completed)
pkapustin commented 4 years ago

Is it possible to compile everything in debug mode so that source file and line number is printed together with the error message?

ndmitchell commented 4 years ago

Unfortunately GHC doesn't work that way with error messages. There's a chance that compiling for profiling (e.g. --executable-profiling with Stack) and passing +RTS -xc would give us the full stack trace. If it does, that would be incredibly useful for identifying where the error is occurring.

pkapustin commented 4 years ago

I was able to compile with profiling on my own machine, but on that 32-but machine these errors occurs when running stack build --profile:

base-compat                      >
base-compat                      > C:\Users\User\AppData\Local\Temp\stack8760\ba
se-compat-0.10.5\src\Control\Concurrent\Compat.hs:12:1: error:
base-compat                      >     Could not find module `Control.Concurrent
'
base-compat                      >     Perhaps you haven't installed the profili
ng libraries for package `base-4.12.0.0'?
jneira commented 4 years ago

@pkapustin do you continue experiencing the issue with lastest ghcide?

nartamonov commented 3 years ago

I've got the same problem with VS Code Haskell extension and haskell-language-server 0.5.1 (don't know what version of ghcide it uses), but could find a workaround. When I start VS Code from Windows Terminal or cmd.exe I get the error. But when I start VS Code from Cmder terminal with the following commands in environment settings (Settings -> Startup -> Environment):

set LANG=ru_RU.UTF-8
chcp utf-8

Then after starting VS Code the error is gone.

@pkapustin try this workarond, I'm sure it will work for you. Of course, the bug still remains...

PS Tried on Windows 10 with Russian locale (with active codepage 866 in cmd.exe by default). By the way, changing codepage to 65001 in cmd.exe doesn't work for me.

jneira commented 3 years ago

@nartamonov many thanks to provide that workaround, it is really weird that cmder wotks where cmd+chcp 65001 does not.

wjrforcyber commented 2 years ago

This is how the error looks inside VSCode.

problem

Ghcide plugin output:

ghcide version: 0.1.0 (GHC: 8.6.5) (PATH: C:\Users\User\AppData\Roaming\local\bin\ghcide.exe) (GIT hash: 0bf4e91ba4398c222dc7d6cd7666fffa6184d62c)
Starting LSP server...
If you are seeing this in a terminal, you probably should have run ghcide WITHOUT the --lsp option!
 Started LSP server in 3.95s
[DEBUG] Set files of interest to: [NormalizedFilePath "D:\\haskell\\src\\semantic-parser\\src\\Core\\Application.hs"]
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Opened text document: file:///d%3A/haskell/src/semantic-parser/src/Core/Application.hs
[DEBUG] Set files of interest to: [NormalizedFilePath "D:\\haskell\\src\\semantic-parser\\src\\Core\\ApplicationTypes.hs",NormalizedFilePath "D:\\haskell\\src\\semantic-parser\\src\\Core\\Application.hs"]
[DEBUG] Finishing shakeRun (took 0.08s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.18s)
[INFO] Opened text document: file:///d%3A/haskell/src/semantic-parser/src/Core/ApplicationTypes.hs
[DEBUG] Set files of interest to: [NormalizedFilePath "D:\\haskell\\src\\semantic-parser\\src\\Core\\ApplicationTypes.hs",NormalizedFilePath "D:\\haskell\\src\\semantic-parser\\src\\Core\\Application.hs",NormalizedFilePath "D:\\haskell\\src\\semantic-parser\\src\\Core\\Parsing.hs"]
[DEBUG] Starting shakeRun (aborting the previous one took 30.48s)
[DEBUG] Finishing shakeRun (took 36.84s, exception: AsyncCancelled)
[INFO] Opened text document: file:///d%3A/haskell/src/semantic-parser/src/Core/Parsing.hs
[DEBUG] Cancelled request IdInt 1
[DEBUG] Finishing shakeRun (took 0.12s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.04s)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 10.91s, exception: AsyncCancelled)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Cancelled request IdInt 4
[DEBUG] Cancelled request IdInt 5
[DEBUG] Cancelled request IdInt 6
[DEBUG] Cancelled request IdInt 7
[DEBUG] Cancelled request IdInt 8
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Cancelled request IdInt 10
[DEBUG] Finishing shakeRun (took 0.06s, completed)
[DEBUG] Set files of interest to: [NormalizedFilePath "D:\\haskell\\src\\semantic-parser\\src\\Core\\ApplicationTypes.hs",NormalizedFilePath "D:\\haskell\\src\\semantic-parser\\src\\Core\\Application.hs"]
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Closed text document: file:///d%3A/haskell/src/semantic-parser/src/Core/Parsing.hs
[DEBUG] Finishing shakeRun (took 0.09s, completed)
[DEBUG] Set files of interest to: [NormalizedFilePath "D:\\haskell\\src\\semantic-parser\\src\\Core\\ApplicationTypes.hs",NormalizedFilePath "D:\\haskell\\src\\semantic-parser\\src\\Core\\Application.hs",NormalizedFilePath "D:\\haskell\\src\\semantic-parser\\src\\Utils\\JsonUtils.hs"]
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Opened text document: file:///d%3A/haskell/src/semantic-parser/src/Utils/JsonUtils.hs
[DEBUG] Finishing shakeRun (took 0.01s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.06s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, exception: AsyncCancelled)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.02s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.04s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.02s, completed)
[INFO] Hover request at position 9:13 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 9:12 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.05s, exception: AsyncCancelled)
[DEBUG] Finishing shakeRun (took 0.02s, completed)
[INFO] Hover request at position 10:9 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 9:10 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.00s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 9:10 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 9:11 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 9:11 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.00s, completed)
[INFO] Hover request at position 9:11 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.00s, exception: AsyncCancelled)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 12:22 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 11:21 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.00s, completed)
[INFO] Hover request at position 9:8 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 9:8 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, exception: AsyncCancelled)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 9:8 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 9:9 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 9:9 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 9:11 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 9:10 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 11:12 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 9:11 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.02s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 9:13 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.02s, completed)
[INFO] Hover request at position 9:13 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.02s, completed)
[INFO] Hover request at position 9:13 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 12:14 in file: d:\haskell\src\semantic-parser\src\Utils\JsonUtils.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Set files of interest to: [NormalizedFilePath "D:\\haskell\\src\\semantic-parser\\src\\Core\\ApplicationTypes.hs",NormalizedFilePath "D:\\haskell\\src\\semantic-parser\\src\\Core\\Application.hs"]
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Closed text document: file:///d%3A/haskell/src/semantic-parser/src/Utils/JsonUtils.hs
[DEBUG] Finishing shakeRun (took 0.02s, completed)

I have been seeing this error in VScode for a week, really annoything, Windows 10, Chinese locale, tried chcp 65001 still not working...

hasufell commented 2 years ago

The only place I could find is here:

https://github.com/haskell/haskell-language-server/blob/fa868b5f34240894893af6f6cda41e3172a78980/ghcide/src/Development/IDE/GHC/Util.hs#L175-L177

But this does lenient decoding and should never fail.