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

WSL #674

Open
InfRandomness opened this issue Nov 28, 2021 · 4 comments
Open

WSL #674

InfRandomness opened this issue Nov 28, 2021 · 4 comments

Comments

@InfRandomness
Copy link

Hi, I'm opening an issue because I'm not sure if this plugin supports WSL 2.

I'm trying to setup a project SDK from windows into WSL, so selecting a stack executable into WSL, but the plugin states that
image

maybe the plugin does not know how to work with WSL ? And if it doesn't, it would be great to implement a way to use this with WSL.

@JoAllg
Copy link

JoAllg commented Jan 27, 2022

I noticed the same problem (current version)

The event log shows, that intellij-haskell tries to use it as a windows executeable:

15:01	Cannot run program "\\wsl$\Ubuntu.20.04\usr\local\bin\stack" (in directory "C:\Users\Joshua"): CreateProcess error=193, %1 ist keine zulässige Win32-Anwendung

15:01	Executing `\\wsl$\Ubuntu.20.04\usr\local\bin\stack --numeric-version` failed: \\wsl$\Ubuntu.20.04\usr\local\bin\stack --numeric-version:   

@rikvdkleij
Copy link
Owner

I have no knowledge of WSL. Is the path to stack the problem?

@InfRandomness
Copy link
Author

Hm, I'm not actually sure, it would be very worth to investigate this though 👍

@vasdommes
Copy link

I have no knowledge of WSL. Is the path to stack the problem?

The path is correct. The problem is that the plugin tries to call this file from Windows terminal because it thinks that we're on Windows.

In the case of WSL, IDE runs on Windows, whereas the project and Haskell binaries are in Linux.

To fix the issue, one probably has to:

  1. fix intellij.haskell.external.execution.CommandLine calls to run commands in WSL terminal, when needed,
  2. fix all SystemInfo.isWindows / SystemInfo.isLinux checks to account for WSL

P.S. WSL is just a special case of Remote Development, so ideally there should be a general fix (covering WSL, SSH etc).

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

No branches or pull requests

4 participants