On Tue, 4 Aug 2015, Thierry Goubier wrote:

Hi Levente,

thanks for looking at it :)

Le 03/08/2015 23:51, Levente Uzonyi a écrit :
On Mon, 3 Aug 2015, Thierry Goubier wrote:

Le 03/08/2015 21:56, David T. Lewis a écrit :
The OSProcess implementation for Windows is incomplete. I recommend
Levente's ProcessWrapper
(http://www.squeaksource.com/ProcessWrapper/) as
an alternative for Windows.

And GitFileTree (the main reason for trying to crash the external
process support on Pharo :) ) uses ProcessWrapper on Windows and
OSProcess elsewhere. All the reports about the unstability of
GitFileTree on Windows relate to the combination GitFileTree +
ProcessWrapper.

Now, if someone knowledgeable with ProcessWrapper wants to check the
code calling it, I'm all for it :)

The only code I could find is MCFileTreeGitRepository class's

This is the one, yes.

runProcessWrapperGitCommand: aCommandString in: aDirectory
     | r |
     (Smalltalk at: #ProcessWrapper ifAbsent: [ self error: 'Please load
ProcessWrapper' ])
         ifNotNil: [ :pW |
             r := pW new
                 useStdout;
                 startWithShellCommand:
                         self gitCommand , ' -C "' ,
(MCFileTreeFileUtils current directoryPathString: aDirectory) , '" ' ,
aCommandString;
                 upToEnd ].
     ^ r

What is the actual problem with the code?

Instability. Git commands fail, and, since GitFileTree uses a few of them, GitFileTree becomes unusable.

What does "fail" mean here?
Do you have a reproducible case?
Have you tried enabling logging to see what happens when the error occurs? (You can do it by evaluating [ProcessWrapper logLevelDebug]. This will create a log file named ProcessWrapper.log, and log the activities of the plugin there.)


Why is the command executed in a shell?

Because the OSProcess version was also executing in a shell (and so, by default, the git command had no path).

In the current version, the git command has a path and the OSProcess side doesn't use the shell, so it could be the same. Should it be changed for ProcessWrapper as well?

If git doesn't have to be run from a shell on windows, then it's probably better to not use a shell.

Levente


Thierry


Levente


Thierry


Dave


Thanks for the links. Unfortunately none of these really explain
what the
problem with OSProcess is. I see there were attempts to try using
ProcessWrapper instead of OSProcess on windows, but there's no feedback
on that thread, so there may be a solution out there, but no one is
using
it.

Levente

On Mon, 3 Aug 2015, Peter Uhnák wrote:

On Mon, Aug 3, 2015 at 7:14 PM, Levente Uzonyi <le...@elte.hu> wrote:
       On Mon, 3 Aug 2015, Peter Uhnák wrote:


             Â  Â  Â  but the git user experience under Windows has
to be
improved if we want to use efficiently the other
functionalities of github (pull requests, commit,
branches,…).


             Well some of the experience can be mitigated with
tools like
GitHub for Windows, but the main problem is that git with
Pharo is incredibly unstable on Windows and crashes
constantly.
             That's our experience
             with it so my colleague had to switch to pure filetree
out
of frustration.
             This however is NOT problem of git, it's problem of
OSProcess. But it does render it almost unusable for now.
(At least for us.)


       What's the problem with OSProcess on windows?


http://forum.world.st/Gitfiletree-unstable-on-Windows-td4816354.html
http://forum.world.st/gitfiletree-metadata-td4838970.html
http://forum.world.st/Git-gitfiletree-on-Pharo-vs-Windows-td4806791.html












Reply via email to