You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Craeg K Strong <cs...@arielpartners.com> on 2002/11/15 19:53:12 UTC

Re: Need help with backwards incompatible resolver change

Yikes!  I checked out the new xml-commons resolver code and it looks like
two things tripped me up:

(1) Change in debug messages

old way:   Debug.message(1, "a debug message");

new way:   catalogManager.debug.message(1,"a debug message")

(2) CatalogManager no longer available as a static instance
of CatalogManager, now its spelled with a small "c" :-p

old way:  CatalogManager.ignoreMissingProperties(true);

new way:  catalogManager.ignoreMissingProperties(true);

With these two simple changes, the code will work with the
new resolver.

However, it still doesn't answer the backward compatibility question.
I guess we have to ask ourselves:

(1) how pervasive is the 1.0 resolver jar?  Since Ant 1.6 is
not yet released, perhaps we can simply make it work with resolver
1.1 and mention in the Ant release notes that it requires a 1.1+
resolver.jar ?

(2) If #1 is not acceptable, then can we create a solution that will
work with both, as Stefan asks below?

The coding is simple either way.  It is really a policy decision,
which I happily leave up to the "powers that be" :-)

--Craeg

Stefan Bodewig wrote:
> Hi,
> 
> Craeg Strong's patch that added resolver support to Ant worked for
> almost a week, but now it doesn't anymore 8-(
> 
> Ant builds happily against the 1.0 release of resolver.jar, but with
> the current CVS code, this here happens:
> <http://cvs.apache.org/builds/gump/2002-11-14/dist-ant.html>
> 
> What is the preferred way to deal with this?  In particular I'd like a
> solution that will work with both the 1.0 release and the current CVS
> code 8-)
> 
> Any help appreciated
> 
>         Stefan



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


Re: Need help with backwards incompatible resolver change

Posted by Stefan Bodewig <bo...@apache.org>.
On Sat, 16 Nov 2002, Steve Loughran <st...@iseran.com> wrote:

> I'm happy enough with requiring 1.1+, because resolver support hasnt
> ever shipped in ant;

If and only if resolver 1.1 gets released before Ant 1.6.

Stefan

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


Re: Need help with backwards incompatible resolver change

Posted by Craeg K Strong <cs...@arielpartners.com>.
Hello:

I think that is a reasonable way to go, as well.  Norm Walsh's
reply to my message indicated that he wanted to make
sure the new resolver got a fair degree of testing before
"shipping" with a ubiquitous product like Ant.

I agree with his conservatism, however, I don't think that
is a problem for Ant.  As I recall (thanks, Magesh! :)  release
1.5 went through several release iterations and was quite
thoroughly tested before it finally went out the door.

I expect that even if 1.6 alpha was released soon,
there would be plenty of time to shake out any bugs
that might be lingering.

So... that is my long-winded way of saying

+1

To the idea of going with resolver 1.1 (NOT 1.0)

What say we put it up to a vote, ant-devs?
If its a go, I will submit the (trivial) patch
that makes <xmlcatalog> compatible with resolver 1.1
(and therefore incompatible with 1.0).

--Craeg

Steve Loughran wrote:
> ----- Original Message -----
> From: "Craeg K Strong" <cs...@arielpartners.com>
> 
>>(1) how pervasive is the 1.0 resolver jar?  Since Ant 1.6 is
>>not yet released, perhaps we can simply make it work with resolver
>>1.1 and mention in the Ant release notes that it requires a 1.1+
>>resolver.jar ?
> 
> I'm happy enough with requiring 1.1+, because resolver support hasnt ever
> shipped in ant; this is the time when we can change things at the risk of
> inconveniencing early adopters. Who by definition will be able to download
> the latest version of resolver



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


Re: Need help with backwards incompatible resolver change

Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: "Craeg K Strong" <cs...@arielpartners.com>

>
> (1) how pervasive is the 1.0 resolver jar?  Since Ant 1.6 is
> not yet released, perhaps we can simply make it work with resolver
> 1.1 and mention in the Ant release notes that it requires a 1.1+
> resolver.jar ?


I'm happy enough with requiring 1.1+, because resolver support hasnt ever
shipped in ant; this is the time when we can change things at the risk of
inconveniencing early adopters. Who by definition will be able to download
the latest version of resolver


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


Re: Need help with backwards incompatible resolver change

Posted by Stefan Bodewig <bo...@apache.org>.
On 18 Nov 2002, Stefan Bodewig <bo...@apache.org> wrote:

> Ant could switch to the 1.1 resolver code

Done.

<http://archives.apache.org/eyebrowse/ReadMsg?listName=ant-dev@jakarta.apache.org&msgNo=39511>

Stefan

Re: Need help with backwards incompatible resolver change

Posted by Stefan Bodewig <bo...@apache.org>.
On 18 Nov 2002, Stefan Bodewig <bo...@apache.org> wrote:

> I'll see whether I can put together a patch to resolver today - if I
> can't I'll tell you why 8-)

Well, I certainly cannot re-introduce a static
setIgnoreMissingProperties method to CatalogManager as there now
already is a non-static method by that name.  I don't see an easy
solution for this apart from renaming the instance methods.

The same is true for the Debug case.

Ant could switch to the 1.1 resolver code as the Ant release that uses
resolver is still a couple of months away - after a release of
resolver 1.1, I guess.

But you better start thinking about a proper deprecation policy 8-)

Stefan

Re: Need help with backwards incompatible resolver change

Posted by Stefan Bodewig <bo...@apache.org>.
On 18 Nov 2002, Stefan Bodewig <bo...@apache.org> wrote:

> I'll see whether I can put together a patch to resolver today - if I
> can't I'll tell you why 8-)

Well, I certainly cannot re-introduce a static
setIgnoreMissingProperties method to CatalogManager as there now
already is a non-static method by that name.  I don't see an easy
solution for this apart from renaming the instance methods.

The same is true for the Debug case.

Ant could switch to the 1.1 resolver code as the Ant release that uses
resolver is still a couple of months away - after a release of
resolver 1.1, I guess.

But you better start thinking about a proper deprecation policy 8-)

Stefan

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


Re: Need help with backwards incompatible resolver change

Posted by Stefan Bodewig <bo...@apache.org>.
On Fri, 15 Nov 2002, Craeg K. Strong <cs...@arielpartners.com>
wrote:

> With these two simple changes, the code will work with the
> new resolver.

But not with the old one, right?

I think the cleaner solution was to re-add static methods to
CatalogManager and Debug, make them deprecated and let them delegate
to the default CatalogManager instance (without looking at the code
too close, that is).

That way Ant could get compiled against the deprecated API and switch
as soon as resolver 1.1 has been released.

I'll see whether I can put together a patch to resolver today - if I
can't I'll tell you why 8-)

Stefan

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


Re: Need help with backwards incompatible resolver change

Posted by Stefan Bodewig <bo...@apache.org>.
On Fri, 15 Nov 2002, Craeg K. Strong <cs...@arielpartners.com>
wrote:

> With these two simple changes, the code will work with the
> new resolver.

But not with the old one, right?

I think the cleaner solution was to re-add static methods to
CatalogManager and Debug, make them deprecated and let them delegate
to the default CatalogManager instance (without looking at the code
too close, that is).

That way Ant could get compiled against the deprecated API and switch
as soon as resolver 1.1 has been released.

I'll see whether I can put together a patch to resolver today - if I
can't I'll tell you why 8-)

Stefan

Re: Need help with backwards incompatible resolver change

Posted by Norman Walsh <nd...@nwalsh.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

/ Craeg K Strong <cs...@arielpartners.com> was heard to say:
| Yikes!  I checked out the new xml-commons resolver code and it looks like
| two things tripped me up:

Sigh. I did try to keep things backwards compatible, but I guess I
failed just a bit.

|
| (1) Change in debug messages
|
| old way:   Debug.message(1, "a debug message");
|
| new way:   catalogManager.debug.message(1,"a debug message")

Right. Debug is no longer static, but each manager has a debug field.

| (2) CatalogManager no longer available as a static instance
| of CatalogManager, now its spelled with a small "c" :-p
| old way:  CatalogManager.ignoreMissingProperties(true);
|
| new way:  catalogManager.ignoreMissingProperties(true);

Right. Each catalog now carries a pointer to its manager around with
it.

The former change is mostly a consequence of the latter which was what
I was really trying to fix (i.e. allowing multiple independent managers).

| However, it still doesn't answer the backward compatibility question.
| I guess we have to ask ourselves:

I guess my goal was operational backwards compatibility (which was achievable)
not backwards compatibility with code that extended the resolver classes
(which I don't think is achievable).

| (1) how pervasive is the 1.0 resolver jar?  Since Ant 1.6 is
| not yet released, perhaps we can simply make it work with resolver
| 1.1 and mention in the Ant release notes that it requires a 1.1+
| resolver.jar ?

That'd be nice. Or maybe 1.6 should ship with the 1.0 jar if Ant 1.6
is about to go out the door. I'd like to see evidence that the new
code has been shaken down a little bit before it goes into a product :-)

| Stefan Bodewig wrote:
|> Craeg Strong's patch that added resolver support to Ant worked for
|> almost a week, but now it doesn't anymore 8-(
|> Ant builds happily against the 1.0 release of resolver.jar, but with
|> the current CVS code, this here happens:
|> <http://cvs.apache.org/builds/gump/2002-11-14/dist-ant.html>
|> What is the preferred way to deal with this?  In particular I'd like
|> a
|> solution that will work with both the 1.0 release and the current CVS
|> code 8-)

Short of more radical surgery (to keep some of the old static classes
around and add new ones for the non-static stuff), I can't think of
any solution that will work with both.

                                        Be seeing you,
                                          norm

- -- 
Norman.Walsh@Sun.COM    | As charms are nonsense, nonsense is a
XML Standards Architect | charm.--Benjamin Franklin
Web Tech. and Standards |
Sun Microsystems, Inc.  | 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.7 <http://mailcrypt.sourceforge.net/>

iD8DBQE91WSPOyltUcwYWjsRAqshAKCkIRr7696kB6c4dpd0gT1jh3i/mwCfWkzZ
LXLBa09fJ2W/L64c4XZjh0s=
=XH3n
-----END PGP SIGNATURE-----