Skip to content

Commit df75f62

Browse files
monperrusnharrand
authored andcommitted
chore: restore revapi (INRIA#3112)
1 parent 82b8f67 commit df75f62

File tree

4 files changed

+21
-87
lines changed

4 files changed

+21
-87
lines changed

chore/revapy.py

Lines changed: 0 additions & 81 deletions
This file was deleted.

chore/travis/travis-extra.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,17 @@ mvn -q checkstyle:checkstyle -Pcheckstyle-test
2525

2626
python ./chore/check-links-in-doc.py
2727

28+
# compute the revapi API compatibility report
29+
mvn -U revapi:report
30+
cat ./target/revapi_report.md;
31+
if grep -q "changes.*: [123456789]" ./target/revapi_report.md;
32+
then
33+
# post the revapi report as PR comment
34+
# the CI job has the spoon-bot password to be able to post the revapi report as comment on the pull request
35+
# source of the CI job: https://github.com/SpoonLabs/spoon-ci-config/blob/master/jenkins/jobs/push-comment-github.xml
36+
curl -F file0=@./target/revapi_report.md -F json='{"parameter": [{"name":"revapi_report.md", "file":"file0"},{"name":"pull_request","value":"'$TRAVIS_PULL_REQUEST'"}]}' -v "https://ci.inria.fr/sos/job/push-comment-github/build?token=hgzer87954"
37+
fi
38+
2839
##################################################################
2940
# Spoon-decompiler
3041
##################################################################

spoon-pom/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,25 +198,25 @@
198198
<groupId>org.revapi</groupId>
199199
<artifactId>revapi-maven-plugin</artifactId>
200200
<!-- Lock down plugin version for build reproducibility -->
201-
<version>0.9.5</version>
201+
<version>0.11.1</version>
202202
<dependencies>
203203
<dependency>
204204
<groupId>org.revapi</groupId>
205205
<artifactId>revapi-java</artifactId>
206-
<version>0.14.4</version>
206+
<version>0.19.1</version>
207207
</dependency>
208208
<dependency>
209209
<groupId>org.revapi</groupId>
210210
<artifactId>revapi-reporter-text</artifactId>
211-
<version>0.8.1</version>
211+
<version>0.10.1</version>
212212
</dependency>
213213
</dependencies>
214214
<configuration>
215215
<failSeverity>breaking</failSeverity>
216216
<alwaysCheckForReleaseVersion>false</alwaysCheckForReleaseVersion>
217217
<oldVersion>LATEST</oldVersion>
218218
<analysisConfigurationFiles>
219-
<file>../revapi.json</file>
219+
<file>revapi.json</file>
220220
</analysisConfigurationFiles>
221221
</configuration>
222222
</plugin>

src/main/java/spoon/reflect/visitor/ImportCleaner.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ protected void handleTypeReference(CtTypeReference<?> reference, Context context
114114
}
115115
}
116116

117-
class Context {
117+
/** a set of imports for a given compilation unit */
118+
public class Context {
118119
private CtCompilationUnit compilationUnit;
119120
private Map<String, CtImport> computedImports;
120121
private String packageQName;
@@ -295,7 +296,10 @@ void checkType(CtTypeReference<?> importTypeRef) {
295296
return visitor.found;
296297
}
297298

298-
class ImportCleanerScanner extends EarlyTerminatingScanner<Void> {
299+
/**
300+
* A scanner that initializes context for a compilation unit.
301+
*/
302+
public class ImportCleanerScanner extends EarlyTerminatingScanner<Void> {
299303
Context context;
300304
@Override
301305
protected void enter(CtElement e) {

0 commit comments

Comments
 (0)