[MonoDevelop] F# addin
Vasili I. Galchin
vigalchin at gmail.com
Mon Mar 22 20:41:39 EDT 2010
Lluis,
I think I understand your instructions. In any case, here is what I did:
1) I started MonoDevelop 2.2.2 via "make run"
2) I selected F# console project ..... "Console1"
3) A rudimentary F# console project script was created
4) I did a "Build All" whereupon monodevelop was hung.
5) Based on LoggingService:LogInfos I added to
FSharpBindingCompilerManager.cs in particular "DoCompilation" method:
pinfo.UseShellExecute = false;
pinfo.RedirectStandardOutput = true;
pinfo.RedirectStandardError = true;
LoggingService.LogInfo("KICK OFF FSC!!"); // WNH
MonoDevelop.Core.Execution.ProcessWrapper pw =
Runtime.ProcessService.StartProcess (pinfo, outwr, errwr, null);
LoggingService.LogInfo("Kicked off!"); // WNH <<<<<< get this LogInfo!!!!
pw.WaitForOutput();
LoggingService.LogInfo("after wait!"); // WNH <<<<<< never get
this LogInfo!!
int exitCode = pw.ExitCode;
outwr.Close();
errwr.Close();
pw.Dispose ();
return exitCode;
I can pretty conclusively infer that the "fsc" never sends "process
exit" event. Hence we are waiting indefinitively on the
pw.WaitForOutput()!!!
I did "pid" checking at this point:
vasili at Komputer:/usr/bin$ ps -aef | grep fsc
vasili 2684 1683 0 19:25 pts/2 00:00:00 grep --color=auto fsc
<<<< NO FSC PROCESS
vasili at Komputer:/usr/bin$ fsc <<< RUN FSC WHILE MONODEVELOP IS
HUNG!!! MonoDevelop UNHANGS when fsc is run from kubuntu shell
instance!!
Microsoft (R) F# 2.0 Compiler build 1.9.9.9
Copyright (c) Microsoft Corporation. All Rights Reserved.
error FS0207: No inputs specified
vasili at Komputer:/usr/bin$ ps -aef | grep fsc
vasili 2690 1683 0 19:26 pts/2 00:00:00 grep --color=auto fsc
vasili@
So Lluis this seems 1) no fsc process hanging around when monodevelop
is hung 2) only running a fsc instance from shell instance unhangs
MonoDevelop instance. Any ideas??
I think you will agree I have spent time reading MonoDevelop code
including "core" code to get where I am now.
Vasili
On 3/22/10, Lluis Sanchez Gual <slluis.devel at gmail.com> wrote:
> If the fsc process is hung, there is a way of seeing where is it hung.
> Start MD from a terminal and make it compile a project. Once the fsc
> process is running, find out what's its process id, and in a terminal
> run: 'kill -QUIT id'. This will print the stack traces of the process.
> Notice that the traces will be printed in the MD terminal, not in the
> terminal where you ran 'kill'.
>
> El dg 21 de 03 de 2010 a les 01:42 -0500, en/na Vasili I. Galchin va
> escriure:
>> Hi Nikhil,
>>
>> If you want to help me at this point, you can am make suggestions
>> on why I am not getting a process exit event from fsc
>>
>> ...MonoDevelop.Core.Execution:ProcessWrapper.cs =>
>>
>> public void WaitForOutput (int milliseconds)
>> {
>> CheckDisposed ();
>> WaitForExit (milliseconds); <<<< why am I
>> potentially not getting this event??
>> WaitHandle.WaitAll (new WaitHandle[]
>> {endEventOut}); << OR maybe this??
>> }
>>
>> public void WaitForOutput () <<<<<
>> {
>> WaitForOutput (-1); <<<<< no timeout!!!!!
>> }
>>
>>
>> The above method (the lower overloaded method) is called from
>> FSharpBindingCompilerManager.cs (my version of the CSharp .cs!):
>>
>> LoggingService.LogInfo("KICK OFF FSC!!"); // WNH
>>
>> MonoDevelop.Core.Execution.ProcessWrapper pw =
>> Runtime.ProcessService.StartProcess (pinfo, outwr, errwr, null);
>> LoggingService.LogInfo("Kicked off!"); // WNH
>> pw.WaitForOutput();
>> LoggingService.LogInfo("after wait!"); // WNH <<<< I never receive
>> this
>>
>>
>> I am currently using:
>>
>> MonoDevelop 2.2.2
>>
>> Mono 2.4.3.2
>>
>> fsc: 2.0 build 1.9.9.9
>>
>>
>> Vasili
>>
>>
>>
>> On 3/19/10, nikhil sarda <diff.operator at gmail.com> wrote:
>> > Hi,
>> > I would be really interested in collaborating with you on the F# addin.
>> > Could you pass on the code to me so I can take a look?
>> > Thanks a lot
>> > Nikhil Sarda
>> >
>> _______________________________________________
>> Monodevelop-list mailing list
>> Monodevelop-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/monodevelop-list
>
>
>
More information about the Monodevelop-list
mailing list