mainframer icon indicating copy to clipboard operation
mainframer copied to clipboard

Windows support

Open ghost opened this issue 7 years ago • 18 comments

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.

ghost avatar May 22 '18 21:05 ghost

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!

artem-zinnatullin avatar May 22 '18 22:05 artem-zinnatullin

btw some issues were discussed before https://github.com/gojuno/mainframer/issues/180.

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

yunikkk avatar May 23 '18 08:05 yunikkk

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

artem-zinnatullin avatar May 23 '18 09:05 artem-zinnatullin

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

artem-zinnatullin avatar May 23 '18 09:05 artem-zinnatullin

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

yunikkk avatar May 23 '18 10:05 yunikkk

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

bmc08gt avatar May 24 '18 15:05 bmc08gt

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

stefi92 avatar May 24 '18 20:05 stefi92

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

ghost avatar May 26 '18 13:05 ghost

@mrstefi92 Java installed in windows.

bmc08gt avatar May 26 '18 15:05 bmc08gt

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!

ghost avatar May 30 '18 06:05 ghost

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?

dkonurov avatar Jun 27 '18 07:06 dkonurov

NTFS by nature is slow. Limit what is synced back to the client. Iirc the next release will support a remoteinclude so you can better filter it, but existing shell script can easily be modified to support it. On Wed, Jun 27, 2018 at 3:21 AM Dmitry Konurov [email protected] wrote:

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?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gojuno/mainframer/issues/226#issuecomment-400569169, or mute the thread https://github.com/notifications/unsubscribe-auth/ABk2Yd-cb1xzyzKw3Jde79Y34dUcxzerks5uAzJjgaJpZM4UJcSQ .

bmc08gt avatar Jun 27 '18 13:06 bmc08gt

@bmc08gt can you share your WSL config please?

creati8e avatar Aug 22 '18 08:08 creati8e

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.

bmc08gt avatar Aug 22 '18 12:08 bmc08gt

@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

creati8e avatar Aug 23 '18 21:08 creati8e

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 :)

artem-zinnatullin avatar Aug 23 '18 21:08 artem-zinnatullin

@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

bmc08gt avatar Aug 24 '18 01:08 bmc08gt

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

ilya-shknaj avatar Feb 04 '19 13:02 ilya-shknaj