You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by Richard Eckart de Castilho <re...@apache.org> on 2015/05/24 00:24:23 UTC
Backwards-compatibility between UIMA 2.7.x and 2.6.0
Hi Marshall,
I am just playing around with a compatibility-checking Maven plugin and
tried applying it to uimaj-core. Even after excluding all "internal" and
"impl" stuff, there still appear to be changes that may make builds from
2.7.x not backwards-compatible with an installation using 2.6.0.
Unfortunately, the tool output is not filtered with respect to what really
are compatible changes and what are not. But I think the culprits here are:
Class org.apache.uima.UIMARuntimeException
Removed Field ILLEGAL_CAS_COPY_TO_SAME_CAS_SAME_VIEW, desc Ljava/lang/String;, access final public static
Class org.apache.uima.util.CasCopier
Removed Method alreadyCopied, desc (Lorg/apache/uima/cas/FeatureStructure;)Z, access public
Full details below.
Btw. according to the same plugin's interpretation of semantic versioning (http://semver.org),
trunk should be 2.8.0. Apparently any change in the public API should trigger a minor version
increment.
Cheers,
-- Richard
---
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-compatibility) @ uimaj-core ---
[INFO] Version specified as <2.6.0>
[INFO] Using </Users/bluefire/.m2/repository/org/apache/uima/uimaj-core/2.6.0/uimaj-core-2.6.0.jar> as previous JAR
[INFO] Using </Users/bluefire/UKP/Workspaces/maintenance/uimaj/uimaj-core/target/uima-core.jar> as current JAR
Class org.apache.uima.UIMARuntimeException
Added Field ILLEGAL_FS_FEAT_UPDATE, desc Ljava/lang/String;, access final public static
Removed Field ILLEGAL_CAS_COPY_TO_SAME_CAS_SAME_VIEW, desc Ljava/lang/String;, access final public static
Added Field COPY_CAS_RANGE_TYPE_NAMES_NOT_EQUAL, desc Ljava/lang/String;, access final public static
Class org.apache.uima.cas.CAS
Added Method protectIndexes, desc ()Ljava/lang/AutoCloseable;, access abstract public
Added Method protectIndexes, desc (Ljava/lang/Runnable;)V, access abstract public
Class org.apache.uima.cas.CASRuntimeException
Added Field ILLEGAL_FEAT_SET, desc Ljava/lang/String;, access final public static
Class org.apache.uima.cas.FSIndex
Added Method withSnapshotIterators, sig ()Lorg/apache/uima/cas/FSIndex<TT;>;, desc ()Lorg/apache/uima/cas/FSIndex;, access abstract public
Class org.apache.uima.cas.FSIndexRepository
Added Method ll_getIndexes, sig ()Ljava/util/Iterator<Lorg/apache/uima/cas/impl/LowLevelIndex;>;, desc ()Ljava/util/Iterator;, access abstract public
Class org.apache.uima.jcas.JCas
Added Method getAllIndexedFS, sig <T:Lorg/apache/uima/jcas/cas/TOP;>(Ljava/lang/Class<TT;>;)Lorg/apache/uima/cas/FSIterator<TT;>;, desc (Ljava/lang/Class;)Lorg/apache/uima/cas/FSIterator;, access abstract public
Added Method getAnnotationIndex, sig <T:Lorg/apache/uima/jcas/tcas/Annotation;>(Ljava/lang/Class<TT;>;)Lorg/apache/uima/cas/text/AnnotationIndex<TT;>;, desc (Ljava/lang/Class;)Lorg/apache/uima/cas/text/AnnotationIndex;, access abstract public
Added Method protectIndexes, desc ()Ljava/lang/AutoCloseable;, access abstract public
Added Method getIndex, sig <T:Lorg/apache/uima/jcas/cas/TOP;>(Ljava/lang/String;Ljava/lang/Class<TT;>;)Lorg/apache/uima/cas/FSIndex<TT;>;, desc (Ljava/lang/String;Ljava/lang/Class;)Lorg/apache/uima/cas/FSIndex;, access abstract public
Added Method protectIndexes, desc (Ljava/lang/Runnable;)V, access abstract public
Class org.apache.uima.util.CasCopier
Removed Method alreadyCopied, desc (Lorg/apache/uima/cas/FeatureStructure;)Z, access public
Added Method alreadyCopied, desc (I)Z, access public
Class org.apache.uima.util.MessageReport
Added Class , access public super synchronized
Class org.apache.uima.util.Misc
Added Class , access public super synchronized
[WARNING] Rule 0: org.semver.enforcer.RequireBackwardCompatibility failed with message:
Current codebase is not backward compatible (BACKWARD_COMPATIBLE_IMPLEMENTER) with version <2.6.0>. Compatibility type has been detected as <NON_BACKWARD_COMPATIBLE>
---
To play around yourself, add this to the uimaj-parent pom
---
// in properties
<!--
BACKWARD_COMPATIBLE_IMPLEMENTER - patch version (=.=.+)
BACKWARD_COMPATIBLE_USER - minor version (=.+.0)
NON_BACKWARD_COMPATIBLE - major version (+.0.0)
-->
<compat.level>BACKWARD_COMPATIBLE_IMPLEMENTER</compat.level>
<compat.previous.version>2.6.0</compat.previous.version>
// in enforcer
<execution>
<id>enforce-compatibility</id>
<phase>verify</phase>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireBackwardCompatibility implementation="org.semver.enforcer.RequireBackwardCompatibility">
<previousVersion>${compat.previous.version}</previousVersion>
<dumpDetails>true</dumpDetails>
<compatibilityType>${compat.level}</compatibilityType>
<excludes>
<exclude>**/impl/**/*</exclude>
<exclude>**/internal/**/*</exclude>
</excludes>
</requireBackwardCompatibility>
</rules>
</configuration>
</execution>
---
Re: Backwards-compatibility between UIMA 2.7.x and 2.6.0
Posted by Richard Eckart de Castilho <re...@apache.org>.
Ok, so Jenkins had no problems with the build - so you shouldn't have either.
The compatibility level I set in is BACKWARD_COMPATIBLE_USER which would mean
by the versioning rules that trunk should be 2.8.0, not 2.7.1 - but anyway.
This is the output in the Jenkins log:
[INFO]
--- maven-enforcer-plugin:1.3.1:enforce (enforce-compatibility) @ uimaj-core ---
[INFO] Version specified as <2.7.0>
Downloading:
http://repo1.maven.org/eclipse/org/apache/uima/uimaj-core/2.7.0/uimaj-core-2.7.0.jar
Downloading:
http://repo1.maven.org/maven2/org/apache/uima/uimaj-core/2.7.0/uimaj-core-2.7.0.jar
Downloaded:
http://repo1.maven.org/maven2/org/apache/uima/uimaj-core/2.7.0/uimaj-core-2.7.0.jar
(1545 KB at 4021.1 KB/sec)
[INFO] Using </jenkins/maven-repositories/0/org/apache/uima/uimaj-core/2.7.0/uimaj-core-2.7.0.jar> as previous JAR
[INFO] Using </jenkins/workspace/UIMA-SDK/trunk/uimaj-core/target/uima-core.jar> as current JAR
Please update to trunk and try a local build again.
Cheers,
-- Richard
On 28.05.2015, at 21:43, Richard Eckart de Castilho <re...@apache.org> wrote:
> On 28.05.2015, at 19:57, Marshall Schor <ms...@schor.com> wrote:
>
>> Thanks, Richard, this is helpful!
>>
>> The alreadyCopied method - the signature was changed; I've added back the
>> previous one. This was found also by a user.
>>
>> The removing of the field ILLEGAL_CAS_COPY... etc is an error message for an
>> error that wasn't being thrown, since
>> https://issues.apache.org/jira/browse/UIMA-2409 when the cas copier was extended
>> to allow more variants. This error message was commented out for many updates,
>> and finally removed.
>>
>> What are the things the tool is finding re: API changes from 2.7.0 to 2.7.1 ?
>
> [INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-compatibility) @ uimaj-core ---
> [INFO] Version specified as <2.7.0>
> [INFO] Using </Users/bluefire/.m2/repository/org/apache/uima/uimaj-core/2.7.0/uimaj-core-2.7.0.jar> as previous JAR
> [INFO] Using </Users/bluefire/UKP/Workspaces/dkpro-juno/uimaj/uimaj-core/target/uima-core.jar> as current JAR
> Class org.apache.uima.jcas.JCas
> Added Method getAnnotationIndex, sig <T:Lorg/apache/uima/jcas/tcas/Annotation;>(Ljava/lang/Class<TT;>;)Lorg/apache/uima/cas/text/AnnotationIndex<TT;>;, desc (Ljava/lang/Class;)Lorg/apache/uima/cas/text/AnnotationIndex;, access abstract public
> Added Method getIndex, sig <T:Lorg/apache/uima/jcas/cas/TOP;>(Ljava/lang/String;Ljava/lang/Class<TT;>;)Lorg/apache/uima/cas/FSIndex<TT;>;, desc (Ljava/lang/String;Ljava/lang/Class;)Lorg/apache/uima/cas/FSIndex;, access abstract public
> Added Method getAllIndexedFS, sig <T:Lorg/apache/uima/jcas/cas/TOP;>(Ljava/lang/Class<TT;>;)Lorg/apache/uima/cas/FSIterator<TT;>;, desc (Ljava/lang/Class;)Lorg/apache/uima/cas/FSIterator;, access abstract public
> Class org.apache.uima.util.CasCopier
> Added Method alreadyCopied, desc (Lorg/apache/uima/cas/FeatureStructure;)Z, access public
> [WARNING] Rule 0: org.semver.enforcer.RequireBackwardCompatibility failed with message:
> Current codebase is not backward compatible (BACKWARD_COMPATIBLE_IMPLEMENTER) with version <2.7.0>. Compatibility type has been detected as <BACKWARD_COMPATIBLE_USER>
>
> --> So according to the plugin, the next version should be 2.8.0. Its notion
> of versioning might differ from yours. SemVer wants to change the minor version
> whenever any change is made to public API. Only changes not visible in the API
> are allowed for a patch-level change.
>
>> I tried running this, but the enforcer plugin says,
>> org.apache.maven.plugins:maven-enforcer-plugin:1.3.1:enforce for parameter
>> rules: Cannot load implementation hint
>> 'org.semver.enforcer.RequireBackwardCompatibility'
>>
>> What am I missing?
>
> No idea what you are missing. But I am committing a profile for this to the SVN
> and activate it for uimaj-core. Let's see what Jenkins has to say.
>
> Cheers,
>
> -- Richard
Re: Backwards-compatibility between UIMA 2.7.x and 2.6.0
Posted by Richard Eckart de Castilho <re...@apache.org>.
On 28.05.2015, at 19:57, Marshall Schor <ms...@schor.com> wrote:
> Thanks, Richard, this is helpful!
>
> The alreadyCopied method - the signature was changed; I've added back the
> previous one. This was found also by a user.
>
> The removing of the field ILLEGAL_CAS_COPY... etc is an error message for an
> error that wasn't being thrown, since
> https://issues.apache.org/jira/browse/UIMA-2409 when the cas copier was extended
> to allow more variants. This error message was commented out for many updates,
> and finally removed.
>
> What are the things the tool is finding re: API changes from 2.7.0 to 2.7.1 ?
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-compatibility) @ uimaj-core ---
[INFO] Version specified as <2.7.0>
[INFO] Using </Users/bluefire/.m2/repository/org/apache/uima/uimaj-core/2.7.0/uimaj-core-2.7.0.jar> as previous JAR
[INFO] Using </Users/bluefire/UKP/Workspaces/dkpro-juno/uimaj/uimaj-core/target/uima-core.jar> as current JAR
Class org.apache.uima.jcas.JCas
Added Method getAnnotationIndex, sig <T:Lorg/apache/uima/jcas/tcas/Annotation;>(Ljava/lang/Class<TT;>;)Lorg/apache/uima/cas/text/AnnotationIndex<TT;>;, desc (Ljava/lang/Class;)Lorg/apache/uima/cas/text/AnnotationIndex;, access abstract public
Added Method getIndex, sig <T:Lorg/apache/uima/jcas/cas/TOP;>(Ljava/lang/String;Ljava/lang/Class<TT;>;)Lorg/apache/uima/cas/FSIndex<TT;>;, desc (Ljava/lang/String;Ljava/lang/Class;)Lorg/apache/uima/cas/FSIndex;, access abstract public
Added Method getAllIndexedFS, sig <T:Lorg/apache/uima/jcas/cas/TOP;>(Ljava/lang/Class<TT;>;)Lorg/apache/uima/cas/FSIterator<TT;>;, desc (Ljava/lang/Class;)Lorg/apache/uima/cas/FSIterator;, access abstract public
Class org.apache.uima.util.CasCopier
Added Method alreadyCopied, desc (Lorg/apache/uima/cas/FeatureStructure;)Z, access public
[WARNING] Rule 0: org.semver.enforcer.RequireBackwardCompatibility failed with message:
Current codebase is not backward compatible (BACKWARD_COMPATIBLE_IMPLEMENTER) with version <2.7.0>. Compatibility type has been detected as <BACKWARD_COMPATIBLE_USER>
--> So according to the plugin, the next version should be 2.8.0. Its notion
of versioning might differ from yours. SemVer wants to change the minor version
whenever any change is made to public API. Only changes not visible in the API
are allowed for a patch-level change.
> I tried running this, but the enforcer plugin says,
> org.apache.maven.plugins:maven-enforcer-plugin:1.3.1:enforce for parameter
> rules: Cannot load implementation hint
> 'org.semver.enforcer.RequireBackwardCompatibility'
>
> What am I missing?
No idea what you are missing. But I am committing a profile for this to the SVN
and activate it for uimaj-core. Let's see what Jenkins has to say.
Cheers,
-- Richard
Re: Backwards-compatibility between UIMA 2.7.x and 2.6.0
Posted by Marshall Schor <ms...@schor.com>.
Thanks, Richard, this is helpful!
The alreadyCopied method - the signature was changed; I've added back the
previous one. This was found also by a user.
The removing of the field ILLEGAL_CAS_COPY... etc is an error message for an
error that wasn't being thrown, since
https://issues.apache.org/jira/browse/UIMA-2409 when the cas copier was extended
to allow more variants. This error message was commented out for many updates,
and finally removed.
What are the things the tool is finding re: API changes from 2.7.0 to 2.7.1 ?
I tried running this, but the enforcer plugin says,
org.apache.maven.plugins:maven-enforcer-plugin:1.3.1:enforce for parameter
rules: Cannot load implementation hint
'org.semver.enforcer.RequireBackwardCompatibility'
What am I missing?
-Marshall
On 5/23/2015 6:24 PM, Richard Eckart de Castilho wrote:
> Hi Marshall,
>
> I am just playing around with a compatibility-checking Maven plugin and
> tried applying it to uimaj-core. Even after excluding all "internal" and
> "impl" stuff, there still appear to be changes that may make builds from
> 2.7.x not backwards-compatible with an installation using 2.6.0.
>
> Unfortunately, the tool output is not filtered with respect to what really
> are compatible changes and what are not. But I think the culprits here are:
>
> Class org.apache.uima.UIMARuntimeException
> Removed Field ILLEGAL_CAS_COPY_TO_SAME_CAS_SAME_VIEW, desc Ljava/lang/String;, access final public static
> Class org.apache.uima.util.CasCopier
> Removed Method alreadyCopied, desc (Lorg/apache/uima/cas/FeatureStructure;)Z, access public
>
> Full details below.
>
> Btw. according to the same plugin's interpretation of semantic versioning (http://semver.org),
> trunk should be 2.8.0. Apparently any change in the public API should trigger a minor version
> increment.
>
> Cheers,
>
> -- Richard
>
> ---
>
> [INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-compatibility) @ uimaj-core ---
> [INFO] Version specified as <2.6.0>
> [INFO] Using </Users/bluefire/.m2/repository/org/apache/uima/uimaj-core/2.6.0/uimaj-core-2.6.0.jar> as previous JAR
> [INFO] Using </Users/bluefire/UKP/Workspaces/maintenance/uimaj/uimaj-core/target/uima-core.jar> as current JAR
> Class org.apache.uima.UIMARuntimeException
> Added Field ILLEGAL_FS_FEAT_UPDATE, desc Ljava/lang/String;, access final public static
> Removed Field ILLEGAL_CAS_COPY_TO_SAME_CAS_SAME_VIEW, desc Ljava/lang/String;, access final public static
> Added Field COPY_CAS_RANGE_TYPE_NAMES_NOT_EQUAL, desc Ljava/lang/String;, access final public static
> Class org.apache.uima.cas.CAS
> Added Method protectIndexes, desc ()Ljava/lang/AutoCloseable;, access abstract public
> Added Method protectIndexes, desc (Ljava/lang/Runnable;)V, access abstract public
> Class org.apache.uima.cas.CASRuntimeException
> Added Field ILLEGAL_FEAT_SET, desc Ljava/lang/String;, access final public static
> Class org.apache.uima.cas.FSIndex
> Added Method withSnapshotIterators, sig ()Lorg/apache/uima/cas/FSIndex<TT;>;, desc ()Lorg/apache/uima/cas/FSIndex;, access abstract public
> Class org.apache.uima.cas.FSIndexRepository
> Added Method ll_getIndexes, sig ()Ljava/util/Iterator<Lorg/apache/uima/cas/impl/LowLevelIndex;>;, desc ()Ljava/util/Iterator;, access abstract public
> Class org.apache.uima.jcas.JCas
> Added Method getAllIndexedFS, sig <T:Lorg/apache/uima/jcas/cas/TOP;>(Ljava/lang/Class<TT;>;)Lorg/apache/uima/cas/FSIterator<TT;>;, desc (Ljava/lang/Class;)Lorg/apache/uima/cas/FSIterator;, access abstract public
> Added Method getAnnotationIndex, sig <T:Lorg/apache/uima/jcas/tcas/Annotation;>(Ljava/lang/Class<TT;>;)Lorg/apache/uima/cas/text/AnnotationIndex<TT;>;, desc (Ljava/lang/Class;)Lorg/apache/uima/cas/text/AnnotationIndex;, access abstract public
> Added Method protectIndexes, desc ()Ljava/lang/AutoCloseable;, access abstract public
> Added Method getIndex, sig <T:Lorg/apache/uima/jcas/cas/TOP;>(Ljava/lang/String;Ljava/lang/Class<TT;>;)Lorg/apache/uima/cas/FSIndex<TT;>;, desc (Ljava/lang/String;Ljava/lang/Class;)Lorg/apache/uima/cas/FSIndex;, access abstract public
> Added Method protectIndexes, desc (Ljava/lang/Runnable;)V, access abstract public
> Class org.apache.uima.util.CasCopier
> Removed Method alreadyCopied, desc (Lorg/apache/uima/cas/FeatureStructure;)Z, access public
> Added Method alreadyCopied, desc (I)Z, access public
> Class org.apache.uima.util.MessageReport
> Added Class , access public super synchronized
> Class org.apache.uima.util.Misc
> Added Class , access public super synchronized
> [WARNING] Rule 0: org.semver.enforcer.RequireBackwardCompatibility failed with message:
> Current codebase is not backward compatible (BACKWARD_COMPATIBLE_IMPLEMENTER) with version <2.6.0>. Compatibility type has been detected as <NON_BACKWARD_COMPATIBLE>
>
> ---
>
> To play around yourself, add this to the uimaj-parent pom
>
> ---
> // in properties
> <!--
> BACKWARD_COMPATIBLE_IMPLEMENTER - patch version (=.=.+)
> BACKWARD_COMPATIBLE_USER - minor version (=.+.0)
> NON_BACKWARD_COMPATIBLE - major version (+.0.0)
> -->
> <compat.level>BACKWARD_COMPATIBLE_IMPLEMENTER</compat.level>
> <compat.previous.version>2.6.0</compat.previous.version>
>
>
> // in enforcer
> <execution>
> <id>enforce-compatibility</id>
> <phase>verify</phase>
> <goals>
> <goal>enforce</goal>
> </goals>
> <configuration>
> <rules>
> <requireBackwardCompatibility implementation="org.semver.enforcer.RequireBackwardCompatibility">
> <previousVersion>${compat.previous.version}</previousVersion>
> <dumpDetails>true</dumpDetails>
> <compatibilityType>${compat.level}</compatibilityType>
> <excludes>
> <exclude>**/impl/**/*</exclude>
> <exclude>**/internal/**/*</exclude>
> </excludes>
> </requireBackwardCompatibility>
> </rules>
> </configuration>
> </execution>
> ---
>
>