tacklist.core module binary compatibility

Petr Kuzel <[email protected]> Mon, 15 Dec 2003 19:29:11 +0100
Newsgroups gmane.comp.java.netbeans.modules.tasklist.devel
Organization Sun Microsystems
Message-ID <[email protected]>
Hello,

I plan to put further API restriction into effect. Namely
I plan to add OpenIDE-Module-Public-Packages: - attribute
to all module manifests (mainly core).

Why? It disables possibility to use module public
classes until dependent module uses implementation
dependency. Implementation dependency differs from
specification based dependency in one crucial aspect
it does not care about backward compatability: E.g.:

Time t:
  provider spec=1.0  impl=impl-1_0
  clientA  spec=1.0  dependsonspec > 1.0
  clientB  spec=1.0  dependsonimpl = impl-1_0

Time t+1, provider introduces incompatible change:
  provider spec=1.1  impl=impl-1_1
  clientA crashes because all dependencies are
    fullfiled still there is the incompatible change
  clientB does not load, leaving message it requires
    provider in implementation version impl-1_0
    (and only impl-1_1 is available)   

The benefit is the message vs. crash (LinkageError or so).
On the other hand it requires to change implementation
version on each API (signature or semantical) change and
modify client dependencies accordingly. Since all clients
are know ahead it's not so hard.

Conclusion. I propose to add the manifest attribute and
set up policy that all developers making changes to
module public classes that are used by other submodules
change the module implementation version and fix all
usages including upgrading required dependencies in
manifest files.

Contra solution I precluded is that each module declare
it's public API that is backward compatibly maintained.

If nobody objects I'm going to make first step tomorrow.

  Cc.

PS: recent related bugs: #35251 and #37381.
-- 
<address>
<a href="mailto:[email protected]">Petr Kuzel</a> at Sun Microsystems :
<a href="http://www.netbeans.org/">NetBeans Java IDE</a></address>