cloud-opensource-java icon indicating copy to clipboard operation
cloud-opensource-java copied to clipboard

Linkage Checker to report which version of a library has expected symbols

Open suztomo opened this issue 6 years ago • 3 comments

Linkage Checker to report which version of a library has expected symbols.

Regarding the error below, it would be nice if it can show which versions of Guava (1) curator-client 4.2.0 uses and (2) the class path actually contains.

Class com.google.common.reflect.TypeToken is not found;
  referenced by 6 class files
    org.apache.curator.shaded.com.google.common.eventbus.SubscriberRegistry (curator-client-4.2.0.jar)
    org.apache.curator.shaded.com.google.common.reflect.Element (curator-client-4.2.0.jar)
    org.apache.curator.shaded.com.google.common.reflect.ImmutableTypeToInstanceMap (curator-client-4.2.0.jar)
    org.apache.curator.shaded.com.google.common.reflect.Invokable (curator-client-4.2.0.jar)
    org.apache.curator.shaded.com.google.common.reflect.MutableTypeToInstanceMap (curator-client-4.2.0.jar)
    org.apache.curator.shaded.com.google.common.reflect.TypeToken (curator-client-4.2.0.jar)

After getting the error, we can report the different Guava versions by resolving the dependency of the Maven artifact of the source class.

suztomo avatar Jan 09 '20 18:01 suztomo

Does Maven Central Index help?

image

suztomo avatar Jan 24 '20 19:01 suztomo

The index turned out not to contain methods and fields.

suztomo avatar Feb 04 '20 21:02 suztomo

I call the capability "hint" for now. A hint holds a map from a symbol to Maven artifact.

suztomo avatar Feb 04 '20 21:02 suztomo