scry icon indicating copy to clipboard operation
scry copied to clipboard

Support Scry on Windows using WSL

Open kofno opened this issue 6 years ago • 7 comments

Scry doesn't run on Windows. Because Crystal doesn't run on windows. But Windows 10 can run scry in bash. However, I'm not certain that we can mix STDIN and STDOUT in a useful way.

First step, test if we can connect to a Scry running bash from windows. If that works, there's nothing to change.

If that doesn't work, add support for optionally connecting to scry of TCP.

kofno avatar Jul 14 '17 12:07 kofno

I think :point_down: would be useful

WSL Proxy Files - https://github.com/watzon/wsl-proxy

Shared by @watzon on Gitter

faustinoaq avatar Aug 06 '17 19:08 faustinoaq

Interesting. I'll have to check that out.

kofno avatar Aug 06 '17 20:08 kofno

Got it working on VSCode with the Crystal Language plugin. I had to create a SymLink from C:\Windows\System32\bash.exe to C:\Windows\SysWOW64\bash.exe to allow the 32 bit version of VSCode to launch bash and I also had to change the permissions on the VSCode directory in Program Files to allow scry to write a file

watzon avatar Aug 09 '17 00:08 watzon

Wow, @watzon Can you show us a screenshot with Scry and VSCode working on Windows? :heart_eyes:

faustinoaq avatar Aug 09 '17 02:08 faustinoaq

Here you go @faustinoaq scry-vscode-windows

watzon avatar Aug 09 '17 21:08 watzon

Well, I installed WSL and We need to fix some things

  1. Just syntax errors are detected, not methods neither types.
  2. Crystal compiler can't read C:\User\main\app.cr but /mnt/c/User/main/app.cr
  3. Crystal compiler inside WSL returns file info as /mnt/c/... for diagnostics, formatter, and implementations.
  4. VSCode needs file info as C:\User\main\... to show things properly.
  5. Local ${workspaceRoot}\lib also needs to be converter to be processed by crystal inside WSL.

Some work is needed to convert paths between Unix and Windows and get Scry working 100% on WSL.

I think it would be ready in the next months, I did a proof of concept in my free time 👇

Implementations don't work yet

Diagnostics:

windows1

Hover(not yet in scry master):

windows2

Formatting:

windows3

windows4

Cheers 😄

faustinoaq avatar Aug 10 '17 17:08 faustinoaq

@faustinoaq @kofno hey guys, can you show your user settings? I can't setup scry on windows but crystal compiler working is stable via WSL

I getting every time error like:

/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:2386 The Crystal Language server crashed 5 times in the last 3 minutes. The server will not be restarted.

Nyarum avatar Aug 24 '18 21:08 Nyarum