-
Notifications
You must be signed in to change notification settings - Fork 970
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
yarn rwt copy depends on rsync, which isn't available on Windows #679
Comments
rsync for git-for-windows can be downloaded from http://repo.msys2.org/msys/x86_64/ see more here: https://serverfault.com/questions/310337/using-rsync-from-msysgit-for-binary-files/872557#872557 Installing that however, only got me a tiny step further I now have this error
|
@Tobbe Admittedly, we never tested this workflow and CLI command on Windows. Could definitely use your help here if you'd be available, which doesn't mean tackling this alone. @peterp and I are prioritizing Windows support right now -- helping us diagnose so we can fix is a huge help in and of itself. Have you looked at the code for the command yet? It's possible to add the rysnc package as well as swap it for something that offers better cross-platform support (if applicable): The other tools in the CONTRIBUTING workflow are the tasks here: Not sure if you've tried them out yet but we'd also like to make sure they're working for Windows as well. |
Could be worth it to try with https://github.com/mattijs/node-rsync as the last commit message (except the version bump) is "Update rsync.js with Windows support", which does sound promising 🙂 If that doesn't work out we could try this: https://github.com/jprichardson/node-fs-extra/blob/master/docs/copy.md I noticed you use If no one beats me to it I can probably play around a bit with it this weekend |
Looping in @peterp on this as he authored the command and could better address the rsync options. Rsync does look like it will work cross-platform. I wonder if the hiccup is actually happening due to Execa. See these lines: redwood/packages/cli/src/redwood-tools.js Lines 69 to 73 in 1022744
Check out the Execa docs for the Maybe we don't need the option and/or could have logic to check for sys and call corresponding shell setting? |
So, this was the error message I got (as pasted above)
Taking the command it's trying to run, and running it manually, straight on the command line, I get this
So I don't think the problem is with Running
Using that path format instead with rsync, and we have success!
So, once again we're seeing an issue with Windows path format 😁 I could try looking in to fixing that, but that would still leave us with having to tell all Windows users to install rsync, and that wasn't a very user-friendly experience 🙁 Because of that, I'm voting for replacing rsync with some npm package to do the copying for us. |
Amazing!
I wouldn't want to move to something else since rsync is so fast and reliable. |
PowerShell is giving me a headache /c/Users/... Doesn't work
C:/Users/... doesn't work
C:\Users\... doesn't work
Hah! //localhost/c$/Users/... works!
The good news is that it works in GitBash as well, so both PS and GitBash can use the //localhost syntax. The bad news is that it's really slow. I timed both versions in GitBash /c/Users/... finished in 1.56 seconds, //localhost/c$/Users/... finished in 22.21 seconds 🙁 |
Oh wow, that's crazy - is there something else on Windows that people can use to keep files in sync? |
I still haven't given up on rsync, I actually think I'm on to something 🙂 I'll be back with an update later tonight, after work. |
Tack! |
The problem with PowerShell wasn't really with PowerShell, but rather with the version of rsync it used. I installed cwRsync (top result on that chocolatey search result page linked above) and that seemed to have caused a lot of the problems. When I figured out how to use the msys2 version of rsync in PowerShell as well, everything started working, and it was fast too 🙂 I documented the installation here https://tlundberg.com/blog/2020-06-15/installing-rsync-on-windows/ |
@Tobbe excited to see your progress here! Just wanted to make sure I understood and tied together next step in progress:
Anything missing? And happy to help on step 2 -- just let me know or assign an issue to me. 🚀 |
One thing that unfortunately came up during my testing is that the build:watch + copy:watch workflow doesn't work on Windows. See #701 |
redwood@d51ade08118c17459cebcdb496197ea52485364a
windows 10
GitBash (mintty 3.1.6)
yarn v1.22.4
I tried copying over a modified version of the Redwood Framework to a Redwood App, to test some changes I've made. But trying to run
yarn rwt copy
I get an error message about rsync not being available. Which makes sense, since I'm on Windows. See log belowThe text was updated successfully, but these errors were encountered: