Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Support Scry on Windows using WSL #13

Closed
kofno opened this issue Jul 14, 2017 · 7 comments
Closed

Support Scry on Windows using WSL #13

kofno opened this issue Jul 14, 2017 · 7 comments

Comments

@kofno
Copy link
Contributor

kofno commented Jul 14, 2017

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.

@faustinoaq
Copy link
Member

I think 👇 would be useful

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

Shared by @watzon on Gitter

@kofno
Copy link
Contributor Author

kofno commented Aug 6, 2017

Interesting. I'll have to check that out.

@watzon
Copy link

watzon commented Aug 9, 2017

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

@faustinoaq
Copy link
Member

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

@watzon
Copy link

watzon commented Aug 9, 2017

Here you go @faustinoaq
scry-vscode-windows

@faustinoaq
Copy link
Member

faustinoaq commented Aug 10, 2017

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 😄

@Nyarum
Copy link

Nyarum commented Aug 24, 2018

@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.

@bcardiff bcardiff closed this as completed Jun 1, 2023
Crystal Tools automation moved this from To do to Done Jun 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Crystal Tools
  
Done
Development

No branches or pull requests

5 participants