Skip to content

"Couldn't figure out what GHC version the project is using" if the path contains a german umlaut #601

Closed
@I-Al-Istannen

Description

@I-Al-Istannen

Problem

Since a few days (I don't know the exact one, but within ~ the last 5) the haskell plugin can no longer deal with files that have a german umlaut (öäü) in their path. When I open such a file, the plugin reports the error Couldn't figure out what GHC version the project is using. I couldn't find any further logs. The more detailed error message below seems to indicate that it doesn't understand that character.

Renaming the folder to a name without an umlaut - and changing nothing else - resolves the problem.

Error message

The path to the folder opened in VSC and the haskell file is /tmp/test/Rändom/Test.hs.

Couldn't figure out what GHC version the project is using:
/home/i_al_istannen/.config/Code - OSS/User/globalStorage/haskell.haskell/haskell-language-server-wrapper-0.6.0-linux --project-ghc-version
exited with exit code 1: Module "/tmp/test/Rhaskell-language-server-wrapper-0.6.0-linux: <stderr>: hPutChar: invalid argument (invalid character)

How to reproduce

# Setup directory
cd /tmp/
mdkir Rändom && cd Rändom

# Setup project file
echo "module Test where" > Test.hs

# Start VSCode
code .

# Observe the error message when opening Test.hs

# Rename the folder
cd ..
mv Rändom Random

# Enter it and restart VSCode
cd Random
code .

# Watch it work when opening Test.hs

Disclaimer

I couldn't find a duplicate issue but I might have missed one, as I didn't trail through every available issue and used the search function instead. In that case I apologize and would love a pointer to a relevant issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions