You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Paul Hodgetts <pa...@zzyzxtek.com> on 2000/08/05 03:28:30 UTC

DDCreator Tasks Seems Broken

After downloading last night's build (8/4 ~2 AM), it seems like
the DDCreator task has broken.

I'm running on WinNT 4.0.

When the argument list reaches DDCreatorHelper (at line 99 in the
constructor), the backslashes have been stripped from the
directories that specify the source and destination (the first two
arguments).  In DDCreator (line 115), before passing them to
DDCreatorHelper, they have the backslashes.

I think the culprit is somewhere in the ddCreatorTask.setArgs(args)
call.  Possibly down in CommandLine, in the nested class Argument,
in the setLine() method, where it calls translateCommandLine().
It looks like translateCommandLine() is stripping out the
backslashes, but honestly I'm lost at this point and can't tell
for sure what's up or why.  But I don't see any diffs in
translateCommandLine() between the previous build I was running
and the new build, so maybe something somewhere up the ladder is
calling it when it shouldn't or something.

Can anyone who knows the code better please take a look?  I'll be
happy to run any tests or help debug wherever I can, although I
won't be able to help much over the weekend, but I can Monday.

Thanks,
Paul


RE: DDCreator Tasks Seems Broken

Posted by Conor MacNeill <co...@m64.com>.
> Thank you, Conor, all is well again and my build completes.
>
> Just for my curiosity, I didn't see any diffs between the
> July 26 version of translateLine (which was the last one that
> worked for me), and the August 4 version that broke.  Was it
> that translateLine was now in the call chain where it wasn't
> before, or am I missing something?
>


No you have it right. Stefan has been progressively refactoring the use of
exec in most tasks.

Conor


RE: DDCreator Tasks Seems Broken

Posted by Paul Hodgetts <pa...@zzyzxtek.com>.
Conor MacNeill wrote:

 > translateLine is intended to break the command line into separate
 > components. It takes a pretty Unix centric view of the world allowing you to
 > quote arguments using ' and " and then use \ as an escape character for
 > those quote characters. I'll try to make it a little more Windows friendly.

Thank you, Conor, all is well again and my build completes.

Just for my curiosity, I didn't see any diffs between the
July 26 version of translateLine (which was the last one that
worked for me), and the August 4 version that broke.  Was it
that translateLine was now in the call chain where it wasn't
before, or am I missing something?

In any case, the August 7 build is fixed.  Thanks again.

Paul


Re: DDCreator Tasks Seems Broken

Posted by Stefan Bodewig <bo...@bost.de>.
>>>>> "CM" == Conor MacNeill <co...@m64.com> writes:

 CM> translateLine is intended to break the command line into separate
 CM> components. It takes a pretty Unix centric view of the world
 CM> allowing you to quote arguments using ' and " and then use \ as
 CM> an escape character for those quote characters. I'll try to make
 CM> it a little more Windows friendly.

Ouch! Mea culpa, mea maxima culpa.

It was intended to accept command lines like you would use them on Unix
or DOS and tokenize them into individual arguments. Of course I didn't
think about \ characters used for anything other than quoting ' or " -
an oversight you've corrected with your patch, thanks.

Stefan

RE: DDCreator Tasks Seems Broken

Posted by Conor MacNeill <co...@m64.com>.
Well that wasn't a very useful reply, was it? Sorry. I had seen the same
problem myself and in EjbJar added a quick hack for it (replace('\\', '/'))

translateLine is intended to break the command line into separate
components. It takes a pretty Unix centric view of the world allowing you to
quote arguments using ' and " and then use \ as an escape character for
those quote characters. I'll try to make it a little more Windows friendly.

Conor



> -----Original Message-----
> From: Conor MacNeill [mailto:conor@m64.com]
> Sent: Saturday, 5 August 2000 16:25
> To: ant-dev@jakarta.apache.org
> Subject: RE: DDCreator Tasks Seems Broken
>
>
> Paul,
>
> I think it something to do with the way \ characters are treated.
> I'll look
> into it.
>
> Conor
>
>
> > -----Original Message-----
> > From: Paul Hodgetts [mailto:paulh@zzyzxtek.com]
> > Sent: Saturday, 5 August 2000 11:29
> > To: ant-dev@jakarta.apache.org
> > Subject: DDCreator Tasks Seems Broken
> >
> >
> > After downloading last night's build (8/4 ~2 AM), it seems like
> > the DDCreator task has broken.
> >
> > I'm running on WinNT 4.0.
> >
> > When the argument list reaches DDCreatorHelper (at line 99 in the
> > constructor), the backslashes have been stripped from the
> > directories that specify the source and destination (the first two
> > arguments).  In DDCreator (line 115), before passing them to
> > DDCreatorHelper, they have the backslashes.
> >
> > I think the culprit is somewhere in the ddCreatorTask.setArgs(args)
> > call.  Possibly down in CommandLine, in the nested class Argument,
> > in the setLine() method, where it calls translateCommandLine().
> > It looks like translateCommandLine() is stripping out the
> > backslashes, but honestly I'm lost at this point and can't tell
> > for sure what's up or why.  But I don't see any diffs in
> > translateCommandLine() between the previous build I was running
> > and the new build, so maybe something somewhere up the ladder is
> > calling it when it shouldn't or something.
> >
> > Can anyone who knows the code better please take a look?  I'll be
> > happy to run any tests or help debug wherever I can, although I
> > won't be able to help much over the weekend, but I can Monday.
> >
> > Thanks,
> > Paul
> >
>


RE: DDCreator Tasks Seems Broken

Posted by Conor MacNeill <co...@m64.com>.
Paul,

I think it something to do with the way \ characters are treated. I'll look
into it.

Conor


> -----Original Message-----
> From: Paul Hodgetts [mailto:paulh@zzyzxtek.com]
> Sent: Saturday, 5 August 2000 11:29
> To: ant-dev@jakarta.apache.org
> Subject: DDCreator Tasks Seems Broken
>
>
> After downloading last night's build (8/4 ~2 AM), it seems like
> the DDCreator task has broken.
>
> I'm running on WinNT 4.0.
>
> When the argument list reaches DDCreatorHelper (at line 99 in the
> constructor), the backslashes have been stripped from the
> directories that specify the source and destination (the first two
> arguments).  In DDCreator (line 115), before passing them to
> DDCreatorHelper, they have the backslashes.
>
> I think the culprit is somewhere in the ddCreatorTask.setArgs(args)
> call.  Possibly down in CommandLine, in the nested class Argument,
> in the setLine() method, where it calls translateCommandLine().
> It looks like translateCommandLine() is stripping out the
> backslashes, but honestly I'm lost at this point and can't tell
> for sure what's up or why.  But I don't see any diffs in
> translateCommandLine() between the previous build I was running
> and the new build, so maybe something somewhere up the ladder is
> calling it when it shouldn't or something.
>
> Can anyone who knows the code better please take a look?  I'll be
> happy to run any tests or help debug wherever I can, although I
> won't be able to help much over the weekend, but I can Monday.
>
> Thanks,
> Paul
>