Paul -
Thanks very much for working on this! I did not see your email about your
fix until after I had done some check-ins late today.
The process runner code is supposed to look at the exit code of the process
only if the process started successfully. There was a finally block that
had some lines that were reading the process exit code. Those lines
belonged outside the block . This is because the process runner was changed
so that any command that does not start successfully will intentionally an
exception and so as to put the build into an Error state. Previously that
would not be the case so sometimes it was hard to debug problems with build.
Should be ok now, if you can try the current codebase that is on the CVS
trunk now that would be great! Once you sent the stack trace I was able to
add unit tests that recreated the problem then fix the code.
The VSS path issue - the change to VssRepository.GetSource was to allow VSS
Repository to watch multiple VSS folders. Eventually we will have any build
have n number of repositories that are being watched. In order to do that
and to build correctly the GetSource has to bring the separate watches into
a single file structure. For vss the thing to do is translate the $/a/b/c
sourcesafe path into a file system path a\b\c. That means that the .config
file for VSS builds has to change to accommodate the deeper path if the
.build file is in a subdirectory. Vss is different from other providers in
that you can specify multiple vss projects to watch by putting a | between
the paths in the config file "$/a|$/b". And you are quite right this needs
to be documented in the 1.6 documetation and changed to something better no
doubt.
As per your suggestion, Added precondition check to StartInfo that the
working directory must exist.
-----Original Message-----
From: draconet-developers-admin@...
[mailto:draconet-developers-admin@...] On Behalf Of Paul
Welter
Sent: Wednesday, July 28, 2004 14:37
To: draconet-developers@...
Subject: Re: [Draconet-developers] problems with nant in latest cvs version
1.6
Problem Solved.
The problem was not entirely in InterruptibleProcess. The exception was
deceiving because an overriding exception was being thrown in the finally
block of ProcessRunner.RunImplementation. The real exception that was
causing the problem was...
System.ComponentModel.Win32Exception: The directory name is invalid.
The real problem was in the change to VssRepository.GetSource. The problem
is that the previous version created a temp folder and checked out the
source to the root of that temp folder. The new version creates subfolders
for the source safe project path. So, when entering the NAnt build file, I
simple entered the relative path, i.e. 'source\master.build'. This worked
in previous version, but in the new version the path is incorrect.
old working example ...
vss project: $/Applications/Sample
nant build: source\master.build
new path...
nant build: Applications\Sample\source\master.build
I can understand this change but I didn't see any notice of it. Also, this
behavior differs from the other scc providers. Is this ok?
I've attached a patch that fixes the exception thrown in the finally block
(has to do with the exitcode) and it strengthens the Start method by
validating the working directory.
thanks
Paul
----- Original Message -----
From: "Paul Welter" <pwelter@...>
To: <draconet-developers@...>
Sent: Wednesday, July 28, 2004 11:32 AM
Subject: Re: [Draconet-developers] problems with nant in latest cvs version
1.6
> Well, the new tests you added were successfull in emulating the problem.
> Here are the failures...
>
> Failures:
> ---------
> Fail (1)
> Draco.Core.Tests.InterruptibleProcessTest.StartQuickEnoughWithTimeout
> Message:
> expected:<Succeeded>
> but was:<TimedOut>
> Stack Trace:
> at
> Draco.Core.Tests.InterruptibleProcessTest.StartQuickEnoughWithTimeout() in
> InterruptibleProcessTest.cs:line 163
>
> Fail (2)
> Draco.Core.Tests.ProcessRunnerTest.RunWithNoExitCodeCheckAndWithTimeou
> t
> Message: should have timed out
> expected:<-1>
> but was:<0>
> Stack Trace:
> at
> Draco.Core.Tests.ProcessRunnerTest.RunWithNoExitCodeCheckAndWithTimeou
> t()
> in
> ProcessRunnerTest.cs:line 85
>
> Exception Call Stack
> ---------------------------------
> System.InvalidOperationException: No process is associated with this
> object.
> at System.Diagnostics.Process.EnsureState(State state)
> at System.Diagnostics.Process.get_HasExited()
> at System.Diagnostics.Process.EnsureState(State state)
> at System.Diagnostics.Process.get_ExitCode()
> at Draco.Core.Util.InterruptibleProcess.get_ExitCode()
> InterruptibleProcess.cs:line 79
> at Draco.Core.Util.ProcessRunner.get_LastExitCode() in
> processrunner.cs:line 76
> at Draco.Core.Util.ProcessRunner.RunImplementation(StartInfo
> startInfo, String output, Boolean useTimeoutIgnoreExitCode) in
> processrunner.cs:line
> 114
> at
> Draco.Core.Util.ProcessRunner.RunWithTimeoutIgnoreExitCode(StartInfo
> startInfo) in processrunner.cs:line 128
> at Draco.Core.Tool.NAntBuildTool.Execute(String baseDirectory) in
> NAntBuildTool.cs:line 90
> at Draco.Core.Runtime.BuildRunner.BuildModule(BuildResult results,
> Modification[] mods) in BuildRunner.cs:line 463
> at Draco.Core.Runtime.BuildRunner.Start(BuildType buildType) in
> BuildRunner.cs:line 212
>
>
>
> This is a really strange problem. Everything looks correct but it
> fails.
>
> thanks
> Paul
> ----- Original Message -----
> From: Michael Ferrante
> To: draconet-developers@...
> Sent: Wednesday, July 28, 2004 7:05 AM
> Subject: RE: [Draconet-developers] problems with nant in latest cvs
> version 1.6
>
>
> Could not recreate the situation. Paul if can you provide any
> additional information like the complete exception with stack trace,
> values of all the config files for draco, and the member values for
> Interruptilble Proccess, that would be very helpful to resolving the
issue. Thanks!
>
>
>
>
>
> From: draconet-developers-admin@...
> [mailto:draconet-developers-admin@...] On Behalf Of
> Michael Ferrante
> Sent: Wednesday, July 28, 2004 03:44
> To: draconet-developers@...
> Subject: RE: [Draconet-developers] problems with nant in latest cvs
> version 1.6
>
>
> Paul thanks for the information. Will look into the situation and make
> corrections.
>
>
>
>
> From: draconet-developers-admin@...
> [mailto:draconet-developers-admin@...] On Behalf Of
> Paul Welter
> Sent: Monday, July 26, 2004 14:14
> To: draconet-developers@...
> Subject: Re: [Draconet-developers] problems with nant in latest cvs
> version 1.6
>
>
> Updated information on this bug...
>
> I rolled back to a version from 6\14\2004 and everything works corrrectly.
> Something in the changes that happend around 7\14\2004 broke the
> NAntBuildTool. The exception is being thrown on line 120 of
> InterruptibleProcess.cs. Which is the Start method. I've looked over
> the StartInfo and everything looks correct. The path to nant is correct.
> I've even cut and pasted the command text into a command prompt window
> and it executes correctly. I've tried running on 4 different
> computers and get the same exception. What's interesting is that
> other processes run correctly through the same method. I'm only having
the issue with nant.
> Anyone have any ideas as to the cause?
>
> thanks
> Paul
>
> ----- Original Message -----
> From: Paul Welter
> To: draconet-developers@...
> Sent: Sunday, July 25, 2004 7:04 PM
> Subject: [Draconet-developers] problems with nant in latest cvs
> version
> 1.6
>
>
> I'm having problems with version 1.6 from cvs. The problem I'm having
> is that nant refuses to run inside draco. I'm getting the following
> exception .
>
> System.InvalidOperationException: No process is associated with this
> object.
>
> I've tried everything. I've even stepped through the code. I've give
> an explicit path to nant.exe and it still gives this exception. What
> can I do to solve this issue?
>
> Thanks
> Paul
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java
> Enterprise J2EE developer tools!
> Get your free copy of BEA WebLogic Workshop 8.1 today.
> http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
> _______________________________________________
> Draconet-developers mailing list
> Draconet-developers@...
> https://lists.sourceforge.net/lists/listinfo/draconet-developers
>
|