Skip to content

docs: add WSL build location note for contributors#4824

Merged
fendor merged 5 commits intohaskell:masterfrom
Siya-05:docs/wsl-build-note
Feb 6, 2026
Merged

docs: add WSL build location note for contributors#4824
fendor merged 5 commits intohaskell:masterfrom
Siya-05:docs/wsl-build-note

Conversation

@Siya-05
Copy link
Copy Markdown
Contributor

@Siya-05 Siya-05 commented Feb 3, 2026

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.

@Siya-05 Siya-05 requested a review from michaelpj as a code owner February 3, 2026 15:23
Copy link
Copy Markdown
Collaborator

@fendor fendor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread docs/contributing/contributing.md Outdated
Comment thread docs/contributing/contributing.md Outdated
Comment thread docs/contributing/contributing.md Outdated
Comment thread docs/contributing/contributing.md Outdated

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.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

@Siya-05 Siya-05 Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Siya-05 and others added 4 commits February 4, 2026 15:07
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>
Copy link
Copy Markdown
Collaborator

@fendor fendor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@fendor fendor merged commit c0132b0 into haskell:master Feb 6, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants