You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@buildr.apache.org by Antoine Toulme <an...@lunar-ocean.com> on 2009/12/11 22:23:03 UTC
Support for Windows 7 64 bit
Hi guys,
we have trouble here with one computer running Windows 7 64 bit.
Buildr installs fine on top of JRuby but it crashes with this message:
stat.st_dev unsupported on this platform
That sounded like a JRuby problem, so I asked the IRC channel there. I was
told this would not be working on 64 bit archs.
This problem arises when moving files, here, with that monkey patching:
# Fix for BUILDR-292.
# JRuby fails to rename a file on different devices
# this monkey-patch wont be needed when JRUBY-3381 gets resolved.
module FileUtils #:nodoc:
alias_method :__mv_native, :mv
def mv(from, to, options = nil)
dir_to = File.directory?(to) ? to : File.dirname(to)
Array(from).each do |from|
dir_from = File.dirname(from)
if File.stat(dir_from).dev != File.stat(dir_to).dev
cp from, to, options
rm from, options
else
__mv_native from, to, options
end
end
end
private :mv
end
I see http://jira.codehaus.org/browse/JRUBY-3381 is still opened. I don't
understand the last comment by Charles Oliver Nutter.
What would be the right approach now ? Ask for a 64 bit distrib of JRuby ?
Try to catch the error and work around it ?
I suggested the user tried Cygwin for now but I would feel better with
something less clunky.
Any help is much welcome.
Thanks,
Antoine
Re: Support for Windows 7 64 bit
Posted by Antoine Toulme <an...@lunar-ocean.com>.
I opened BUILDR-354 for this enhancement.
https://issues.apache.org/jira/browse/BUILDR-354
I will work on a patch as time permits. In particular, I'll work on a spec
with a stubbed stat.st_dev raising the exception to avoid having to bring up
a 64 bit machine just for the occasion.
Please add your thoughts and comments to the bug, any help is much welcome.
Thanks,
Antoine
On Fri, Dec 11, 2009 at 14:59, Alex Boisvert <al...@gmail.com>wrote:
> On Fri, Dec 11, 2009 at 2:28 PM, Antoine Toulme <an...@lunar-ocean.com>wrote:
>
>> Alex, could we do a try/catch around the stat.dev call ?
>
>
> Yes, we could.
>
>
>> I would have a hard time knowing whether the platform is supported or not.
>>
>> And then do a copy/delete instead of the move in that very case.
>>
>> Yes, I can work on a patch. But I don't have a 64 bit machine around to
>> test.
>>
>
> Me neither. But if the issue affects somebody, surely they can be coerced
> into helping us help them ;)
>
> alex
>
>
Re: Support for Windows 7 64 bit
Posted by Alex Boisvert <al...@gmail.com>.
On Fri, Dec 11, 2009 at 2:28 PM, Antoine Toulme <an...@lunar-ocean.com>wrote:
> Alex, could we do a try/catch around the stat.dev call ?
Yes, we could.
> I would have a hard time knowing whether the platform is supported or not.
>
> And then do a copy/delete instead of the move in that very case.
>
> Yes, I can work on a patch. But I don't have a 64 bit machine around to
> test.
>
Me neither. But if the issue affects somebody, surely they can be coerced
into helping us help them ;)
alex
Re: Support for Windows 7 64 bit
Posted by Antoine Toulme <an...@lunar-ocean.com>.
Alex, could we do a try/catch around the stat.dev call ?
I would have a hard time knowing whether the platform is supported or not.
And then do a copy/delete instead of the move in that very case.
Yes, I can work on a patch. But I don't have a 64 bit machine around to
test.
Thanks,
Antoine
On Fri, Dec 11, 2009 at 14:12, Alex Boisvert <al...@gmail.com>wrote:
> I would detect the platform, avoid using File.stat.dev and do a copy/delete
> instead of the move.
>
> If you want to work on a patch for this, I'll be happy to apply it.
>
> alex
>
>
>
> On Fri, Dec 11, 2009 at 1:23 PM, Antoine Toulme <an...@lunar-ocean.com>wrote:
>
>> Hi guys,
>>
>> we have trouble here with one computer running Windows 7 64 bit.
>>
>> Buildr installs fine on top of JRuby but it crashes with this message:
>> stat.st_dev unsupported on this platform
>>
>> That sounded like a JRuby problem, so I asked the IRC channel there. I was
>> told this would not be working on 64 bit archs.
>>
>> This problem arises when moving files, here, with that monkey patching:
>> # Fix for BUILDR-292.
>> # JRuby fails to rename a file on different devices
>> # this monkey-patch wont be needed when JRUBY-3381 gets resolved.
>> module FileUtils #:nodoc:
>> alias_method :__mv_native, :mv
>>
>> def mv(from, to, options = nil)
>> dir_to = File.directory?(to) ? to : File.dirname(to)
>> Array(from).each do |from|
>> dir_from = File.dirname(from)
>> if File.stat(dir_from).dev != File.stat(dir_to).dev
>> cp from, to, options
>> rm from, options
>> else
>> __mv_native from, to, options
>> end
>> end
>> end
>> private :mv
>> end
>>
>> I see http://jira.codehaus.org/browse/JRUBY-3381 is still opened. I don't
>> understand the last comment by Charles Oliver Nutter.
>>
>> What would be the right approach now ? Ask for a 64 bit distrib of JRuby ?
>> Try to catch the error and work around it ?
>>
>> I suggested the user tried Cygwin for now but I would feel better with
>> something less clunky.
>> Any help is much welcome.
>>
>> Thanks,
>>
>> Antoine
>>
>
>
Re: Support for Windows 7 64 bit
Posted by Alex Boisvert <al...@gmail.com>.
I would detect the platform, avoid using File.stat.dev and do a copy/delete
instead of the move.
If you want to work on a patch for this, I'll be happy to apply it.
alex
On Fri, Dec 11, 2009 at 1:23 PM, Antoine Toulme <an...@lunar-ocean.com>wrote:
> Hi guys,
>
> we have trouble here with one computer running Windows 7 64 bit.
>
> Buildr installs fine on top of JRuby but it crashes with this message:
> stat.st_dev unsupported on this platform
>
> That sounded like a JRuby problem, so I asked the IRC channel there. I was
> told this would not be working on 64 bit archs.
>
> This problem arises when moving files, here, with that monkey patching:
> # Fix for BUILDR-292.
> # JRuby fails to rename a file on different devices
> # this monkey-patch wont be needed when JRUBY-3381 gets resolved.
> module FileUtils #:nodoc:
> alias_method :__mv_native, :mv
>
> def mv(from, to, options = nil)
> dir_to = File.directory?(to) ? to : File.dirname(to)
> Array(from).each do |from|
> dir_from = File.dirname(from)
> if File.stat(dir_from).dev != File.stat(dir_to).dev
> cp from, to, options
> rm from, options
> else
> __mv_native from, to, options
> end
> end
> end
> private :mv
> end
>
> I see http://jira.codehaus.org/browse/JRUBY-3381 is still opened. I don't
> understand the last comment by Charles Oliver Nutter.
>
> What would be the right approach now ? Ask for a 64 bit distrib of JRuby ?
> Try to catch the error and work around it ?
>
> I suggested the user tried Cygwin for now but I would feel better with
> something less clunky.
> Any help is much welcome.
>
> Thanks,
>
> Antoine
>