Skip to content

CASSJAVA-102: Fix revapi surious complaints about optional dependencies #2042

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: 4.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions core/revapi.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Configures Revapi (https://revapi.org/getting-started.html) to check API compatibility between
// successive driver versions.
{
"revapi": {
"java": {
Expand Down Expand Up @@ -7386,6 +7384,29 @@
"old": "method <T extends java.lang.Number> com.datastax.oss.driver.api.core.type.reflect.GenericType<com.datastax.oss.driver.api.core.data.CqlVector<T>> com.datastax.oss.driver.api.core.type.reflect.GenericType<T>::vectorOf(java.lang.Class<T>)",
"new": "method <T> com.datastax.oss.driver.api.core.type.reflect.GenericType<com.datastax.oss.driver.api.core.data.CqlVector<T>> com.datastax.oss.driver.api.core.type.reflect.GenericType<T>::vectorOf(java.lang.Class<T>)",
"justification": "JAVA-3143: Extend driver vector support to arbitrary subtypes and fix handling of variable length types (OSS C* 5.0)"
},
{
"code": "java.class.nonPublicPartOfAPI",
"old": "class com.datastax.oss.driver.internal.core.config.typesafe.TypesafeDriverExecutionProfile.Base",
"justification": "CASSJAVA-102: Fix spurious complaints about optional dependencies"
},
{
"code": "java.class.nonPublicPartOfAPI",
"old": "class com.fasterxml.jackson.databind.type.TypeParser.MyTokenizer",
"justification": "CASSJAVA-102: Fix spurious complaints about optional dependencies"
},
{
"code": "java.class.nonPublicPartOfAPI",
"old": "class org.apache.tinkerpop.shaded.jackson.databind.type.TypeParser.MyTokenizer",
"justification": "CASSJAVA-102: Fix spurious complaints about optional dependencies"
},
{
"code": "java.class.externalClassExposedInAPI",
"justification": "CASSJAVA-102: Migrate revapi config into dedicated config files, ported from pom.xml"
},
{
"code": "java.method.varargOverloadsOnlyDifferInVarargParameter",
"justification": "CASSJAVA-102: Migrate revapi config into dedicated config files, ported from pom.xml"
}
]
}
Expand Down
6 changes: 2 additions & 4 deletions mapper-runtime/revapi.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Configures Revapi (https://revapi.org/getting-started.html) to check API compatibility between
// successive driver versions.
{
"revapi": {
"java": {
Expand All @@ -11,7 +9,7 @@
"com\\.datastax\\.(oss|dse)\\.driver\\.internal(\\..+)?",
"com\\.datastax\\.oss\\.driver\\.shaded(\\..+)?",
"com\\.datastax\\.oss\\.simulacron(\\..+)?",
// Don't re-check sibling modules that this module depends on
"// Don't re-check sibling modules that this module depends on",
"com\\.datastax\\.(oss|dse)\\.driver\\.api\\.core(\\..+)?",
"com\\.datastax\\.(oss|dse)\\.driver\\.api\\.querybuilder(\\..+)?"
]
Expand All @@ -22,7 +20,7 @@
{
"regex": true,
"code": "java.annotation.attributeValueChanged",
"old": "@interface com\.datastax\.oss\.driver\.api\.mapper\.annotations\..*",
"old": "@interface com\\.datastax\\.oss\\.driver\\.api\\.mapper\\.annotations\\..*",
"annotationType": "java.lang.annotation.Retention",
"attribute": "value",
"oldValue": "java.lang.annotation.RetentionPolicy.CLASS",
Expand Down
21 changes: 5 additions & 16 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -561,28 +561,23 @@
<plugin>
<groupId>org.revapi</groupId>
<artifactId>revapi-maven-plugin</artifactId>
<version>0.10.5</version>
<version>0.15.1</version>
<configuration>
<outputNonIdentifyingDifferenceInfo>false</outputNonIdentifyingDifferenceInfo>
<versionFormat>\d+\.\d+\.\d+</versionFormat>
<analysisConfiguration>
<revapi.ignore>
<item>
<!-- We don't consider this a problem -->
<code>java.class.externalClassExposedInAPI</code>
</item>
</revapi.ignore>
</analysisConfiguration>
<oldArtifacts>
<!-- The previous release used DataStax groupId, remove this after the next release -->
<artifact>${project.groupId}:${project.artifactId}:RELEASE</artifact>
</oldArtifacts>
<analysisConfigurationFiles>
<file>revapi.json</file>
</analysisConfigurationFiles>
</configuration>
<dependencies>
<dependency>
<groupId>org.revapi</groupId>
<artifactId>revapi-java</artifactId>
<version>0.22.1</version>
<version>0.28.4</version>
</dependency>
</dependencies>
</plugin>
Expand Down Expand Up @@ -901,12 +896,6 @@ limitations under the License.]]></inlineHeader>
<goals>
<goal>check</goal>
</goals>
<configuration>
<analysisConfigurationFiles>
<!-- Present at the root of each module that doesn't skip this goal -->
<analysisConfigurationFile>revapi.json</analysisConfigurationFile>
</analysisConfigurationFiles>
</configuration>
</execution>
</executions>
</plugin>
Expand Down
9 changes: 5 additions & 4 deletions query-builder/revapi.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Configures Revapi (https://revapi.org/getting-started.html) to check API compatibility between
// successive driver versions.
{
"revapi": {
"java": {
Expand All @@ -11,7 +9,7 @@
"com\\.datastax\\.(oss|dse)\\.driver\\.internal(\\..+)?",
"com\\.datastax\\.oss\\.driver\\.shaded(\\..+)?",
"org\\.assertj(\\..+)?",
// Don't re-check sibling modules that this module depends on
"// Don't re-check sibling modules that this module depends on",
"com\\.datastax\\.(oss|dse)\\.driver\\.api\\.core(\\..+)?"
]
}
Expand Down Expand Up @@ -2782,8 +2780,11 @@
"code": "java.method.addedToInterface",
"new": "method com.datastax.oss.driver.api.querybuilder.select.Select com.datastax.oss.driver.api.querybuilder.select.Select::orderByAnnOf(com.datastax.oss.driver.api.core.CqlIdentifier, com.datastax.oss.driver.api.core.data.CqlVector<?>)",
"justification": "JAVA-3118: Add support for vector data type in Schema Builder, QueryBuilder"
},
{
"code": "java.method.varargOverloadsOnlyDifferInVarargParameter",
"justification": "CASSJAVA-102: Suppress newly-supported varargs check"
}
]
}
}

4 changes: 1 addition & 3 deletions test-infra/revapi.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Configures Revapi (https://revapi.org/getting-started.html) to check API compatibility between
// successive driver versions.
{
"revapi": {
"java": {
Expand All @@ -12,7 +10,7 @@
"com\\.datastax\\.oss\\.driver\\.shaded(\\..+)?",
"com\\.datastax\\.oss\\.simulacron(\\..+)?",
"org\\.assertj(\\..+)?",
// Don't re-check sibling modules that this module depends on
"// Don't re-check sibling modules that this module depends on",
"com\\.datastax\\.(oss|dse)\\.driver\\.api\\.core(\\..+)?"
]
}
Expand Down