-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Windows: Dev Setup Doc #3685
Comments
I think is a good opportunity to try all possible shell for windows and check the advantage of each of them. We can do a doc for something like Git Bash and another for WSL. But, I really think WSL2 is the best Windows setup, and it's the one Microsoft recommends. If we focus to make it work only with WSL, we don't need to do anything for Windows inside the framework since it a Linux environment. Any downside with WSL2 that I didn't know, @Tobbe or anyone who use Windows? |
We could also change this sentence and refer to the Microsoft doc for NodeJS I have tested both approaches, and it works without problem for redwood projects. Same for the warning in CLI when CRWA |
@simoncrypta any/all of this would be amazing. And I agree that we just want to have one primary recommendation we make. (With the caveat others might be ok but Devs are on their own.) You don't need to do a deep-dive. Just simply confirm that a specific setup is working well. Honestly, this is 80% of the way there: And don't worry about making the writing perfect. We can help with that once the essential components are there. It just needs to be very practical, and step by step setup. @Tobbe please do add your thoughts and help as available. I know you've learned a lot about this over time as well. |
Happy to see Windows getting some TLC, more than happy to change my workflow to ease the all-around strain. I have a few questions with this setup, hopefully they're not just personal ignorance and can be useful in the docs to come:
More than happy to help with testing/whatever where needed, @simoncrypta :) |
I love these questions @realStandal ! I will try to answer the best I can.
So you can use WSL with the Windows file system, but don't do it ! The performance is terrible, and you will eventually get error. The majority of problem with RedwoodJS on Windows is caused by the file system.
Yes you can ! You just need to mount it:
Git clone is definitely the way to go.
WSL2 made all the link between Linux and Windows, so via terminal you don't need to do anything special. I hope this will help you run Redwood on WSL, but if not you are more than welcome to DM me on Discord. |
Honestly, if RW said it only supported WSL2 I would never even have tried it. My computer at the time just couldn't handle it. And even still, lots of people I talk to aren't thrilled about it. We have two front-end developers who use Windows at work. Both use WSL. The other one mainly uses a m1 mbp at work, but at home he uses his kitted out Windows gaming rig. He says his Windows computer feels faster than his mac laptop, but of course it has 64 gb ram, top of the line amd cpu, super fast ssd etc. And the fans on the gfx card and on the cpu are always running no matter what, so any extra load from wsl isn't really noticeable. I agree it would be much easier for us as RW framework maintainers if we could just tell everyone to use mac/linux/wsl. But I think it's much easier for Windows developers to get going with just git-bash and the included mintty terminal. |
Thank you for that, @Tobbe, you confirm what I was worried about newcomer who jump in the NodeJS universe and also WSL2 have made a lot of performance patches, but it still really more CPU and memory intensive to run the same thing on WSL vs Git-bash or PowerShell. What you feel about PowerShell vs Git-bash ? |
There's already nvm-windows, cygwin and git bash that you have already mentioned, also I see no issue with using powershell or cmd. There are official postgreSQL binaries for windows as well.. Just idling, WSL2 consumes 2GB of RAM btw, not resource friendly, and definitely overkill for a javascript framework. Just as I'm writing this I got a redwood app using powershell, had a hard time with getting the right node version, which seems that 16.13.0 is the only one working with redwood atm. |
This issue comment was really interesting to read microsoft/WSL#873 (comment) TL;DR: File operations will never be as fast on Windows as on Linux, but git-for-windows can do more optimizations than WSL can, so is a bit faster. |
I'm not sure. I don't have enough experience with PS. I think it's probably mostly up to personal preference if you prefer PS or bash |
All right, so I think we can conclude that WSL2 is really not the best setup, especially for new people who want to jump and try Redwood for the first time. WSL2 take much more resource, is more complicate to install depend on which version of Windows you have, and you need to manage your Linux Subsystem. But, I think it can be a good option for Redwood Contributing, e2e with cypress work with WSLg, so we can recommend inside the contributing doc WSL2 for Windows user contributor. Git-bash seem to be more appreciate and since it use bash, we probably had less problem than PowerShell. |
@simoncrypta Understood and sounds good! Thank you again for taking on this project. |
I have installed and been developing on Redwood using the CMD shell and various major releases of both the 14.x and 16.x Node branches without encountering any obstacles or issues. I use nvm-windows for engine selection, and do have mingw available in my environment, but I don't think that's a factor here. I wonder what the determining factors are |
Closing out. Moved remaining task to #3989 |
Windows devs try Redwood, using the "wrong" shell/terminal, and assume it's broken ('cause their local setup doesn't work). It's time for an official doc recommending the dev setup to use with Windows.
@simoncrypta
The text was updated successfully, but these errors were encountered: