Re: [Clirr-devel] MethodSetCheck: changing argument count
Status: Alpha
Brought to you by:
lkuehne
From: Simon K. <si...@ec...> - 2004-07-05 09:06:01
|
On Mon, 2004-07-05 at 18:39, Simon Kitching wrote: > On Mon, 2004-07-05 at 18:04, Lars K=FChne wrote: > > >And what do we report if the old version of Foo was overriding an > > >inherited method, and the new version is not? > > > > >=20 > > I agree the algorithm it's not perfect. Not sure if this is reason=20 > > enough to remove it completely, maybe it's not that difficult to impr= ove it? >=20 > I see this as requiring AI to do properly. Does the user "perceive" > these methods as being the same method or not? >=20 > > I'd suggest leaving it in there, release 0.4 and wait for user feedba= ck. >=20 > How do we handle the case where the old version of Foo was overriding a= n > inherited method, and the new version is not? >=20 > Below, (1) is the case where the original method was not overriding an > inherited implementation, and (2) where it was. >=20 > Right now, we have this: > (1) > ERROR: Changed X(a) to X(b,c) > (2) > ERROR: Changed X(a) to X(b,c) > when (2) really isn't an error, because an inherited implementation is > available. >=20 > By removing the "argcount changed" code, we would have this > automatically: > (1) > ERROR: Removed method X(a) > INFO: Added method X(b,c) > (2) > INFO: Removed method X(a), method now in superclass/interface > INFO: Added method X(b,c) >=20 > With the "argcount changed" code, we *could* implement this: > (1) > ERROR: Changed X(a) to X(b,c) > (2) [suggested] > INFO: Changed X(a) to X(b,c). This method no=20 > longer overrides inherited method X(a). >=20 >=20 > I guess I could live with the last option above. But I still think the > simplest option (no "guessing") is better.. I was browsing through the clirr bugtracker, and found this issue from Stephen Colebourne which is about just this problem: http://sourceforge.net/tracker/index.php?func=3Ddetail&aid=3D967288&group= _id=3D89627&atid=3D590802 In this case, he definitely wanted to see "added + removed" rather than "changed".=20 Regards, Simon |