Hi Andrei, The @ConsumerType annoation will be in future spec. Adding a method in an interface is a major version change if the interface has the annoation of @ConsumerType while it will be a minor change if the interface has the annoation of @ProviderType.
In reality, most interfaces will fall into the category of ProviderType while only minority interfaces need consumer to implement. Regards Emily On Fri, Apr 12, 2013 at 5:53 PM, Andrei Pozolotin < [email protected]> wrote: > Ferry, Neil: thank you, clear. > > > -------- Original Message -------- > Subject: Re: [osgi-dev] Interpretation of semantic versioning? > From: Neil Bartlett <[email protected]> <[email protected]> > To: OSGi Developer Mail List <[email protected]><[email protected]> > Date: Fri 12 Apr 2013 11:02:03 AM CDT > > Ferry is correct. > > I would say that the JLS is wrong in this area, since adding a method to > an interface demonstrably *does* break compatibility with pre-existing > binaries, if those binaries include implementations of the interface. > > > On Fri, Apr 12, 2013 at 3:54 PM, Ferry Huberts <[email protected]> wrote: > >> >> >> On 12/04/13 16:13, Andrei Pozolotin wrote: >> > Hello. >> > >> > can you please clarify the following from the semantic versioning >> spec: >> > >> > 1) adding new method to an interface is a binary compatible change >> > per JLS >> > >> http://docs.oracle.com/javase/specs/jls/se7/html/jls-13.html#jls-13.5.3 >> > >> > 2) and aries versioning plugin enforces this rule by requiring MINOR >> > version change. >> > >> https://github.com/apache/aries/blob/trunk/versioning/versioning-checker/src/test/java/org/apache/aries/versioning/tests/BinaryCompatibilityTest.java#L1472 >> > >> > 3) am I correct in understanding that semantic versioning spec >> > http://www.osgi.org/wiki/uploads/Links/SemanticVersioning.pdf >> > requires a MAJOR version change instead of MINOR, for the same >> > interface change >> > WHEN the interface is a @ConsumerType interface? >> > >> >> yes, because it is a breaking change for the intented use of the >> interface >> >> see also >> >> >> https://github.com/bndtools/bnd/blob/master/biz.aQute.bndlib/src/aQute/bnd/annotation/ConsumerType.java >> >> and >> >> >> https://github.com/bndtools/bnd/blob/master/biz.aQute.bndlib/src/aQute/bnd/annotation/ProviderType.java >> >> >> > Thank you. >> > >> > Andrei. >> > >> > >> > >> > _______________________________________________ >> > OSGi Developer Mail List >> > [email protected] >> > https://mail.osgi.org/mailman/listinfo/osgi-dev >> > >> >> -- >> Ferry Huberts >> _______________________________________________ >> OSGi Developer Mail List >> [email protected] >> https://mail.osgi.org/mailman/listinfo/osgi-dev >> > > > > _______________________________________________ > OSGi Developer Mail > [email protected]https://mail.osgi.org/mailman/listinfo/osgi-dev > > > > _______________________________________________ > OSGi Developer Mail List > [email protected] > https://mail.osgi.org/mailman/listinfo/osgi-dev > -- Thanks Emily ================= Emily Jiang [email protected]
_______________________________________________ OSGi Developer Mail List [email protected] https://mail.osgi.org/mailman/listinfo/osgi-dev
