RFC: problems with splitting up kdebase

Thiago Macieira thiago at kde.org
Tue Jun 26 16:23:40 BST 2007


David Faure wrote:
>On Tuesday 26 June 2007, Thiago Macieira wrote:
>> It was not my idea to auto-generate adaptors during compilation.
>
>Committing the adaptor code in svn was giving us huge discrepancies
> between the xml and the adaptors, introducing bugs everywhere
> (non-implemented methods, wrong argument types, typos, etc. etc.). This
> was certainly not a valid solution.

I don't understand how. This is the same principle as a header file in a 
library: binary compatibility. You can only add methods, never remove 
those that are there. Changing the signature is equivalent to removing 
the one that is there and adding a new, unrelated one.

If an adaptor is generated from a .xml file and that .xml got updated 
(compatibly), then it means that any NEW methods will not be implemented. 
The *caller* must be able to handle that. Not the callee.

That's the rule for adding methods to interfaces: new methods may fail if 
you're calling an old interface. Either check the interface version 
(which means introducting a version number) or handle the failure.

>We need compile-time checking, we don't have unit tests for every piece
> of kde code.

Ok. What I described above is equivalent to duplicating the .xml files and  
not updating all of them.

The difference being that only one of the many .xml files can be 
installed. We have to choose which one.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070626/24e2fcd3/attachment.sig>


More information about the kde-core-devel mailing list