Skip to content

Commit 50b08ee

Browse files
authored
Delete protobuf-nano
Nano was dropped from upstream protobuf. See gRFC L51
1 parent b6720c9 commit 50b08ee

File tree

21 files changed

+73
-1703
lines changed

21 files changed

+73
-1703
lines changed

.gitattributes

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
TestService.java.txt binary
22
TestServiceLite.java.txt binary
3-
TestServiceNano.java.txt binary
43
TestDeprecatedService.java.txt binary
54
TestDeprecatedServiceLite.java.txt binary
6-
TestDeprecatedServiceNano.java.txt binary

RELEASING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ would be used to create all `v1.7` tags (e.g. `v1.7.0`, `v1.7.1`).
7070
$ sed -i 's/[0-9]\+\.[0-9]\+\.[0-9]\+\(.*CURRENT_GRPC_VERSION\)/'$MAJOR.$((MINOR+1)).0'\1/' \
7171
"${VERSION_FILES[@]}"
7272
$ sed -i s/$MAJOR.$MINOR.$PATCH/$MAJOR.$((MINOR+1)).0/ \
73-
compiler/src/test{,Lite,Nano}/golden/Test{,Deprecated}Service.java.txt
73+
compiler/src/test{,Lite}/golden/Test{,Deprecated}Service.java.txt
7474
$ ./gradlew build
7575
$ git commit -a -m "Start $MAJOR.$((MINOR+1)).0 development cycle"
7676
```
@@ -126,7 +126,7 @@ Tagging the Release
126126
```bash
127127
# Change version to remove -SNAPSHOT
128128
$ sed -i 's/-SNAPSHOT\(.*CURRENT_GRPC_VERSION\)/\1/' "${VERSION_FILES[@]}"
129-
$ sed -i s/-SNAPSHOT// compiler/src/test{,Lite,Nano}/golden/Test{,Deprecated}Service.java.txt
129+
$ sed -i s/-SNAPSHOT// compiler/src/test{,Lite}/golden/Test{,Deprecated}Service.java.txt
130130
$ ./gradlew build
131131
$ git commit -a -m "Bump version to $MAJOR.$MINOR.$PATCH"
132132
$ git tag -a v$MAJOR.$MINOR.$PATCH -m "Version $MAJOR.$MINOR.$PATCH"
@@ -139,7 +139,7 @@ Tagging the Release
139139
$ sed -i 's/[0-9]\+\.[0-9]\+\.[0-9]\+\(.*CURRENT_GRPC_VERSION\)/'$MAJOR.$MINOR.$((PATCH+1))-SNAPSHOT'\1/' \
140140
"${VERSION_FILES[@]}"
141141
$ sed -i s/$MAJOR.$MINOR.$PATCH/$MAJOR.$MINOR.$((PATCH+1))-SNAPSHOT/ \
142-
compiler/src/test{,Lite,Nano}/golden/Test{,Deprecated}Service.java.txt
142+
compiler/src/test{,Lite}/golden/Test{,Deprecated}Service.java.txt
143143
$ ./gradlew build
144144
$ git commit -a -m "Bump version to $MAJOR.$MINOR.$((PATCH+1))-SNAPSHOT"
145145
```

all/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ def subprojects = [
1919
project(':grpc-okhttp'),
2020
project(':grpc-protobuf'),
2121
project(':grpc-protobuf-lite'),
22-
project(':grpc-protobuf-nano'),
2322
project(':grpc-stub'),
2423
project(':grpc-testing'),
2524
]

build.gradle

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ subprojects {
111111
guavaVersion = '26.0-android'
112112
protobufVersion = '3.7.1'
113113
protocVersion = protobufVersion
114-
protobufNanoVersion = '3.0.0-alpha-5'
115114
opencensusVersion = '0.21.0'
116115

117116
configureProtoCompilation = {
@@ -210,8 +209,6 @@ subprojects {
210209
protobuf: "com.google.protobuf:protobuf-java:${protobufVersion}",
211210
protobuf_lite: "com.google.protobuf:protobuf-lite:3.0.1",
212211
protoc_lite: "com.google.protobuf:protoc-gen-javalite:3.0.0",
213-
protobuf_nano: "com.google.protobuf.nano:protobuf-javanano:${protobufNanoVersion}",
214-
protoc_nano: "com.google.protobuf:protoc:3.5.1-1",
215212
protobuf_plugin: 'com.google.protobuf:protobuf-gradle-plugin:0.8.8',
216213
protobuf_util: "com.google.protobuf:protobuf-java-util:${protobufVersion}",
217214
lang: "org.apache.commons:commons-lang3:3.5",
@@ -386,7 +383,6 @@ subprojects {
386383
"grpc-stub",
387384
"grpc-protobuf",
388385
"grpc-protobuf-lite",
389-
"grpc-protobuf-nano"
390386
])) {
391387
asNode().dependencies.'*'.findAll() { dep ->
392388
dep.artifactId.text() in ['grpc-api', 'grpc-core']
@@ -461,7 +457,6 @@ def publicApiSubprojects = [
461457
':grpc-okhttp',
462458
':grpc-protobuf',
463459
':grpc-protobuf-lite',
464-
':grpc-protobuf-nano',
465460
':grpc-stub',
466461
':grpc-testing',
467462
]

compiler/README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,6 @@ To generate Java interfaces with protobuf lite:
4242
$ protoc --plugin=protoc-gen-grpc-java=build/exe/java_plugin/protoc-gen-grpc-java \
4343
--grpc-java_out=lite:"$OUTPUT_FILE" --proto_path="$DIR_OF_PROTO_FILE" "$PROTO_FILE"
4444
```
45-
To generate Java interfaces with protobuf nano:
46-
```
47-
$ protoc --plugin=protoc-gen-grpc-java=build/exe/java_plugin/protoc-gen-grpc-java \
48-
--grpc-java_out=nano:"$OUTPUT_FILE" --proto_path="$DIR_OF_PROTO_FILE" "$PROTO_FILE"
49-
```
5045

5146
## Installing the codegen to Maven local repository
5247
This will compile a codegen and put it under your ``~/.m2/repository``. This

compiler/build.gradle

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ model {
125125

126126
configurations {
127127
testLiteCompile
128-
testNanoCompile
129128
}
130129

131130
dependencies {
@@ -135,18 +134,12 @@ dependencies {
135134
testLiteCompile project(':grpc-protobuf-lite'),
136135
project(':grpc-stub'),
137136
libraries.javax_annotation
138-
testNanoCompile project(':grpc-protobuf-nano'),
139-
project(':grpc-stub'),
140-
libraries.javax_annotation
141137
}
142138

143139
sourceSets {
144140
testLite {
145141
proto { setSrcDirs(['src/test/proto']) }
146142
}
147-
testNano {
148-
proto { setSrcDirs(['src/test/proto']) }
149-
}
150143
}
151144

152145
compileTestJava {
@@ -167,20 +160,12 @@ compileTestLiteJava {
167160
options.errorprone.excludedPaths = ".*/build/generated/source/proto/.*"
168161
}
169162

170-
compileTestNanoJava {
171-
options.compilerArgs = compileTestJava.options.compilerArgs
172-
options.errorprone.excludedPaths = ".*/build/generated/source/proto/.*"
173-
}
174-
175163
protobuf {
176164
protoc {
177165
if (project.hasProperty('protoc')) {
178166
path = project.protoc
179167
} else {
180-
// Since nano is removed from newer versions of protoc, use an older version for the
181-
// while. This means we won't be able to test any descriptor.proto additions, but that
182-
// should be fine for a while.
183-
artifact = libraries.protoc_nano
168+
artifact = "com.google.protobuf:protoc:${protocVersion}"
184169
}
185170
}
186171
plugins {
@@ -206,20 +191,9 @@ protobuf {
206191
grpc { option 'lite' }
207192
}
208193
}
209-
ofSourceSet('testNano').each { task ->
210-
task.builtins {
211-
remove java
212-
javanano { option 'ignore_services=true' }
213-
}
214-
task.plugins { grpc { option 'nano' } }
215-
}
216194
}
217195
}
218196

219-
checkstyleTestNano {
220-
source = fileTree(dir: "src/testNano", include: "**/*.java")
221-
}
222-
223197
println "*** Building codegen requires Protobuf version ${protocVersion}"
224198
println "*** Please refer to https://github.com/grpc/grpc-java/blob/master/COMPILING.md#how-to-build-code-generation-plugin"
225199

@@ -320,13 +294,9 @@ def configureTestTask(Task task, String dep, String extraPackage, String service
320294

321295
task testGolden(type: Exec)
322296
task testLiteGolden(type: Exec)
323-
task testNanoGolden(type: Exec)
324297
task testDeprecatedGolden(type: Exec)
325298
task testDeprecatedLiteGolden(type: Exec)
326-
task testDeprecatedNanoGolden(type: Exec)
327299
configureTestTask(testGolden, '', '', 'TestService')
328300
configureTestTask(testLiteGolden, 'Lite', '', 'TestService')
329-
configureTestTask(testNanoGolden, 'Nano', '/nano', 'TestService')
330301
configureTestTask(testDeprecatedGolden, '', '', 'TestDeprecatedService')
331302
configureTestTask(testDeprecatedLiteGolden, 'Lite', '', 'TestDeprecatedService')
332-
configureTestTask(testDeprecatedNanoGolden, 'Nano', '/nano', 'TestDeprecatedService')

0 commit comments

Comments
 (0)