Skip Menu |

This queue is for tickets about the Git-Repository CPAN distribution.

Report information
The Basics
Id: 78406
Status: resolved
Priority: 0/
Queue: Git-Repository

People
Owner: Nobody in particular
Requestors: BBYRD [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: 1.303



Subject: Use IPC::Cmd instead of System::Command
Because of its dependencies on System::Command, I cannot install this on Windows. I've looked at the forks and stuff with System::Command, researched some of the issues, etc., and I think the best option seems to be to start using IPC::Cmd to run the commands. BinGOs seems to have solved the issues involved with open3, etc. Plus, IPC::Cmd has been a core module since 5.9.5.
On Mon Jul 16 13:43:25 2012, BBYRD wrote: Show quoted text
> Because of its dependencies on System::Command, I cannot install this
on Show quoted text
> Windows. I've looked at the forks and stuff with System::Command, > researched some of the issues, etc., and I think the best option seems > to be to start using IPC::Cmd to run the commands. BinGOs seems to
have Show quoted text
> solved the issues involved with open3, etc. > > Plus, IPC::Cmd has been a core module since 5.9.5.
Git::Repository makes use of the one feature that System::Command has and that I haven't found in other similar modules (but maybe I didn't look hard enough: it provides filehandles, that one can read from line by line. This allows to nicely deal with git commands with potentially huge output. I know Git::Repository doesn't work under Win32, and that annoys me a lot. I've tried to make System::Command work under Win32 (using IPC::Run), but didn't have much success with that. Also, the one time I got something working under Win32, everything was real slow (because of timeouts, I think). In conclusion, I'd rather fix System::Command to make it work under Win32 (and that definitely means using something else than IPC::Open3 under Win32), than switch to another command runner. Thanks for your input. -- BooK
On Tue Jul 17 07:06:03 2012, BOOK wrote: Show quoted text
> > In conclusion, I'd rather fix System::Command to make it work > under Win32 (and that definitely means using something else than > IPC::Open3 under Win32), than switch to another command runner. >
Note that I also do not have a Win32 system to test with, which makes the whole issue more complicated. -- BooK
Subject: Re: [rt.cpan.org #78406] Use IPC::Cmd instead of System::Command
Date: Tue, 17 Jul 2012 12:26:24 -0400
To: bug-Git-Repository [...] rt.cpan.org
From: Brendan Byrd <Perl [...] ResonatorSoft.org>
On Tue, Jul 17, 2012 at 7:06 AM, Philippe 'BooK' Bruhat via RT <bug-Git-Repository@rt.cpan.org> wrote: Show quoted text
> > Git::Repository makes use of the one feature that System::Command has > and that I haven't found in other similar modules (but maybe I didn't > look hard enough: it provides filehandles, that one can read from line > by line. This allows to nicely deal with git commands with potentially > huge output. > > I know Git::Repository doesn't work under Win32, and that annoys me > a lot. I've tried to make System::Command work under Win32 (using > IPC::Run), but didn't have much success with that. Also, the one > time I got something working under Win32, everything was real slow > (because of timeouts, I think). > > In conclusion, I'd rather fix System::Command to make it work > under Win32 (and that definitely means using something else than > IPC::Open3 under Win32), than switch to another command runner.
Then you may want to take a look at the open3 code from it: https://metacpan.org/source/BINGOS/IPC-Cmd-0.78/lib/IPC/Cmd.pm#L1205 I think he's creating a few "UNIX" sockets to use, instead of the filehandles directly. That's the main problem with open3: it uses select() and select() on Win32 is different and uses winsock. That means that select() doesn't work on filehandles at all. Hence, a standard open3 command will hang on the ->getlines call. -- Brendan Byrd <Perl@ResonatorSoft.org> Brendan Byrd <BBYRD@CPAN.org>
On Tue Jul 17 12:26:36 2012, Perl@ResonatorSoft.org wrote: Show quoted text
> > > > > > In conclusion, I'd rather fix System::Command to make it work > > under Win32 (and that definitely means using something else than > > IPC::Open3 under Win32), than switch to another command runner.
>
System-Command works on Win32 as of version 1.100, using IPC::Run. Git-Repository version 1.303 lists System-Command 1.100 as a prerequisite, so it should now work properly on Win32.