Skip to content
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 support #226

Open
ghost opened this issue May 22, 2018 · 18 comments
Open

Windows support #226

ghost opened this issue May 22, 2018 · 18 comments

Comments

@ghost
Copy link

ghost commented May 22, 2018

Hello guys, all users in our team have a windows machine and the build is quietly slow. So I wanted to start using the mainframer and speed up the process of build. I have created the remote server where is ssh enabled. The problem is, I cannot run the correct configuration from my windows machine to successfully connect and communicate with server via rsync. Can you please help me? Thank you very much for your time.

@artem-zinnatullin
Copy link
Contributor

Hi @mrstefi92!

None of Mainframer maintainers use Windows for development, so we can't really provide great advice

However, I think you should be able to use Mainframer from Unix environment on Windows:

Personally I would recommend Cygwin as it's much more mature.

I've used Cygwin for quite some time years ago and it was very reliable.

Linux subsystem was problematic for me but I haven't tried running Mainframer on it. Also I've noticed significan't IO performance problems in Linux subsystem, not sure if it's fixed, that can affect Mainframer since it does quite a bit of IO.

Please comment with update on your end, I'm sure others are very interested in that too!

@yunikkk
Copy link

yunikkk commented May 23, 2018

btw some issues were discussed before #180.

We've manage to setup mainframer on Windows host then but then faced the same issues with sync speed =\

@artem-zinnatullin
Copy link
Contributor

Parallel sync in Mainframer 3.x might compensate sync speed problem

@artem-zinnatullin
Copy link
Contributor

@yunikkk did you use Cygwin or Linux subsystem? I wonder if Cygwin manages to get better IO speeds

@yunikkk
Copy link

yunikkk commented May 23, 2018

As far as i remember we used cygwin. Will ask Kostya for more details when he is back from vacation, it was his home machine

@bmc08gt
Copy link

bmc08gt commented May 24, 2018

WSL works great and is what I am using currently, have builds running through Android Studio as well. :)

@stefi92
Copy link

stefi92 commented May 24, 2018

thank you for answers, i give it a try tommorow :)

@ghost
Copy link
Author

ghost commented May 26, 2018

@bmc08gt are you using java jdk from windows system or have you installed the another on WSL?

@bmc08gt
Copy link

bmc08gt commented May 26, 2018

@mrstefi92 Java installed in windows.

@ghost
Copy link
Author

ghost commented May 30, 2018

Thank you very much guys for your help, with WSL mainframer works great and it's also easy to modify the mainframer.sh file with custom configurations!

@dkonurov
Copy link

Hello everyone, client on Windows (10), remote on Linux (Ubuntu 16.04) and extreme slow speed rsync
on local machine
Sync done: took 5 minutes 7 seconds.

How I can debbug rsync?

@bmc08gt
Copy link

bmc08gt commented Jun 27, 2018 via email

@creati8e
Copy link

@bmc08gt can you share your WSL config please?

@bmc08gt
Copy link

bmc08gt commented Aug 22, 2018

My .mainframer/config is:

remote_machine=mainframer
remote_compression_level=3

My .mainframer/ignore and .mainframer/localignore are the standard Android rules.

Where things change a little bit are the .mainframer/remoteignore and my added .mainframer/remoteinclude. I have modified the bash mainframer script to allow finer grain control over what get's synced back from the remote to prevent unneeded syncs.

My .mainframer/remoteignore ignores the following

# Usually you don't need to sync sources back from remote to local machine.
# Btw, this syntax supports multimodule Gradle projects.
- src
- build/generated/***
- build/intermediates/***
- build/kotlin/***
- build/tmp/***

where my .mainframer/remoteinclude only syncs back the following:
+ /app/build/outputs/apk/***

This setup is allowing for me to have ~30 sec round trip debug compiles for our larger-scale android app (post initial gradle download of dependecies) and a ~2minute proguarded release build.

If you would like the patch for the mainframer bash script (v2), I would be more than happy to upload it as gist.

@creati8e
Copy link

@bmc08gt thank you a lot!
If you would like the patch for the mainframer bash script (v2), I would be more than happy to upload it as gist. - Yes, please

@artem-zinnatullin
Copy link
Contributor

I'd also like to see what patches do you apply to mainframer.sh

Version 3 will ship binary releases because we've switched to Rust for development, so such patches can be a bit harder to apply on your side (sources are of course open, but still)

There is a plan to add simple Plugin System #182 that should allow some behavior changes without changing the Mainfraimer itself, maybe that'll be the way to go in your case :)

@bmc08gt
Copy link

bmc08gt commented Aug 24, 2018

@artem-zinnatullin @creati8e

https://gist.github.com/bmc08gt/c5141f0bed37f43ea97dd7af151def25 Here is the patch file that you can apply to the existing v2 script.

This has the remoteinclude functionality, as well as an success exit code to allow chaining multple mainframer executions together.

Oh and the interactive (-tt) option enabled from #224

@ilya-shknaj
Copy link

One note which I faced.
In windows during configuration of the mainframer plugin, it ask input remoteMachine.
In config file, plugin put remoteMachine = .... with new line in the end. It lead to
Sync local → remote machine ...
: Name or service not knownname myHost
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c (235) [sender = 3.1.2]

Fix is remove new line in config

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

No branches or pull requests

7 participants