Closed meredrica closed 11 years ago
sys-proctable
dependencies has been added by @jarmo 2 weeks ago to add Windows compatibility, so I'm not sure that removing it will work for the Windows crew....
Maybe we should add a notice in the README to tell to add sys-proctable
to Gemfile for windows users...
@meredrica could you also add jruby in .travis.yml
Thanks!
couldn't we include the sys-proctable as a platform dependent gem?
Having platform dependent gem is really a pain in the a**... I really want to avoid that as much as possible.
well the sys-proctable one is platform dependent since it does not support jruby. however, i now finally saw the code parts that have been using sys-proctable and think that this matter is actually quite complicated. I don't really know the exact inner workings of the gem but could we not use the PID from ChildProcess instead of getting all spork instances via commandline? another way would be to fork the whole guard-spork and create a guard-spork-jruby, but i'd rather not do that since fragmentation is a pain
Getting all spork instances via commandline is needed to remove all Spork instance at start (even them not launched by guard-spork with the aggressive_kill options).
But the easier way would be to check if all dependencies are installed & listed on the Gemfile and warned if not, so we can safely remove sys-proctable
from gemspec. We are already doing that in Listen: https://github.com/guard/listen/blob/master/lib/listen/dependency_manager.rb
do you want me to implement that or will you do it yourself?
It would be great if you could implement it, thanks!
+1 for this pull request!
it looks like the needed process info could be obtained in windows by shelling out to the wmic command, eliminating the need for a sys-proctable dependency.
See http://unserializableone.blogspot.com/2011/10/ruby-script-to-list-process-info-in.html
@edrex-janrain interesting thanks! @jarmo could you try to replace sys-proctable by that? It would be awesome!
Done with #94. Not proud of the outcome, but it seems to work.
Please can you try master branch with the patch #94 Thanks!
@meredrica @afazio is it ok for you?
did not get around to try it yet but i will do asap (this week). if it works i'll rebase my feature branch and you can merge it in
@meredrica perfect thanks!
@meredrica @thibaudgg I'm also interested in this being resolved, thanks.
Also want to mention the following method for getting windows process list:
def get_process_info()
procs = WIN32OLE.connect("winmgmts:\\\\.")
procs.InstancesOf("win32_process").each do |p|
puts p.name.to_s.downcase
end
end
Can get much more than process names. Check out the WMI documentation here for a list of fields accessible: http://msdn.microsoft.com/en-us/library/windows/desktop/aa394372(v=vs.85).aspx
@afazio neat, that's much better than shelling out and parsing. I see that the WIN32OLE interface is available in JRuby 1.6+ as well.
@afazio cool! If anyone is willing to implement it, then this is the method to change: https://github.com/guard/guard-spork/blob/master/lib/guard/spork/spork_windows_instance.rb#L49-L55
I did it myself with #97.
there you go. i also fixed the whitespace changes
@meredrica nice, I let others give it a try and I'll merge it soon. Thanks!
@afazio @edrex-janrain @mindscratch @jarmo have you been able to give it a try before I merge & release it?
@thibaudgg Unfortunately I don't have a Windows environment suitable for dev or testing.
@afazio thanks, sadly me neither.
I don't either, sorry. My interest was just to get guard-spork running on JRuby.
Works with 1.9.3 MRI on Windows. I'm not using JRuby.
Ok 1.3.0 released, thanks to all!
@jarmo @meredrica Thanks for your work on this!
you're welcome
this is working for me using JRuby 1.6.7 (which doesn't support 'fork') on linux, thanks
pull request for #85