alien-tools / maracas

Maracas is a source code and bytecode analysis framework⁠—written in Java with the help of Spoon—which analyzes how Java libraries evolve and how their evolution impacts their clients.
https://alien-tools.github.io/maracas/
MIT License
13 stars 2 forks source link

No compiler message when using a deprecated method or field from transitive supertype #48

Closed lmove closed 2 years ago

lmove commented 2 years ago

There is no compiler message pointing to the invocation or access of deprecated methods and fields coming from transitive supertypes.

Related broken uses:

Path: path-to/maracas/test-data/comp-changes/client/src/mainclient/annotationDeprecatedAdded/AnnotationDeprecatedAddedSA.java
Line: 31
Breaking change: ANNOTATION_DEPRECATED_ADDED
API use: TYPE_DEPENDENCY
Used declaration: main.annotationDeprecatedAdded.AnnDeprAddedNonEmptyClass
Source declaration: main.annotationDeprecatedAdded.AnnDeprAddedNonEmptyClass

Path: path-to/maracas/test-data/comp-changes/client/src/mainclient/annotationDeprecatedAdded/AnnotationDeprecatedAddedExtSub.java
Line: 8
Breaking change: ANNOTATION_DEPRECATED_ADDED
API use: TYPE_DEPENDENCY
Used declaration: main.annotationDeprecatedAdded.AnnDeprAddedNonEmptyClass
Source declaration: main.annotationDeprecatedAdded.AnnDeprAddedNonEmptyClass

Path: path-to/maracas/test-data/comp-changes/client/src/mainclient/annotationDeprecatedAdded/AnnotationDeprecatedAddedSA.java
Line: 25
Breaking change: ANNOTATION_DEPRECATED_ADDED
API use: TYPE_DEPENDENCY
Used declaration: main.annotationDeprecatedAdded.AnnDeprAddedNonEmptyClass
Source declaration: main.annotationDeprecatedAdded.AnnDeprAddedNonEmptyClass

Path: path-to/maracas/test-data/comp-changes/client/src/mainclient/annotationDeprecatedAdded/AnnotationDeprecatedAddedSA.java
Line: 25
Breaking change: ANNOTATION_DEPRECATED_ADDED
API use: TYPE_DEPENDENCY
Used declaration: main.annotationDeprecatedAdded.AnnDeprAddedNonEmptyClass
Source declaration: main.annotationDeprecatedAdded.AnnDeprAddedNonEmptyClass

Path: path-to/maracas/test-data/comp-changes/client/src/mainclient/annotationDeprecatedAdded/AnnotationDeprecatedAddedExtSub.java
Line: 13
Breaking change: ANNOTATION_DEPRECATED_ADDED
API use: TYPE_DEPENDENCY
Used declaration: main.annotationDeprecatedAdded.AnnDeprAddedNonEmptyClass
Source declaration: main.annotationDeprecatedAdded.AnnDeprAddedNonEmptyClass

Path: path-to/maracas/test-data/comp-changes/client/src/mainclient/annotationDeprecatedAdded/AnnotationDeprecatedAddedExt.java
Line: 13
Breaking change: ANNOTATION_DEPRECATED_ADDED
API use: TYPE_DEPENDENCY
Used declaration: main.annotationDeprecatedAdded.AnnDeprAddedNonEmptyClass
Source declaration: main.annotationDeprecatedAdded.AnnDeprAddedNonEmptyClass

Path: path-to/maracas/test-data/comp-changes/client/src/mainclient/annotationDeprecatedAdded/AnnotationDeprecatedAddedExt.java
Line: 8
Breaking change: ANNOTATION_DEPRECATED_ADDED
API use: TYPE_DEPENDENCY
Used declaration: main.annotationDeprecatedAdded.AnnDeprAddedNonEmptyClass
Source declaration: main.annotationDeprecatedAdded.AnnDeprAddedNonEmptyClass

Path: path-to/maracas/test-data/comp-changes/client/src/mainclient/annotationDeprecatedAdded/AnnotationDeprecatedAddedSA.java
Line: 32
Breaking change: ANNOTATION_DEPRECATED_ADDED
API use: TYPE_DEPENDENCY
Used declaration: main.annotationDeprecatedAdded.AnnDeprAddedNonEmptyClass
Source declaration: main.annotationDeprecatedAdded.AnnDeprAddedNonEmptyClass

Path: path-to/maracas/test-data/comp-changes/client/src/mainclient/annotationDeprecatedAdded/AnnotationDeprecatedAddedExt.java
Line: 14
Breaking change: ANNOTATION_DEPRECATED_ADDED
API use: TYPE_DEPENDENCY
Used declaration: main.annotationDeprecatedAdded.AnnDeprAddedNonEmptyClass
Source declaration: main.annotationDeprecatedAdded.AnnDeprAddedNonEmptyClass

Path: path-to/maracas/test-data/comp-changes/client/src/mainclient/annotationDeprecatedAdded/AnnotationDeprecatedAddedSA.java
Line: 26
Breaking change: ANNOTATION_DEPRECATED_ADDED
API use: TYPE_DEPENDENCY
Used declaration: main.annotationDeprecatedAdded.AnnDeprAddedNonEmptyClass
Source declaration: main.annotationDeprecatedAdded.AnnDeprAddedNonEmptyClass

Path: path-to/maracas/test-data/comp-changes/client/src/mainclient/annotationDeprecatedAdded/AnnotationDeprecatedAddedExt.java
Line: 9
Breaking change: ANNOTATION_DEPRECATED_ADDED
API use: TYPE_DEPENDENCY
Used declaration: main.annotationDeprecatedAdded.AnnDeprAddedNonEmptyClass
Source declaration: main.annotationDeprecatedAdded.AnnDeprAddedNonEmptyClass

Path: path-to/maracas/test-data/comp-changes/client/src/mainclient/annotationDeprecatedAdded/AnnotationDeprecatedAddedExtSub.java
Line: 14
Breaking change: ANNOTATION_DEPRECATED_ADDED
API use: TYPE_DEPENDENCY
Used declaration: main.annotationDeprecatedAdded.AnnDeprAddedNonEmptyClass
Source declaration: main.annotationDeprecatedAdded.AnnDeprAddedNonEmptyClass

Path: path-to/maracas/test-data/comp-changes/client/src/mainclient/annotationDeprecatedAdded/AnnotationDeprecatedAddedExtSub.java
Line: 9
Breaking change: ANNOTATION_DEPRECATED_ADDED
API use: TYPE_DEPENDENCY
Used declaration: main.annotationDeprecatedAdded.AnnDeprAddedNonEmptyClass
Source declaration: main.annotationDeprecatedAdded.AnnDeprAddedNonEmptyClass
lmove commented 2 years ago

After using the -deprecation option of javac, we got no results to solve this issue.

lmove commented 2 years ago

I suggest reclassifying these cases manually, as, as far as I have investigated, there is no way to get the corresponding message from the Maven compiler. Moreover, trying to detect such cases automatically will imply a costly additional effort. Wdyt?

tdegueul commented 2 years ago

+1