Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Use Windows FSharp within Windows Subsystem for Linux #97

Open
Tombert opened this issue Oct 3, 2017 · 10 comments
Open

Use Windows FSharp within Windows Subsystem for Linux #97

Tombert opened this issue Oct 3, 2017 · 10 comments

Comments

@Tombert
Copy link

Tombert commented Oct 3, 2017

I was recently trying to run the vim-fsharp plugin inside WSL, and pointed my MSBuild executable and Fsharp interactive executable to the windows ones (since WSL now allows you to call windows applications), and while it would start fsautocomplete, it didn't appear to do anything else.

Would it be feasible to modify the plugin to work within WSL?

@kjnilsson
Copy link
Contributor

Forgive my ignorance, what is WSL?

@Tombert
Copy link
Author

Tombert commented Oct 3, 2017

@kjnilsson WSL = Windows Subsystem for Linux. It is Microsoft's ability to run a mostly-full linux in Windows userspace; substantially nicer than Cygwin, since it will actually run Linux binaries without a recompilation.

@kjnilsson
Copy link
Contributor

I don't have any such system to test on so support for WSL would have to come from a contribution. PR's welcome.

@enricosada
Copy link

enricosada commented Oct 27, 2017

@Tombert i use WSL. i'd like to test vim plugin there. I'll followup when i try (soon).
Are you sure you have mono installed? that's a requirement. the name is fsautocomplete.exe, but is a .net exe so need to run with mono

@Tombert
Copy link
Author

Tombert commented Oct 27, 2017

@enricosada I do not have Mono installed; WSL can actually run native Windows apps now, so theoretically it should be able to run my native windows install instead of the simulated Mono version, right?

@enricosada
Copy link

enricosada commented Oct 27, 2017

yes, you can run ./fsautocomplete.exe --help and that will run as .NET process on windows.

v-- fsautocomplete.exe invoked from WLS

image

problem is, FSAC doesnt check the OS atm for some behaviour it need to do differently.
just check if is run from mono or not.
so is not going to work like that, because need some really specific detection (app run in windows, but started in WSL... so should use unix behaviour). dunno how to detect that

as a workaround, try isntall mono on WSL. so vim run mono fsautocmplete.exe and things should work

image

@Tombert
Copy link
Author

Tombert commented Oct 27, 2017

@enricosada how hard would it be to add a check for the host OS to see if it's WSL? I'd be happy to do a PR if you point me in the right direction.

@enricosada
Copy link

enricosada commented Oct 27, 2017

@Tombert but when in WSL, running FSAC in windows, is a nice use case.
we can use all the windows .net tooling, and unix tools + unix vim.

WSL: linux tooling and vim, but windows .NET. a good combo.
but dunno how msbuild is gonna work. well, depends if the path is mapped on windows too.. let's see later

can you open an issue in https://github.com/fsharp/FsAutoComplete/issues/ ? but we need a way to detect we are started from WLS..

@enricosada
Copy link

check for the host OS to see if it's WSL

exactly. dunno :D.
fsac will be a windows process, running on windows (probably), but started from WSL linux.. so dunno

@kjnilsson
Copy link
Contributor

Mostly this should be a matter of detecting how to run fsac somewhere near here and do so. Atm it first tries with mono then without.

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

No branches or pull requests

3 participants