Skip to content

Commit 90db93b

Browse files
committed
Pin versions on unstable packages: grpc-core internal and netty
The internal package is very unstable, so any users of it are not compatible with alternative versions of grpc-core. The same is true for HTTP/2 support in Netty. This primarily helps Maven users; Gradle appears to ignore the distinction between '$version' and '[$version]' and does not trigger a build failure. Projects like grpc-stub don't depend on internal, so they aren't using the version pinning. The whitelist is a bit prone to go out-of-date, but introducing grpc-api would be the long-term solution. Fixes #1459
1 parent 0ed059a commit 90db93b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

build.gradle

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ subprojects {
137137
protobuf_plugin: 'com.google.protobuf:protobuf-gradle-plugin:0.7.4',
138138
protobuf_util: "com.google.protobuf:protobuf-java-util:${protobufVersion}",
139139

140-
netty: 'io.netty:netty-codec-http2:4.1.0.CR6',
140+
netty: 'io.netty:netty-codec-http2:[4.1.0.CR6]',
141141
netty_epoll: 'io.netty:netty-transport-native-epoll:4.1.0.CR6' + epoll_suffix,
142142
netty_tcnative: 'io.netty:netty-tcnative-boringssl-static:1.1.33.Fork15:' + osdetector.classifier,
143143

@@ -272,6 +272,14 @@ subprojects {
272272
}
273273
}
274274
}
275+
if (!(project.name in
276+
["grpc-stub", "grpc-protobuf", "grpc-protobuf-lite", "grpc-protobuf-nano"])) {
277+
def core = pom.dependencies.find {dep -> dep.artifactId == 'grpc-core'}
278+
if (core != null) {
279+
// Depend on specific version of grpc-core because internal package is unstable
280+
core.version = "[" + core.version + "]"
281+
}
282+
}
275283
}
276284
// At a test failure, log the stack trace to the console so that we don't
277285
// have to open the HTML in a browser.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy