Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dune-pkg: Detect WSL1 and warn user #11530

Open
Alizter opened this issue Mar 13, 2025 · 0 comments
Open

dune-pkg: Detect WSL1 and warn user #11530

Alizter opened this issue Mar 13, 2025 · 0 comments

Comments

@Alizter
Copy link
Collaborator

Alizter commented Mar 13, 2025

Problem

Building things after having done dune pkg lock will cause issues when a user is using WSL1. The Windows Subsystem for Linux.

For context, WSL1 is a partial translation of linux kernel calls to the windows kernel whereas WSL2 is containerization based on docker.

The things we want to do when building packages with dune relies on kernel calls not available in WSL1. Generally rules with sandboxing are going to be problematic.

This means that inexperienced users will be left scratching their heads when they see dune complain about permissions.

Proposal

In order to fix this issue, I suggest that we detect somewhere that the user is running dune via WSL1 and suggest switching to WSL2.

I'm not yet certain how to avoid unnecessary checks on other platforms. Supposedly checking wsl -l -v in Powershell will spit out something with 2 on WSL2 and either error or say 1 on WSL1.

I believe this will be a net usability gain, especially for new users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant