grpc / grpc-java

The Java gRPC implementation. HTTP/2 based RPC
https://grpc.io/docs/languages/java/
Apache License 2.0
11.39k stars 3.83k forks source link

Artifacts should depend on particular version of grpc-core #1459

Closed ejona86 closed 8 years ago

ejona86 commented 8 years ago

grpc-core contains internal, unstable APIs. To prevent accidentally mis-matching artifact versions (say grpc-netty-0.12.0 coming from one source of dependencies and grpc-core-0.13.0 coming from another), any artifacts that depend on grpc-core should use [$VERSION] syntax instead of $VERSION to cause an error (because grpc-netty-0.12.0 can only use grpc-core-0.12.0; core shouldn't be silently upgraded) instead of runtime failure. Note that #1447 improves things, since something like grpc-stub and grpc-protobuf could depend just on grpc-api instead of a version-fixed grpc-core.

The syntax seems to be supported by Maven, maybe Gradle, and Ivy, but we may need to do some verification and additional investigation, since it isn't commonly used.

Other resources: http://www.mojohaus.org/versions-maven-plugin/examples/resolve-ranges.html http://guntherpopp.blogspot.com/2011/02/understanding-maven-dependency.html http://guntherpopp.blogspot.com/2011/03/understanding-maven-dependency.html

ejona86 commented 8 years ago

We should also use the [] syntax for the version of Netty we use, since breaking changes are frequent in the http2 codec.