docs: add WSL build location note for contributors#4824
docs: add WSL build location note for contributors#4824fendor merged 5 commits intohaskell:masterfrom
Conversation
fendor
left a comment
There was a problem hiding this comment.
Thanks for the contribution!
I think this section should be right after cloning the repo, e.g. here https://github.com/SivapriyaVenkateswarar/haskell-language-server/blob/7a1ce5114576162ef6d748476eedee23c3f9476f/docs/contributing/contributing.md#building
Since this is not cabal specific, afaict?
Also, it is important to keep it brief, so a couple of suggestions to reduce the size
|
|
||
| If you are building **Haskell Language Server** inside WSL, it is strongly recommended to clone and build the repository from the Linux filesystem (for example, `~/dev`) rather than from Windows-mounted paths such as `/mnt/c` or `/mnt/p`. | ||
|
|
||
| Building from Windows-mounted directories can cause permission issues, degraded performance, or unexpected build failures—including builds being terminated—especially on low-memory systems. |
There was a problem hiding this comment.
Do you have an idea why this is the case? I am mostly building HLS on windows directly, not via the WSL, so I don't know what's going on here? Is WSL broken?
There was a problem hiding this comment.
Hey, thanks for all the suggestions, and extremely sorry for the delayed reply!
from what I found, this doesn’t look like a WSL bug itself. It’s a known issue with building on Windows-mounted paths (/mnt/*) under WSL.
Cabal does a lot of small file operations, and on /mnt/* those operations go through the Windows filesystem, making it much slower and can increase memory usage. On low-RAM systems, that can even cause builds to get killed.
Cloning the repo into the Linux home directory (like ~/dev) uses WSL’s native filesystem, which is why builds there are usually faster and more reliable.
Co-authored-by: fendor <fendor@users.noreply.github.com>
Co-authored-by: fendor <fendor@users.noreply.github.com>
Co-authored-by: fendor <fendor@users.noreply.github.com>
This adds a short note to the contributing guide for users building HLS under WSL.
Building from Windows-mounted paths (e.g. /mnt/c) can cause permission issues, performance problems, or memory-related build failures. Recommending cloning into the Linux filesystem (e.g. ~/dev) helps avoid these issues, especially for new contributors.
This was discussed and confirmed in the related issue.