-
Notifications
You must be signed in to change notification settings - Fork 78
Issue #16 - Getting Landrush to work on Windows #154
Conversation
Looks like the gemfile.lock picks up a newer RuboCop version that is not fully backwards compatible. Seems adding something like what is outlined in this PR https://github.com/Homebrew/homebrew/pull/48144/files could work. |
TBH I did not run Rubocop. I think it was added just a while ago and I just rebased on top of these changes. Personally I only ever ran You can run |
df31e51
to
fd4390c
Compare
I fixed some basic spacing issues, but other than that just re-generated |
I am wondering what environment the CI job is running on. Linux? It reports:
My result of
I can try to run the tests in a Linux VM, but it would be nice to know the environment used for CI to make sure I align with it. |
18351da
to
674a69f
Compare
Ok, I pushed another update to this pull request, fixing the tests on Linux as well. Turns out that I missed a |
@strzibny - WDYT? |
674a69f
to
d2df147
Compare
Rebased on current master. |
@hferentschik
|
Hmm, interesting. I thought JSON is part of the standard lib, so it should not be necessary to install an additional gem. What Ruby version are you using? |
|
Interesting. I guess it cannot harm to explicitly add 'json'. trying to understand why is it required. Did you specify any particular version? |
@hferentschik nope, it was just |
@hferentschik I think you need to update https://github.com/phinze/landrush/blob/master/CHANGELOG.md in this PR to list the fix |
Sure. The change log is not updated, nor the version bumped. This would |
d2df147
to
83b9c63
Compare
@LalatenduMohanty I've added the json gem to the Gemfile and pushed an update. Can you try once more? |
You need json for Ruby packaged in Fedora, it's unbundled from Ruby itself.
|
Go figure. |
@hferentschik now |
nice |
+1
Sure. No problem. Just happy to get some feedback. I also found some other related issues which I will address in follow up pull requests. For example the way the Vagrant data dir is determined is wrong. One need to go via Vagrant
+1 Sounds like a good plan. |
ensure_path_exits(log_file) | ||
|
||
if OS.windows? | ||
pid = spawn('ruby', "#{__FILE__}", "#{port}", "#{working_dir}", :chdir => working_dir.to_path, [:out, :err] => [log_file, "w"], :new_pgroup => true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use the new Hash syntax here?
I included few styles issues that I would like to change. As for real Windows testing, I don't have the Windows machine for testing that I had. @pvalena can you please test this patch? |
@strzibny Hi, sorry i am really busy right now, but as soon as I get it done I will test it. |
@strzibny, thanks for the feedback. I am planning another update to this pull request for next week. I'll address your style comment and try to reduce the overall amount of robocup violations. |
83b9c63
to
3fef464
Compare
Here is another idea. The problem seems to be access for people to Windows machines. What's about marking Windows support as experimental? If we can agree that the code is not breaking anything for Linux or OS X, we could then go ahead and merge. We could even do a release and this way get feedback from people trying to use Landrush on Windows. |
@hferentschik moving to windows as experimental could work - I am traveling this week so my windows testing time is more limited :( |
@hferentschik like that idea very much. |
Ok, let's go for something like that then. I guess all that's needed are some notes in the docs |
@hferentschik do you have time to rebase and add the docs notes? I saw your comment about wanting to land this, this week. |
will do. I also will add a commit which allows to run the tests on Windows. Now you can develop Landrush on Windows as well :-) I also confirmed the setup once more on a "virgin" Windows 10 setup. Worked fine.
Most likely tomorrow. Once everything is merged we will need to talk about a release :-) |
3fef464
to
019444c
Compare
Ok, I pushed one more update adding a note to the docs that Windows support is experimental for now. I also changed the test suite and it runs now on Windows as well. So Landrush can now be run and developed on Windows. I would like to merge this now. Can I get one more maintainer ACK - @njam, @ahpook, @strzibny, @fh, @bexelbie, @phinze? |
- Replacing use of Rexec with plain Process#spawn calls - Downgrading rubydns gem to 0.8.5 to use EventMachine instead of Celluloid IO which won't run on Windows - Updating command.rb to no rely on Rexec - Using printf in favor of /usr/bin/pr in order to format output in command.rb - Adding os.rb to allow for OS check
… chages in latest version and applying simple style fixes
019444c
to
0806e7b
Compare
@hferentschik looks like there's merge conflicts, according to github - do you need to rebase? I'm 👍 once that's resolved, I read through the docs and all seems reasonable. |
I don't think so. I might have pushed one time too many to this branch. I'll can close this pull request and open a new one. That should sort things out.
Thanks. |
Actually I needed one more rebase. Nevertheless, here is the new pull request, passing also Travis CI - #170 |
This is a first stab at resolving #16 and getting Landrush to work on all OSes. The key changes are:
fork
and use Ruby'sProcess.spawn
to start the Landrush DNS server. No dependency torexec
anymorerubydns
gem to 0.8.5 which is based oneventmachine
which works across OSes opposed to Celluloid which won't work on Windows. See also https://github.com/ioquatix/rubydns/#migrating-from-rubydns-08x-to-09xApart from that the changes of this pull request are consequences of the two points mentioned above.
In
command.rb
I also removed the use of/usr/bin/pr
(which does not exist on Windows) withprintf
. Last but not least, I added some documentation for configuring DNS on Windows.I tested against Windows 10 and it works. I still need to test on Windows 7. There is no issue with running the Landrush DNS server, but rather a question of differences in the DNS configuration. On Windows 7 it might for example be necessary to configure the "DNS suffix list" for the adapter to which one adds the Landrush DNS server.
If we agree to merge this pull request, the next steps would be:
These things could be addressed in follow up issues.
Looking forward to get some feedback on this.