actions-on-google / actions-on-google-java

Java/Kotlin library for Actions on Google
Apache License 2.0
287 stars 39 forks source link

Consistency of "grpc" dependencies between actions-on-google-java and google-cloud-dialogflow #29

Closed cbeaujoin closed 5 years ago

cbeaujoin commented 5 years ago

Hello,

I use actions-on-google-java and google-cloud-dialogflow, for several purposes but mainly in order to manage session entities.

There is a dependency conflict between those two packages that use a different version of grpc libs.

There is a solution that consist to specify the latest grpc version in our pom :

         <!-- grpc -->
        <dependency>
            <groupId>io.grpc</groupId>
            <artifactId>grpc-core</artifactId>
            <version>1.21.0</version>
        </dependency>
        <dependency>
            <groupId>io.grpc</groupId>
            <artifactId>grpc-protobuf</artifactId>
            <version>1.21.0</version>
        </dependency>
        <dependency>
            <groupId>io.grpc</groupId>
            <artifactId>grpc-stub</artifactId>
            <version>1.21.0</version>
        </dependency>
        <dependency>
            <groupId>io.grpc</groupId>
            <artifactId>grpc-auth</artifactId>
            <version>1.21.0</version>
        </dependency>
        <!-- Dialogflow -->
        <dependency>
            <groupId>com.google.cloud</groupId>
            <artifactId>google-cloud-dialogflow</artifactId>
            <version>0.104.0-alpha</version>
        </dependency>
        <dependency>
            <groupId>com.google.actions</groupId>
            <artifactId>actions-on-google</artifactId>
            <version>1.5.0</version>
        </dependency>

Could the actions-on-google-java project use the same version than google-cloud-dialogflow in order to avoid to specify grpc in our pom.

Fleker commented 5 years ago

From the Dialogflow pom.xml I'm not sure what version of gRPC it is depending on.

While we can make this lib use 1.21, would this problem just recur a bit later once there's a gRPC 1.22?

cbeaujoin commented 5 years ago

Yes the problem should occur when the dialogflow team will upgrade to 1.22.

FYI using mvn dependency:analyze :

Could not resolve dependencies for project : 
Failed to collect dependencies: 
Could not resolve version conflict among 
[
com.google.cloud:google-cloud-dialogflow:jar:0.104.0-alpha -> com.google.cloud:google-cloud-core-grpc:jar:1.86.0 -> com.google.api:gax-grpc:jar:1.47.1 -> io.grpc:grpc-netty-shaded:jar:1.21.0 -> io.grpc:grpc-core:jar:[1.21.0,1.21.0], 

com.google.cloud:google-cloud-dialogflow:jar:0.104.0-alpha -> com.google.cloud:google-cloud-core-grpc:jar:1.86.0 -> com.google.api:gax-grpc:jar:1.47.1 -> io.grpc:grpc-alts:jar:1.21.0 -> io.grpc:grpc-grpclb:jar:1.21.0 -> io.grpc:grpc-core:jar:[1.21.0,1.21.0], 

com.google.cloud:google-cloud-dialogflow:jar:0.104.0-alpha -> com.google.cloud:google-cloud-core-grpc:jar:1.86.0 -> com.google.api:gax-grpc:jar:1.47.1 -> io.grpc:grpc-alts:jar:1.21.0 -> io.grpc:grpc-core:jar:[1.21.0,1.21.0], 

com.google.actions:actions-on-google:jar:1.5.0 -> io.grpc:grpc-protobuf:jar:1.15.1 -> io.grpc:grpc-core:jar:1.15.1, 

com.google.actions:actions-on-google:jar:1.5.0 -> io.grpc:grpc-protobuf:jar:1.15.1 -> io.grpc:grpc-protobuf-lite:jar:1.15.1 -> io.grpc:grpc-core:jar:1.15.1, 

com.google.actions:actions-on-google:jar:1.5.0 -> io.grpc:grpc-stub:jar:1.15.1 -> io.grpc:grpc-core:jar:1.15.1, com.google.actions:actions-on-google:jar:1.5.0 -> io.grpc:grpc-auth:jar:1.15.1 -> io.grpc:grpc-core:jar:[1.15.1,1.15.1]
] 
Fleker commented 5 years ago

In the short-term I guess we should be able to bump the dependency. In the longer-term I do wonder if there would be some sort of advantage to moving to to the same google-cloud-core-grpc library.