You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Dominique Devienne <DD...@lgc.com> on 2002/07/03 15:58:07 UTC

RE: [PATCH] Buid file parse error msgs wrong when including XML s nippets

You might want to look at
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10276 which adds the
<import> top-level element with special handling in ProjectHelperImpl.java.
Your patch may (or not) need to address what the patch there does for proper
error reporting too. Thanks, --DD

-----Original Message-----
From: Jason Brittain [mailto:jasonb@collab.net] 
Sent: Tuesday, July 02, 2002 8:14 PM
To: ant-dev@jakarta.apache.org
Subject: [PATCH] Buid file parse error msgs wrong when including XML
snippets


Hi there.

Currently, whenever you include an XML snippet in a project file like
the FAQ shows here:

http://jakarta.apache.org/ant/faq.html#xml-entity-include

It works fine, but if there's a parser error in the file I'm including,
Ant incorrectly tells me that the error is in the file I included it in
(instead of in the included file).  I believe this is a bug.

The attached patch of ProjectHelperImpl.java (CVS head's version) seems
to fix this problem for parse errors.  I've also attached a patch for
Ant 1.4.

Can/should this be fixed by Ant 1.5 (final)?

There are also other spots where this same bug probably occurs after
Project parse time, which I'm going to investigate next..

Cheers.

-- 
Jason Brittain
<jasonb (~at~) collab (~dot~) net>
CollabNet http://www.collab.net

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [PATCH] Buid file parse error msgs wrong when including XML s nippets

Posted by Diane Holt <ho...@yahoo.com>.
--- Steve Loughran <st...@iseran.com> wrote:
> --- Jason Brittain <ja...@collab.net> wrote:
> > It's a very small change (a single line of code)
> 
> you should know that is one of the danger signs of a gug ' "It was
> such a little change I didnt think it would have any effect".

There's a great old film called "Mr. Blandings Builds His Dream House"
that illustrates this point beautifully, in a scene near the end, when the
house is nearly completed, which involves "just four little pieces of
flagstone", a bill for $1,247 (1948 dollars), and the architect's guess
about what all had to be done (ripping out floorboards, walls, joists,
pipes, electical wiring, getting the plumber, electrician, plasterer back
to redo stuff, etc.) in order to get those "four little pieces of
flagstone" put in as the floor around the sink in the "flower room". I'm
always reminded of it whenever someone (including myself) asks to get
"just this one little change in", right before a release is about to go
out :)

(BTW: If you've never seen the film -- it's highly recommended. Very
funny. My other favorite scene is the one where Mrs. Blandings goes into
great detail about the colors she wants the rooms painted -- wonderful.)

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [PATCH] Buid file parse error msgs wrong when including XML s nippets

Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: "Jason Brittain" <ja...@collab.net>
To: "Ant Developers List" <an...@jakarta.apache.org>
Sent: Wednesday, July 03, 2002 09:21
Subject: Re: [PATCH] Buid file parse error msgs wrong when including XML s
nippets


>
> Yes, I saw that wonderful modification to support <import>, which is
> exactly what we needed, but since it's not going to be in Ant 1.5
> we're (so far) going to just use included XML snippets.  I'm looking
> forward to seeing and trying Antipede!  :)
>
> But, for the time being, and for Ant 1.5, I'd just like Ant to
> correctly report which file needs fixing when something went wrong.

I agree, it would be nice, but Magesh is in charge of what goes in or out.
So while I am +1 of this in ant 1.6, I am neutral to this going in to
ant1.5, there being so little time to test it.

> It's a very small change (a single line of code)

you should know that is one of the danger signs of a gug ' "It was such a
little change I didnt think it would have any effect".

Test cases to go with the change are mandatory here. New ones to show that
the reporting works, and validation that the inclusion still works.



>
> --
> Jason Brittain
> <jasonb (~at~) collab (~dot~) net>
> CollabNet http://www.collab.net
>
> Dominique Devienne wrote:
> > You might want to look at
> > http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10276 which adds the
> > <import> top-level element with special handling in
ProjectHelperImpl.java.
> > Your patch may (or not) need to address what the patch there does for
proper
> > error reporting too. Thanks, --DD
> >
> > -----Original Message-----
> > From: Jason Brittain [mailto:jasonb@collab.net]
> > Sent: Tuesday, July 02, 2002 8:14 PM
> > To: ant-dev@jakarta.apache.org
> > Subject: [PATCH] Buid file parse error msgs wrong when including XML
> > snippets
> >
> >
> > Hi there.
> >
> > Currently, whenever you include an XML snippet in a project file like
> > the FAQ shows here:
> >
> > http://jakarta.apache.org/ant/faq.html#xml-entity-include
> >
> > It works fine, but if there's a parser error in the file I'm including,
> > Ant incorrectly tells me that the error is in the file I included it in
> > (instead of in the included file).  I believe this is a bug.
> >
> > The attached patch of ProjectHelperImpl.java (CVS head's version) seems
> > to fix this problem for parse errors.  I've also attached a patch for
> > Ant 1.4.
> >
> > Can/should this be fixed by Ant 1.5 (final)?
> >
> > There are also other spots where this same bug probably occurs after
> > Project parse time, which I'm going to investigate next..
> >
> > Cheers.
> >
>
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [PATCH] Buid file parse error msgs wrong when including XML s nippets

Posted by Jason Brittain <ja...@collab.net>.
Yes, I saw that wonderful modification to support <import>, which is
exactly what we needed, but since it's not going to be in Ant 1.5
we're (so far) going to just use included XML snippets.  I'm looking
forward to seeing and trying Antipede!  :)

But, for the time being, and for Ant 1.5, I'd just like Ant to
correctly report which file needs fixing when something went wrong.
It's a very small change (a single line of code), with a big benefit.

-- 
Jason Brittain
<jasonb (~at~) collab (~dot~) net>
CollabNet http://www.collab.net

Dominique Devienne wrote:
> You might want to look at
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10276 which adds the
> <import> top-level element with special handling in ProjectHelperImpl.java.
> Your patch may (or not) need to address what the patch there does for proper
> error reporting too. Thanks, --DD
> 
> -----Original Message-----
> From: Jason Brittain [mailto:jasonb@collab.net] 
> Sent: Tuesday, July 02, 2002 8:14 PM
> To: ant-dev@jakarta.apache.org
> Subject: [PATCH] Buid file parse error msgs wrong when including XML
> snippets
> 
> 
> Hi there.
> 
> Currently, whenever you include an XML snippet in a project file like
> the FAQ shows here:
> 
> http://jakarta.apache.org/ant/faq.html#xml-entity-include
> 
> It works fine, but if there's a parser error in the file I'm including,
> Ant incorrectly tells me that the error is in the file I included it in
> (instead of in the included file).  I believe this is a bug.
> 
> The attached patch of ProjectHelperImpl.java (CVS head's version) seems
> to fix this problem for parse errors.  I've also attached a patch for
> Ant 1.4.
> 
> Can/should this be fixed by Ant 1.5 (final)?
> 
> There are also other spots where this same bug probably occurs after
> Project parse time, which I'm going to investigate next..
> 
> Cheers.
> 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>