Skip to content
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

Would you clean up dependency tree? #507

Closed
suztomo opened this issue May 25, 2021 · 4 comments · Fixed by #510 or #512
Closed

Would you clean up dependency tree? #507

suztomo opened this issue May 25, 2021 · 4 comments · Fixed by #510 or #512
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@suztomo
Copy link
Contributor

suztomo commented May 25, 2021

Feature Description

I tried to add the the libraries in this repository into the BOM (GoogleCloudPlatform/cloud-opensource-java#2073) but the tool detected there's transitive dependencies that are not available in Maven Central:

xerces:xerces-impl:jar:2.6.2 was not resolved. Dependency path: com.google.cloud.sql:cloud-sql-connector-r2dbc-core:jar:1.2.3 (compile) > io.projectreactor.netty:reactor-netty:jar:1.0.6 (compile) > io.projectreactor.netty:reactor-netty-core:jar:1.0.6 (compile) > io.micrometer:micrometer-core:jar:1.5.0 (compile?) > com.hazelcast:hazelcast:jar:4.0.1 (compile?) > org.codehaus.groovy:groovy-all:jar:2.1.8 (provided?) > com.thoughtworks.xstream:xstream:jar:1.4.2 (compile?) > cglib:cglib-nodep:jar:2.2 (compile?) > ant:ant:jar:1.6.2 (compile?) > xerces:xerces-impl:jar:2.6.2 (compile?)
xml-apis:xml-apis:jar:2.6.2 was not resolved. Dependency path: com.google.cloud.sql:cloud-sql-connector-r2dbc-core:jar:1.2.3 (compile) > io.projectreactor.netty:reactor-netty:jar:1.0.6 (compile) > io.projectreactor.netty:reactor-netty-core:jar:1.0.6 (compile) > io.micrometer:micrometer-core:jar:1.5.0 (compile?) > com.hazelcast:hazelcast:jar:4.0.1 (compile?) > org.codehaus.groovy:groovy-all:jar:2.1.8 (provided?) > com.thoughtworks.xstream:xstream:jar:1.4.2 (compile?) > cglib:cglib-nodep:jar:2.2 (compile?) > ant:ant:jar:1.6.2 (compile?) > xml-apis:xml-apis:jar:2.6.2 (compile?)
maven-plugins:maven-cobertura-plugin:plugin:1.3 was not resolved. Dependency path: com.google.cloud.sql:cloud-sql-connector-r2dbc-core:jar:1.2.3 (compile) > io.projectreactor.netty:reactor-netty:jar:1.0.6 (compile) > io.projectreactor.netty:reactor-netty-core:jar:1.0.6 (compile) > io.micrometer:micrometer-core:jar:1.5.0 (compile?) > ch.qos.logback:logback-classic:jar:1.2.3 (compile?) > org.codehaus.groovy:groovy-all:jar:2.4.0 (compile?) > com.thoughtworks.xstream:xstream:jar:1.4.7 (compile?) > org.jdom:jdom:jar:1.1.3 (compile?) > jaxen:jaxen:jar:1.1.3 (compile?) > dom4j:dom4j:jar:1.6.1 (compile) > jaxen:jaxen:jar:1.1-beta-6 (compile?) > jdom:jdom:jar:1.0 (compile) > jaxen:jaxen:jar:1.0-FCS (compile?) > maven-plugins:maven-cobertura-plugin:plugin:1.3 (compile)
maven-plugins:maven-findbugs-plugin:plugin:1.3.1 was not resolved. Dependency path: com.google.cloud.sql:cloud-sql-connector-r2dbc-core:jar:1.2.3 (compile) > io.projectreactor.netty:reactor-netty:jar:1.0.6 (compile) > io.projectreactor.netty:reactor-netty-core:jar:1.0.6 (compile) > io.micrometer:micrometer-core:jar:1.5.0 (compile?) > ch.qos.logback:logback-classic:jar:1.2.3 (compile?) > org.codehaus.groovy:groovy-all:jar:2.4.0 (compile?) > com.thoughtworks.xstream:xstream:jar:1.4.7 (compile?) > org.jdom:jdom:jar:1.1.3 (compile?) > jaxen:jaxen:jar:1.1.3 (compile?) > dom4j:dom4j:jar:1.6.1 (compile) > jaxen:jaxen:jar:1.1-beta-6 (compile?) > jdom:jdom:jar:1.0 (compile) > jaxen:jaxen:jar:1.0-FCS (compile?) > maven-plugins:maven-findbugs-plugin:plugin:1.3.1 (compile)
com.jcraft:jsch.agentproxy:jar:0.0.6 was not resolved. Dependency path: com.google.cloud.sql:cloud-sql-connector-r2dbc-core:jar:1.2.3 (compile) > io.projectreactor.netty:reactor-netty:jar:1.0.6 (compile) > io.projectreactor.netty:reactor-netty-core:jar:1.0.6 (compile) > io.micrometer:micrometer-core:jar:1.5.0 (compile?) > ch.qos.logback:logback-classic:jar:1.2.3 (compile?) > org.codehaus.groovy:groovy-all:jar:2.4.0 (compile?) > org.apache.ivy:ivy:jar:2.4.0 (compile?) > com.jcraft:jsch.agentproxy:jar:0.0.6 (compile?)
org.jruby.joni:joni:jar:2.1.1-SNAPSHOT was not resolved. Dependency path: com.google.cloud.sql:cloud-sql-connector-r2dbc-core:jar:1.2.3 (compile) > io.projectreactor.netty:reactor-netty:jar:1.0.6 (compile) > io.projectreactor.netty:reactor-netty-core:jar:1.0.6 (compile) > io.micrometer:micrometer-core:jar:1.5.0 (compile?) > com.hazelcast:hazelcast:jar:4.0.1 (compile?) > org.jruby:jruby-complete:jar:1.7.22 (provided?) > org.jruby:jruby-core:jar:noasm:1.7.22 (provided) > org.jruby:yecht:jar:1.0 (compile) > org.jruby:jruby-core:jar:1.7.9 (provided) > org.jruby.joni:joni:jar:2.1.1-SNAPSHOT (compile)

Would you cleanup the dependency tree (probably excluding unnecessary dependencies)?

Alternatives Considered

N/A

Additional Context

Linkage Checker enforcer rule should reproduce the same error above:

https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/Linkage-Checker-Enforcer-Rule

@suztomo suztomo added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label May 25, 2021
@shubha-rajan shubha-rajan added the priority: p2 Moderately-important priority. Fix may not be included in next release. label May 25, 2021
@shubha-rajan
Copy link
Contributor

Thanks for catching this and opening the issue! I'll investigate further and see if we can exclude some of these dependencies.

@shubha-rajan
Copy link
Contributor

shubha-rajan commented May 27, 2021

hi @suztomo, I'm trying to reproduce the error you posted by adding the linkage checker to the enforcer rules, but I'm getting a lot of extra errors. This is the result after upgrading to v1.5.9 of linkage-checker-enforcer-rules. I thinks the failures might be related to GoogleCloudPlatform/cloud-opensource-java#1983. I pushed changes I made to the cleanup-dep-tree branch of this repo if you want to take a look. Based on the info you provided, I was able to exclude the optional dependency that's causing the errors, but I'm not sure if that fixes the problem since I can't get the linkage checker to work.

[ERROR] Linkage Checker rule found 35 reachable errors:
Class kotlin.jvm.internal.Intrinsics is not found;
  referenced by 4 class files
    reactor.core.publisher.FluxExtensionsKt (io.projectreactor:reactor-core:3.4.6)
    reactor.core.publisher.MonoExtensionsKt (io.projectreactor:reactor-core:3.4.6)
    reactor.core.publisher.MonoWhenFunctionsKt (io.projectreactor:reactor-core:3.4.6)
    reactor.util.function.TupleExtensionsKt (io.projectreactor:reactor-core:3.4.6)
  Cause:
    Unknown
Class kotlin.jvm.functions.Function1 is not found;
  referenced by 3 class files
    reactor.core.publisher.FluxExtensionsKt (io.projectreactor:reactor-core:3.4.6)
    reactor.core.publisher.MonoExtensionsKt (io.projectreactor:reactor-core:3.4.6)
    reactor.core.publisher.MonoWhenFunctionsKt (io.projectreactor:reactor-core:3.4.6)
  Cause:
    Unknown
Class kotlin.jvm.functions.Function0 is not found;
  referenced by 2 class files
    reactor.core.publisher.FluxExtensionsKt (io.projectreactor:reactor-core:3.4.6)
    reactor.core.publisher.MonoExtensionsKt (io.projectreactor:reactor-core:3.4.6)
  Cause:
    Unknown
Class kotlin.jvm.internal.markers.KMappedMarker is not found;
  referenced by 1 class file
    reactor.core.publisher.FluxExtensionsKt (io.projectreactor:reactor-core:3.4.6)
  Cause:
    Unknown
Class kotlin.sequences.Sequence is not found;
  referenced by 1 class file
    reactor.core.publisher.FluxExtensionsKt (io.projectreactor:reactor-core:3.4.6)
  Cause:
    Unknown
Class kotlin.collections.ArraysKt is not found;
  referenced by 2 class files
    reactor.core.publisher.FluxExtensionsKt (io.projectreactor:reactor-core:3.4.6)
    reactor.core.publisher.MonoWhenFunctionsKt (io.projectreactor:reactor-core:3.4.6)
  Cause:
    Unknown
Class kotlin.jvm.JvmClassMappingKt is not found;
  referenced by 2 class files
    reactor.core.publisher.FluxExtensionsKt (io.projectreactor:reactor-core:3.4.6)
    reactor.core.publisher.MonoExtensionsKt (io.projectreactor:reactor-core:3.4.6)
  Cause:
    Unknown
Class io.micrometer.core.instrument.Timer$Sample is not found;
  referenced by 2 class files
    reactor.core.publisher.FluxMetrics (io.projectreactor:reactor-core:3.4.6)
    reactor.core.publisher.MonoMetrics (io.projectreactor:reactor-core:3.4.6)
  Cause:
    Unknown
Class io.micrometer.core.instrument.MeterRegistry is not found;
  referenced by 2 class files
    reactor.core.publisher.FluxMetrics (io.projectreactor:reactor-core:3.4.6)
    reactor.core.scheduler.SchedulerMetricDecorator (io.projectreactor:reactor-core:3.4.6)
  Cause:
    Unknown
Class io.micrometer.core.instrument.Clock is not found;
  referenced by 4 class files
    reactor.core.publisher.FluxMetrics (io.projectreactor:reactor-core:3.4.6)
    reactor.core.publisher.FluxMetricsFuseable (io.projectreactor:reactor-core:3.4.6)
    reactor.core.publisher.MonoMetrics (io.projectreactor:reactor-core:3.4.6)
    reactor.core.publisher.MonoMetricsFuseable (io.projectreactor:reactor-core:3.4.6)
  Cause:
    Unknown
Class io.micrometer.core.instrument.Tags is not found;
  referenced by 2 class files
    reactor.core.publisher.FluxMetrics (io.projectreactor:reactor-core:3.4.6)
    reactor.core.scheduler.SchedulerMetricDecorator (io.projectreactor:reactor-core:3.4.6)
  Cause:
    Unknown
Class io.micrometer.core.instrument.Timer is not found;
  referenced by 5 class files
    reactor.core.publisher.FluxMetrics (io.projectreactor:reactor-core:3.4.6)
    reactor.core.publisher.FluxMetricsFuseable (io.projectreactor:reactor-core:3.4.6)
    reactor.core.publisher.MonoMetrics (io.projectreactor:reactor-core:3.4.6)
    reactor.core.publisher.MonoMetricsFuseable (io.projectreactor:reactor-core:3.4.6)
    reactor.netty.channel.MicrometerChannelMetricsRecorder (io.projectreactor.netty:reactor-netty-core:1.0.7)
  Cause:
    Unknown
    The valid symbol is in io.micrometer:micrometer-core:jar:1.5.0 at io.projectreactor.netty:reactor-netty:1.0.7 (compile) / io.projectreactor.netty:reactor-netty-core:1.0.7 (compile) / io.micrometer:micrometer-core:1.5.0 (compile, optional) but it was not selected because the path contains an optional dependency
Class io.micrometer.core.instrument.Timer$Builder is not found;
  referenced by 2 class files
    reactor.core.publisher.FluxMetrics (io.projectreactor:reactor-core:3.4.6)
    reactor.netty.channel.MicrometerChannelMetricsRecorder (io.projectreactor.netty:reactor-netty-core:1.0.7)
  Cause:
    Unknown
    The valid symbol is in io.micrometer:micrometer-core:jar:1.5.0 at io.projectreactor.netty:reactor-netty:1.0.7 (compile) / io.projectreactor.netty:reactor-netty-core:1.0.7 (compile) / io.micrometer:micrometer-core:1.5.0 (compile, optional) but it was not selected because the path contains an optional dependency
Class io.micrometer.core.instrument.DistributionSummary is not found;
  referenced by 2 class files
    reactor.core.publisher.FluxMetrics (io.projectreactor:reactor-core:3.4.6)
    reactor.netty.channel.MicrometerChannelMetricsRecorder (io.projectreactor.netty:reactor-netty-core:1.0.7)
  Cause:
    Unknown
    The valid symbol is in io.micrometer:micrometer-core:jar:1.5.0 at io.projectreactor.netty:reactor-netty:1.0.7 (compile) / io.projectreactor.netty:reactor-netty-core:1.0.7 (compile) / io.micrometer:micrometer-core:1.5.0 (compile, optional) but it was not selected because the path contains an optional dependency
Class io.micrometer.core.instrument.DistributionSummary$Builder is not found;
  referenced by 2 class files
    reactor.core.publisher.FluxMetrics (io.projectreactor:reactor-core:3.4.6)
    reactor.netty.channel.MicrometerChannelMetricsRecorder (io.projectreactor.netty:reactor-netty-core:1.0.7)
  Cause:
    Unknown
    The valid symbol is in io.micrometer:micrometer-core:jar:1.5.0 at io.projectreactor.netty:reactor-netty:1.0.7 (compile) / io.projectreactor.netty:reactor-netty-core:1.0.7 (compile) / io.micrometer:micrometer-core:1.5.0 (compile, optional) but it was not selected because the path contains an optional dependency
Class io.micrometer.core.instrument.Tag is not found;
  referenced by 1 class file
    reactor.core.publisher.FluxMetrics (io.projectreactor:reactor-core:3.4.6)
  Cause:
    Unknown
Class io.micrometer.core.instrument.Counter is not found;
  referenced by 2 class files
    reactor.core.publisher.FluxMetrics (io.projectreactor:reactor-core:3.4.6)
    reactor.netty.channel.MicrometerChannelMetricsRecorder (io.projectreactor.netty:reactor-netty-core:1.0.7)
  Cause:
    Unknown
    The valid symbol is in io.micrometer:micrometer-core:jar:1.5.0 at io.projectreactor.netty:reactor-netty:1.0.7 (compile) / io.projectreactor.netty:reactor-netty-core:1.0.7 (compile) / io.micrometer:micrometer-core:1.5.0 (compile, optional) but it was not selected because the path contains an optional dependency
Class io.micrometer.core.instrument.Counter$Builder is not found;
  referenced by 2 class files
    reactor.core.publisher.FluxMetrics (io.projectreactor:reactor-core:3.4.6)
    reactor.netty.channel.MicrometerChannelMetricsRecorder (io.projectreactor.netty:reactor-netty-core:1.0.7)
  Cause:
    Unknown
    The valid symbol is in io.micrometer:micrometer-core:jar:1.5.0 at io.projectreactor.netty:reactor-netty:1.0.7 (compile) / io.projectreactor.netty:reactor-netty-core:1.0.7 (compile) / io.micrometer:micrometer-core:1.5.0 (compile, optional) but it was not selected because the path contains an optional dependency
Class kotlin.jvm.internal.FunctionReference is not found;
  referenced by 1 class file
    reactor.core.publisher.MonoExtensionsKt (io.projectreactor:reactor-core:3.4.6)
  Cause:
    Unknown
Class kotlin.jvm.internal.Reflection is not found;
  referenced by 1 class file
    reactor.core.publisher.MonoExtensionsKt (io.projectreactor:reactor-core:3.4.6)
  Cause:
    Unknown
Class kotlin.TypeCastException is not found;
  referenced by 1 class file
    reactor.core.publisher.MonoWhenFunctionsKt (io.projectreactor:reactor-core:3.4.6)
  Cause:
    Unknown
Class reactor.blockhound.integration.BlockHoundIntegration is not found;
  referenced by 1 class file
    reactor.core.scheduler.ReactorBlockHoundIntegration (io.projectreactor:reactor-core:3.4.6)
  Cause:
    Unknown
Class reactor.blockhound.BlockHound$Builder is not found;
  referenced by 1 class file
    reactor.core.scheduler.ReactorBlockHoundIntegration (io.projectreactor:reactor-core:3.4.6)
  Cause:
    Unknown
Class io.micrometer.core.instrument.binder.jvm.ExecutorServiceMetrics is not found;
  referenced by 1 class file
    reactor.core.scheduler.SchedulerMetricDecorator (io.projectreactor:reactor-core:3.4.6)
  Cause:
    Unknown
Class io.micrometer.core.instrument.search.Search is not found;
  referenced by 1 class file
    reactor.core.scheduler.SchedulerMetricDecorator (io.projectreactor:reactor-core:3.4.6)
  Cause:
    Unknown
Class io.micrometer.core.instrument.Metrics is not found;
  referenced by 2 class files
    reactor.util.Metrics (io.projectreactor:reactor-core:3.4.6)
    reactor.netty.Metrics (io.projectreactor.netty:reactor-netty-core:1.0.7)
  Cause:
    Unknown
    The valid symbol is in io.micrometer:micrometer-core:jar:1.5.0 at io.projectreactor.netty:reactor-netty:1.0.7 (compile) / io.projectreactor.netty:reactor-netty-core:1.0.7 (compile) / io.micrometer:micrometer-core:1.5.0 (compile, optional) but it was not selected because the path contains an optional dependency
Class io.micrometer.core.instrument.composite.CompositeMeterRegistry is not found;
  referenced by 1 class file
    reactor.util.Metrics (io.projectreactor:reactor-core:3.4.6)
  Cause:
    Unknown
Class io.micrometer.core.instrument.noop.NoopMeter is not found;
  referenced by 1 class file
    reactor.netty.channel.MicrometerChannelMetricsRecorder (io.projectreactor.netty:reactor-netty-core:1.0.7)
  Cause:
    The valid symbol is in io.micrometer:micrometer-core:jar:1.5.0 at io.projectreactor.netty:reactor-netty:1.0.7 (compile) / io.projectreactor.netty:reactor-netty-core:1.0.7 (compile) / io.micrometer:micrometer-core:1.5.0 (compile, optional) but it was not selected because the path contains an optional dependency
Class io.micrometer.core.instrument.Gauge$Builder is not found;
  referenced by 2 class files
    reactor.netty.resources.MicrometerPooledConnectionProviderMeterRegistrar (io.projectreactor.netty:reactor-netty-core:1.0.7)
    reactor.netty.transport.ByteBufAllocatorMetrics (io.projectreactor.netty:reactor-netty-core:1.0.7)
  Cause:
    The valid symbol is in io.micrometer:micrometer-core:jar:1.5.0 at io.projectreactor.netty:reactor-netty:1.0.7 (compile) / io.projectreactor.netty:reactor-netty-core:1.0.7 (compile) / io.micrometer:micrometer-core:1.5.0 (compile, optional) but it was not selected because the path contains an optional dependency
Class io.micrometer.core.instrument.Gauge is not found;
  referenced by 2 class files
    reactor.netty.resources.MicrometerPooledConnectionProviderMeterRegistrar (io.projectreactor.netty:reactor-netty-core:1.0.7)
    reactor.netty.transport.ByteBufAllocatorMetrics (io.projectreactor.netty:reactor-netty-core:1.0.7)
  Cause:
    The valid symbol is in io.micrometer:micrometer-core:jar:1.5.0 at io.projectreactor.netty:reactor-netty:1.0.7 (compile) / io.projectreactor.netty:reactor-netty-core:1.0.7 (compile) / io.micrometer:micrometer-core:1.5.0 (compile, optional) but it was not selected because the path contains an optional dependency
Class org.conscrypt.HandshakeListener is not found;
  referenced by 1 class file
    io.netty.handler.ssl.ConscryptAlpnSslEngine (io.netty:netty-handler:4.1.63.Final)
  Cause:
    The valid symbol is in org.conscrypt:conscrypt-openjdk-uber:jar:2.5.1 at io.projectreactor.netty:reactor-netty:1.0.7 (compile) / io.projectreactor.netty:reactor-netty-core:1.0.7 (compile) / io.netty:netty-handler:4.1.63.Final (compile) / org.conscrypt:conscrypt-openjdk-uber:2.5.1 (compile, optional) but it was not selected because the path contains an optional dependency
Class org.conscrypt.Conscrypt is not found;
  referenced by 1 class file
    io.netty.handler.ssl.ConscryptAlpnSslEngine (io.netty:netty-handler:4.1.63.Final)
  Cause:
    The valid symbol is in org.conscrypt:conscrypt-openjdk-uber:jar:2.5.1 at io.projectreactor.netty:reactor-netty:1.0.7 (compile) / io.projectreactor.netty:reactor-netty-core:1.0.7 (compile) / io.netty:netty-handler:4.1.63.Final (compile) / org.conscrypt:conscrypt-openjdk-uber:2.5.1 (compile, optional) but it was not selected because the path contains an optional dependency
Class org.conscrypt.AllocatedBuffer is not found;
  referenced by 1 class file
    io.netty.handler.ssl.ConscryptAlpnSslEngine (io.netty:netty-handler:4.1.63.Final)
  Cause:
    The valid symbol is in org.conscrypt:conscrypt-openjdk-uber:jar:2.5.1 at io.projectreactor.netty:reactor-netty:1.0.7 (compile) / io.projectreactor.netty:reactor-netty-core:1.0.7 (compile) / io.netty:netty-handler:4.1.63.Final (compile) / org.conscrypt:conscrypt-openjdk-uber:2.5.1 (compile, optional) but it was not selected because the path contains an optional dependency
Class org.conscrypt.BufferAllocator is not found;
  referenced by 1 class file
    io.netty.handler.ssl.ConscryptAlpnSslEngine (io.netty:netty-handler:4.1.63.Final)
  Cause:
    The valid symbol is in org.conscrypt:conscrypt-openjdk-uber:jar:2.5.1 at io.projectreactor.netty:reactor-netty:1.0.7 (compile) / io.projectreactor.netty:reactor-netty-core:1.0.7 (compile) / io.netty:netty-handler:4.1.63.Final (compile) / org.conscrypt:conscrypt-openjdk-uber:2.5.1 (compile, optional) but it was not selected because the path contains an optional dependency
(io.projectreactor.netty:reactor-netty-core:1.0.7) Interface reactor.netty.resources.LoopResources's method onChannel(io.netty.channel.EventLoopGroup) is not found;
  referenced by 1 class file
    io.r2dbc.postgresql.client.ReactorNettyClient (io.r2dbc:r2dbc-postgresql:0.8.8.RELEASE)
  Cause:
    Dependency conflict: io.projectreactor.netty:reactor-netty:1.0.7 does not define Interface reactor.netty.resources.LoopResources's method onChannel(io.netty.channel.EventLoopGroup) but io.projectreactor.netty:reactor-netty:0.9.20.RELEASE defines it.
      selected: io.projectreactor.netty:reactor-netty:1.0.7 (compile)
      unselected: com.google.cloud.sql:cloud-sql-connector-r2dbc-postgres:1.2.4-SNAPSHOT (compile) / io.r2dbc:r2dbc-postgresql:0.8.8.RELEASE (provided) / io.projectreactor.netty:reactor-netty:0.9.20.RELEASE (compile)
Problematic artifacts in the dependency tree:
io.projectreactor:reactor-core:3.4.6 is at:
  io.projectreactor:reactor-core:3.4.6 (compile)
  and 25 other dependency paths.
io.projectreactor.netty:reactor-netty-core:1.0.7 is at:
  io.projectreactor.netty:reactor-netty:1.0.7 (compile) / io.projectreactor.netty:reactor-netty-core:1.0.7 (compile)
  and 14 other dependency paths.
io.netty:netty-handler:4.1.63.Final is at:
  io.projectreactor.netty:reactor-netty:1.0.7 (compile) / io.projectreactor.netty:reactor-netty-core:1.0.7 (compile) / io.netty:netty-handler:4.1.63.Final (compile)
  and 119 other dependency paths.
io.r2dbc:r2dbc-postgresql:0.8.8.RELEASE is at:
  com.google.cloud.sql:cloud-sql-connector-r2dbc-postgres:1.2.4-SNAPSHOT (compile) / io.r2dbc:r2dbc-postgresql:0.8.8.RELEASE (provided)

@suztomo
Copy link
Contributor Author

suztomo commented May 27, 2021

@shubha-rajan I see. I tried your branch and didn't face the missing artifacts problem (and saw these extra errors). The Maven enforcer rule relies on Maven to build dependency graph and therefore it does not get the same result as GoogleCloudPlatform/cloud-opensource-java#2073.

Would you try running this DependencyTreePrinter in your IDE after checking out the cloud-opensource-repository https://github.com/GoogleCloudPlatform/cloud-opensource-java/blob/master/dependencies/src/main/java/com/google/cloud/tools/opensource/dependencies/DependencyTreePrinter.java#L23 and installing 1.2.4-SNAPSHOT locally?

Screen Shot 2021-05-27 at 15 17 43

@suztomo
Copy link
Contributor Author

suztomo commented Jun 1, 2021

Thank you for the exclusion. I tried the main branch (448a353) in my local and the dependency tree looks good https://gist.github.com/suztomo/c6bb632b4af6dc8e7eb66ae35e77ae8f

I tried with the failing test (GoogleCloudPlatform/cloud-opensource-java#2073) with the snapshot version but somehow it still fails. I'll dig further and will update you.

suztomo-macbookpro44% git diff
diff --git a/boms/cloud-oss-bom/pom.xml b/boms/cloud-oss-bom/pom.xml
index b51c22d7..fcd21fbf 100644
--- a/boms/cloud-oss-bom/pom.xml
+++ b/boms/cloud-oss-bom/pom.xml
@@ -57,7 +57,7 @@
     <auth.version>0.26.0</auth.version>
     <common.protos.version>2.3.0</common.protos.version>
     <iam.protos.version>1.0.14</iam.protos.version>
-    <cloud.sql.jdbc.socket.factory.version>1.2.3</cloud.sql.jdbc.socket.factory.version>
+    <cloud.sql.jdbc.socket.factory.version>1.2.4-SNAPSHOT</cloud.sql.jdbc.socket.factory.version>
   </properties>
 
   <distributionManagement>
$ mvn install -DtrimStackTrace=false
...
[ERROR] testForNewLinkageErrors(com.google.cloud.MaximumLinkageErrorsTest)  Time elapsed: 89.098 s  <<< ERROR!
java.io.IOException: Failed to read content of /Users/suztomo/.m2/repository/xerces/xerces-impl/2.6.2/xerces-impl-2.6.2.jar
	at com.google.cloud.tools.opensource.classpath.ClassPathEntry.readFileNames(ClassPathEntry.java:114)
	at com.google.cloud.tools.opensource.classpath.ClassPathEntry.getFileNames(ClassPathEntry.java:127)
	at com.google.cloud.tools.opensource.classpath.ClassDumper.create(ClassDumper.java:95)
	at com.google.cloud.tools.opensource.classpath.LinkageChecker.create(LinkageChecker.java:84)
	at com.google.cloud.tools.opensource.classpath.LinkageChecker.create(LinkageChecker.java:117)
	at com.google.cloud.tools.opensource.classpath.LinkageChecker.create(LinkageChecker.java:100)
	at com.google.cloud.MaximumLinkageErrorsTest.testForNewLinkageErrors(MaximumLinkageErrorsTest.java:52)

Investigation

I was only looking at com.google.cloud.sql:cloud-sql-connector-r2dbc-core when I created this issue. But there are still unresolved artifacts referenced from other artifacts in this repository (cloud-sql-connector-r2dbc-mysql and cloud-sql-connector-jdbc-sqlserver).

0 = {UnresolvableArtifactProblem@6680} "org.eclipse.swt:org.eclipse.swt.gtk.linux.x86_64:jar:4.5.2 was not resolved. Dependency path: null > com.google.cloud.sql:cloud-sql-connector-r2dbc-mysql:jar:1.2.4-SNAPSHOT (compile) > dev.miku:r2dbc-mysql:jar:0.8.2.RELEASE (provided) > io.projectreactor.addons:reactor-extra:jar:3.3.3.RELEASE (compile) > org.eclipse.swt:org.eclipse.swt.gtk.linux.x86_64:jar:4.5.2 (compile?)"
1 = {UnresolvableArtifactProblem@6681} "com.jcraft:jsch.agentproxy:jar:0.0.6 was not resolved. Dependency path: null > com.google.cloud.sql:cloud-sql-connector-jdbc-sqlserver:jar:1.2.4-SNAPSHOT (compile) > com.microsoft.sqlserver:mssql-jdbc:jar:9.3.1.jre8-preview (compile) > com.azure:azure-security-keyvault-keys:jar:4.2.7 (compile?) > com.azure:azure-core-http-netty:jar:1.9.1 (compile) > io.projectreactor.netty:reactor-netty:jar:1.0.4 (compile) > io.projectreactor.netty:reactor-netty-core:jar:1.0.4 (compile) > io.micrometer:micrometer-core:jar:1.5.0 (compile?) > ch.qos.logback:logback-classic:jar:1.2.3 (compile?) > org.codehaus.groovy:groovy-all:jar:2.4.0 (compile?) > org.apache.ivy:ivy:jar:2.4.0 (compile?) > com.jcraft:jsch.agentproxy:jar:0.0.6 (compile?)"
2 = {UnresolvableArtifactProblem@6682} "xml-apis:xml-apis:jar:2.6.2 was not resolved. Dependency path: null > com.google.cloud.sql:cloud-sql-connector-jdbc-sqlserver:jar:1.2.4-SNAPSHOT (compile) > com.microsoft.sqlserver:mssql-jdbc:jar:9.3.1.jre8-preview (compile) > com.azure:azure-security-keyvault-keys:jar:4.2.7 (compile?) > com.azure:azure-core-http-netty:jar:1.9.1 (compile) > io.projectreactor.netty:reactor-netty:jar:1.0.4 (compile) > io.projectreactor.netty:reactor-netty-core:jar:1.0.4 (compile) > io.micrometer:micrometer-core:jar:1.5.0 (compile?) > com.hazelcast:hazelcast:jar:4.0.1 (compile?) > org.codehaus.groovy:groovy-all:jar:2.1.8 (provided?) > com.thoughtworks.xstream:xstream:jar:1.4.2 (compile?) > cglib:cglib-nodep:jar:2.2 (compile?) > ant:ant:jar:1.6.2 (compile?) > xml-apis:xml-apis:jar:2.6.2 (compile?)"
3 = {UnresolvableArtifactProblem@6683} "org.jruby.joni:joni:jar:2.1.1-SNAPSHOT was not resolved. Dependency path: null > com.google.cloud.sql:cloud-sql-connector-jdbc-sqlserver:jar:1.2.4-SNAPSHOT (compile) > com.microsoft.sqlserver:mssql-jdbc:jar:9.3.1.jre8-preview (compile) > com.azure:azure-security-keyvault-keys:jar:4.2.7 (compile?) > com.azure:azure-core-http-netty:jar:1.9.1 (compile) > io.projectreactor.netty:reactor-netty:jar:1.0.4 (compile) > io.projectreactor.netty:reactor-netty-core:jar:1.0.4 (compile) > io.micrometer:micrometer-core:jar:1.5.0 (compile?) > com.hazelcast:hazelcast:jar:4.0.1 (compile?) > org.jruby:jruby-complete:jar:1.7.22 (provided?) > org.jruby:jruby-core:jar:noasm:1.7.22 (provided) > org.jruby:yecht:jar:1.0 (compile) > org.jruby:jruby-core:jar:1.7.9 (provided) > org.jruby.joni:joni:jar:2.1.1-SNAPSHOT (compile)"
4 = {UnresolvableArtifactProblem@6684} "net.minidev:accessors-smart:jar:2.4.3 was not resolved. Dependency path: null > com.google.cloud.sql:cloud-sql-connector-jdbc-sqlserver:jar:1.2.4-SNAPSHOT (compile) > com.microsoft.sqlserver:mssql-jdbc:jar:9.3.1.jre8-preview (compile) > com.azure:azure-identity:jar:1.2.5 (compile?) > com.microsoft.azure:msal4j-persistence-extension:jar:1.1.0 (compile) > com.microsoft.azure:msal4j:jar:1.4.0 (compile) > com.nimbusds:oauth2-oidc-sdk:jar:6.5 (compile) > com.nimbusds:nimbus-jose-jwt:jar:8.21.1 (compile) > net.minidev:json-smart:jar:2.4.4 (compile) > net.minidev:accessors-smart:jar:2.4.3 (compile)"
5 = {UnresolvableArtifactProblem@6685} "io.projectreactor.tools:blockhound:jar:1.0.0.RC1 was not resolved. Dependency path: null > com.google.cloud.sql:cloud-sql-connector-r2dbc-mysql:jar:1.2.4-SNAPSHOT (compile) > dev.miku:r2dbc-mysql:jar:0.8.2.RELEASE (provided) > io.projectreactor.addons:reactor-extra:jar:3.3.3.RELEASE (compile) > io.projectreactor:reactor-core:jar:3.3.4.RELEASE (compile) > io.micrometer:micrometer-core:jar:1.3.0 (compile?) > io.projectreactor.netty:reactor-netty:jar:0.9.0.RELEASE (compile?) > io.projectreactor.tools:blockhound:jar:1.0.0.RC1 (compile?)"
6 = {UnresolvableArtifactProblem@6686} "xerces:xerces-impl:jar:2.6.2 was not resolved. Dependency path: null > com.google.cloud.sql:cloud-sql-connector-jdbc-sqlserver:jar:1.2.4-SNAPSHOT (compile) > com.microsoft.sqlserver:mssql-jdbc:jar:9.3.1.jre8-preview (compile) > com.azure:azure-security-keyvault-keys:jar:4.2.7 (compile?) > com.azure:azure-core-http-netty:jar:1.9.1 (compile) > io.projectreactor.netty:reactor-netty:jar:1.0.4 (compile) > io.projectreactor.netty:reactor-netty-core:jar:1.0.4 (compile) > io.micrometer:micrometer-core:jar:1.5.0 (compile?) > com.hazelcast:hazelcast:jar:4.0.1 (compile?) > org.codehaus.groovy:groovy-all:jar:2.1.8 (provided?) > com.thoughtworks.xstream:xstream:jar:1.4.2 (compile?) > cglib:cglib-nodep:jar:2.2 (compile?) > ant:ant:jar:1.6.2 (compile?) > xerces:xerces-impl:jar:2.6.2 (compile?)"
7 = {UnresolvableArtifactProblem@6687} "maven-plugins:maven-cobertura-plugin:plugin:1.3 was not resolved. Dependency path: null > com.google.cloud.sql:cloud-sql-connector-jdbc-sqlserver:jar:1.2.4-SNAPSHOT (compile) > com.microsoft.sqlserver:mssql-jdbc:jar:9.3.1.jre8-preview (compile) > com.azure:azure-security-keyvault-keys:jar:4.2.7 (compile?) > com.azure:azure-core-http-netty:jar:1.9.1 (compile) > io.projectreactor.netty:reactor-netty:jar:1.0.4 (compile) > io.projectreactor.netty:reactor-netty-core:jar:1.0.4 (compile) > io.micrometer:micrometer-core:jar:1.5.0 (compile?) > ch.qos.logback:logback-classic:jar:1.2.3 (compile?) > org.codehaus.groovy:groovy-all:jar:2.4.0 (compile?) > com.thoughtworks.xstream:xstream:jar:1.4.7 (compile?) > org.jdom:jdom:jar:1.1.3 (compile?) > jaxen:jaxen:jar:1.1.3 (compile?) > dom4j:dom4j:jar:1.6.1 (compile) > jaxen:jaxen:jar:1.1-beta-6 (compile?) > jdom:jdom:jar:1.0 (compile) > jaxen:jaxen:jar:1.0-FCS (compile?) > maven-plugins:maven-cobertura-plugin:plugin:1.3 (compile)"
8 = {UnresolvableArtifactProblem@6688} "maven-plugins:maven-findbugs-plugin:plugin:1.3.1 was not resolved. Dependency path: null > com.google.cloud.sql:cloud-sql-connector-jdbc-sqlserver:jar:1.2.4-SNAPSHOT (compile) > com.microsoft.sqlserver:mssql-jdbc:jar:9.3.1.jre8-preview (compile) > com.azure:azure-security-keyvault-keys:jar:4.2.7 (compile?) > com.azure:azure-core-http-netty:jar:1.9.1 (compile) > io.projectreactor.netty:reactor-netty:jar:1.0.4 (compile) > io.projectreactor.netty:reactor-netty-core:jar:1.0.4 (compile) > io.micrometer:micrometer-core:jar:1.5.0 (compile?) > ch.qos.logback:logback-classic:jar:1.2.3 (compile?) > org.codehaus.groovy:groovy-all:jar:2.4.0 (compile?) > com.thoughtworks.xstream:xstream:jar:1.4.7 (compile?) > org.jdom:jdom:jar:1.1.3 (compile?) > jaxen:jaxen:jar:1.1.3 (compile?) > dom4j:dom4j:jar:1.6.1 (compile) > jaxen:jaxen:jar:1.1-beta-6 (compile?) > jdom:jdom:jar:1.0 (compile) > jaxen:jaxen:jar:1.0-FCS (compile?) > maven-plugins:maven-findbugs-plugin:plugin:1.3.1 (compile)"

Memo for myself: the errors are visible only using the debugger at LinkageChecker.

Screen Shot 2021-06-01 at 16 51 49

Even after I remove micrometer-core, there's still a dependency path to xerces-impl.

xerces:xerces-impl:jar:2.6.2 was not resolved. Dependency path: null > com.google.cloud.sql:cloud-sql-connector-jdbc-sqlserver:jar:1.2.4-SNAPSHOT (compile) > com.microsoft.sqlserver:mssql-jdbc:jar:9.3.1.jre8-preview (compile) > com.azure:azure-identity:jar:1.2.5 (compile?) > com.microsoft.azure:msal4j:jar:1.9.1 (compile) > com.nimbusds:oauth2-oidc-sdk:jar:8.23.1 (compile) > org.opensaml:opensaml-core:jar:3.4.5 (compile?) > net.shibboleth.utilities:java-support:jar:7.5.1 (compile) > ch.qos.logback:logback-classic:jar:1.2.3 (compile?) > org.codehaus.groovy:groovy-all:jar:2.4.0 (compile?) > com.thoughtworks.xstream:xstream:jar:1.4.7 (compile?) > cglib:cglib-nodep:jar:2.2 (compile?) > ant:ant:jar:1.6.2 (compile?) > xerces:xerces-impl:jar:2.6.2 (compile?)
xerces:xerces-impl:jar:2.6.2 was not resolved. Dependency path: null > com.google.cloud.sql:cloud-sql-connector-r2dbc-postgres:jar:1.2.4-SNAPSHOT (compile) > io.r2dbc:r2dbc-postgresql:jar:0.8.8.RELEASE (provided) > io.projectreactor.netty:reactor-netty:jar:0.9.20.RELEASE (compile) > io.micrometer:micrometer-core:jar:1.3.0 (compile?) > com.hazelcast:hazelcast:jar:3.12.2 (compile?) > org.codehaus.groovy:groovy-all:jar:2.1.8 (provided?) > com.thoughtworks.xstream:xstream:jar:1.4.2 (compile?) > cglib:cglib-nodep:jar:2.2 (compile?) > ant:ant:jar:1.6.2 (compile?) > xerces:xerces-impl:jar:2.6.2 (compile?)

suztomo added a commit to suztomo/cloud-sql-jdbc-socket-factory that referenced this issue Jun 1, 2021
For GoogleCloudPlatform#507

GoogleCloudPlatform/cloud-opensource-java#2073
shows MaximumLinkageErrorsTest failing due to missing xerces-impl
artifact. Explicitly excluding the dependencies that touch xerces-impl
resolves the issue.

Note that even after these exclusions, MaximumLinkageErrorsTest
fails due to new linkage errors.
suztomo added a commit to suztomo/cloud-sql-jdbc-socket-factory that referenced this issue Jun 1, 2021
For GoogleCloudPlatform#507

GoogleCloudPlatform/cloud-opensource-java#2073
shows MaximumLinkageErrorsTest failing due to missing xerces-impl
artifact. Explicitly excluding the dependencies that touch xerces-impl
resolves the issue.

Note that even after these exclusions, MaximumLinkageErrorsTest
fails due to new linkage errors.
shubha-rajan pushed a commit that referenced this issue Jun 1, 2021
For #507

GoogleCloudPlatform/cloud-opensource-java#2073
shows MaximumLinkageErrorsTest failing due to missing xerces-impl
artifact. Explicitly excluding the dependencies that touch xerces-impl
resolves the issue.

Note that even after these exclusions, MaximumLinkageErrorsTest
fails due to new linkage errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
2 participants