Open suztomo opened 4 years ago
Idea of plain text file. This cannot have structure but it works fine if it's just for the targets.
com.google.guava:guava:25.1-jre/com.google.common.collection.ImmutableList/size
com.google.guava:guava:*/**
*weld-osgi-bundle*/**
*/com.github.luben.zstd.ZstdInputStream
*/com.github.luben.zstd.ZstdOutputStream
*/org.apache.beam.vendor.bytebuddy.v1_9_3.net.bytebuddy.jar.asm.commons.ModuleHashesAttribute
The information written in the file should be independent from the data types in our Java code. The information may have source and target.
Source and target should be present. Thinking how to represent the special case in Linkage Checker's suppression logic
Example (if we use XML)
<LinkageError>
<Source>
<Class name="org.apache.beam.sdk.io.jdbc.JdbcIO$ReadFn">
</Source>
<Target>
<Artifact coordinates="com.google.guava:guava:25.1-jre">
</Target>
</LinkageError>
A LinkageError
element represents a matcher that takes at least one of Source
and Target
elements.
Source
element is present, the matcher checks the source (the referencing class) of the linkage error.Target
element is present, the matcher checks the target (the referenced class) of the linkage error.A Source
or Target
element takes one of Class
, Artifact
, and Package
element.
This looks good. Should the target be an artifact or a class or both? I think we'll also need the specific method or field being linked to.
Similar to https://github.com/GoogleCloudPlatform/cloud-opensource-java/issues/940 but intended to suppress (or ignore) existing linkage errors, rather than special cases.
From Luke's comment in BEAM-9206:
Case of Spotbugs-filter
Beam's use case of spotbugs-filter.xml is https://github.com/apache/beam/blob/master/sdks/java/build-tools/src/main/resources/beam/spotbugs-filter.xml