Skip to content
This repository was archived by the owner on Sep 18, 2023. It is now read-only.

Commit 6800fd0

Browse files
authored
deps: test building with newer library version (#453)
'No need to review.'
1 parent d232131 commit 6800fd0

File tree

102 files changed

+8156
-11456
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+8156
-11456
lines changed

.github/workflows/ci.yaml

Lines changed: 63 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,87 @@
1-
'on':
1+
# Copyright 2022 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
# Github action job to test core java library features on
15+
# downstream client libraries before they are released.
16+
on:
217
push:
318
branches:
4-
- 2.8.x
5-
pull_request: null
19+
- main
20+
pull_request:
621
name: ci
722
jobs:
823
units:
924
runs-on: ubuntu-latest
1025
strategy:
1126
fail-fast: false
1227
matrix:
13-
java:
14-
- 8
15-
- 11
16-
- 17
28+
java: [8, 11, 17]
1729
steps:
18-
- uses: actions/checkout@v3
19-
- uses: actions/setup-java@v3
20-
with:
21-
distribution: zulu
22-
java-version: ${{matrix.java}}
23-
- run: java -version
24-
- run: .kokoro/build.sh
25-
env:
26-
JOB_TYPE: test
30+
- uses: actions/checkout@v3
31+
- uses: actions/setup-java@v3
32+
with:
33+
distribution: zulu
34+
java-version: ${{matrix.java}}
35+
- run: java -version
36+
- run: .kokoro/build.sh
37+
env:
38+
JOB_TYPE: test
2739
windows:
2840
runs-on: windows-latest
2941
steps:
30-
- uses: actions/checkout@v3
31-
- uses: actions/setup-java@v3
32-
with:
33-
distribution: zulu
34-
java-version: 8
35-
- run: java -version
36-
- run: .kokoro/build.bat
37-
env:
38-
JOB_TYPE: test
42+
- uses: actions/checkout@v3
43+
- uses: actions/setup-java@v3
44+
with:
45+
distribution: zulu
46+
java-version: 8
47+
- run: java -version
48+
- run: .kokoro/build.bat
49+
env:
50+
JOB_TYPE: test
3951
dependencies:
4052
runs-on: ubuntu-latest
4153
strategy:
4254
matrix:
43-
java:
44-
- 8
45-
- 11
46-
- 17
55+
java: [8, 11, 17]
4756
steps:
48-
- uses: actions/checkout@v3
49-
- uses: actions/setup-java@v3
50-
with:
51-
distribution: zulu
52-
java-version: ${{matrix.java}}
53-
- run: java -version
54-
- run: .kokoro/dependencies.sh
57+
- uses: actions/checkout@v3
58+
- uses: actions/setup-java@v3
59+
with:
60+
distribution: zulu
61+
java-version: ${{matrix.java}}
62+
- run: java -version
63+
- run: .kokoro/dependencies.sh
5564
lint:
5665
runs-on: ubuntu-latest
5766
steps:
58-
- uses: actions/checkout@v3
59-
- uses: actions/setup-java@v3
60-
with:
61-
distribution: zulu
62-
java-version: 11
63-
- run: java -version
64-
- run: .kokoro/build.sh
65-
env:
66-
JOB_TYPE: lint
67+
- uses: actions/checkout@v3
68+
- uses: actions/setup-java@v3
69+
with:
70+
distribution: zulu
71+
java-version: 11
72+
- run: java -version
73+
- run: .kokoro/build.sh
74+
env:
75+
JOB_TYPE: lint
6776
clirr:
6877
runs-on: ubuntu-latest
6978
steps:
70-
- uses: actions/checkout@v3
71-
- uses: actions/setup-java@v3
72-
with:
73-
distribution: zulu
74-
java-version: 8
75-
- run: java -version
76-
- run: .kokoro/build.sh
77-
env:
78-
JOB_TYPE: clirr
79+
- uses: actions/checkout@v3
80+
- uses: actions/setup-java@v3
81+
with:
82+
distribution: zulu
83+
java-version: 8
84+
- run: java -version
85+
- run: .kokoro/build.sh
86+
env:
87+
JOB_TYPE: clirr

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@
6363
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
6464
<github.global.server>github</github.global.server>
6565
<site.installationModule>google-iam-parent</site.installationModule>
66-
<protobuf.version>3.19.4</protobuf.version>
66+
<protobuf.version>3.19.6</protobuf.version>
6767
<junit.version>4.13.2</junit.version>
68-
<grpc.version>1.45.1</grpc.version>
68+
<grpc.version>1.45.2</grpc.version>
6969
<guava.version>31.0.1-android</guava.version>
7070
</properties>
7171

proto-google-common-protos/src/main/java/com/google/api/Advice.java

Lines changed: 45 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -53,50 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
5353
return this.unknownFields;
5454
}
5555

56-
private Advice(
57-
com.google.protobuf.CodedInputStream input,
58-
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
59-
throws com.google.protobuf.InvalidProtocolBufferException {
60-
this();
61-
if (extensionRegistry == null) {
62-
throw new java.lang.NullPointerException();
63-
}
64-
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
65-
com.google.protobuf.UnknownFieldSet.newBuilder();
66-
try {
67-
boolean done = false;
68-
while (!done) {
69-
int tag = input.readTag();
70-
switch (tag) {
71-
case 0:
72-
done = true;
73-
break;
74-
case 18:
75-
{
76-
java.lang.String s = input.readStringRequireUtf8();
77-
78-
description_ = s;
79-
break;
80-
}
81-
default:
82-
{
83-
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
84-
done = true;
85-
}
86-
break;
87-
}
88-
}
89-
}
90-
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
91-
throw e.setUnfinishedMessage(this);
92-
} catch (java.io.IOException e) {
93-
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
94-
} finally {
95-
this.unknownFields = unknownFields.build();
96-
makeExtensionsImmutable();
97-
}
98-
}
99-
10056
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
10157
return com.google.api.ConfigChangeProto.internal_static_google_api_Advice_descriptor;
10258
}
@@ -177,7 +133,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
177133
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
178134
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_);
179135
}
180-
unknownFields.writeTo(output);
136+
getUnknownFields().writeTo(output);
181137
}
182138

183139
@java.lang.Override
@@ -189,7 +145,7 @@ public int getSerializedSize() {
189145
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
190146
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_);
191147
}
192-
size += unknownFields.getSerializedSize();
148+
size += getUnknownFields().getSerializedSize();
193149
memoizedSize = size;
194150
return size;
195151
}
@@ -205,7 +161,7 @@ public boolean equals(final java.lang.Object obj) {
205161
com.google.api.Advice other = (com.google.api.Advice) obj;
206162

207163
if (!getDescription().equals(other.getDescription())) return false;
208-
if (!unknownFields.equals(other.unknownFields)) return false;
164+
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
209165
return true;
210166
}
211167

@@ -218,7 +174,7 @@ public int hashCode() {
218174
hash = (19 * hash) + getDescriptor().hashCode();
219175
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
220176
hash = (53 * hash) + getDescription().hashCode();
221-
hash = (29 * hash) + unknownFields.hashCode();
177+
hash = (29 * hash) + getUnknownFields().hashCode();
222178
memoizedHashCode = hash;
223179
return hash;
224180
}
@@ -344,17 +300,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
344300
}
345301

346302
// Construct using com.google.api.Advice.newBuilder()
347-
private Builder() {
348-
maybeForceBuilderInitialization();
349-
}
303+
private Builder() {}
350304

351305
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
352306
super(parent);
353-
maybeForceBuilderInitialization();
354-
}
355-
356-
private void maybeForceBuilderInitialization() {
357-
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
358307
}
359308

360309
@java.lang.Override
@@ -441,7 +390,7 @@ public Builder mergeFrom(com.google.api.Advice other) {
441390
description_ = other.description_;
442391
onChanged();
443392
}
444-
this.mergeUnknownFields(other.unknownFields);
393+
this.mergeUnknownFields(other.getUnknownFields());
445394
onChanged();
446395
return this;
447396
}
@@ -456,17 +405,37 @@ public Builder mergeFrom(
456405
com.google.protobuf.CodedInputStream input,
457406
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
458407
throws java.io.IOException {
459-
com.google.api.Advice parsedMessage = null;
408+
if (extensionRegistry == null) {
409+
throw new java.lang.NullPointerException();
410+
}
460411
try {
461-
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
412+
boolean done = false;
413+
while (!done) {
414+
int tag = input.readTag();
415+
switch (tag) {
416+
case 0:
417+
done = true;
418+
break;
419+
case 18:
420+
{
421+
description_ = input.readStringRequireUtf8();
422+
423+
break;
424+
} // case 18
425+
default:
426+
{
427+
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
428+
done = true; // was an endgroup tag
429+
}
430+
break;
431+
} // default:
432+
} // switch (tag)
433+
} // while (!done)
462434
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
463-
parsedMessage = (com.google.api.Advice) e.getUnfinishedMessage();
464435
throw e.unwrapIOException();
465436
} finally {
466-
if (parsedMessage != null) {
467-
mergeFrom(parsedMessage);
468-
}
469-
}
437+
onChanged();
438+
} // finally
470439
return this;
471440
}
472441

@@ -613,7 +582,18 @@ public Advice parsePartialFrom(
613582
com.google.protobuf.CodedInputStream input,
614583
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
615584
throws com.google.protobuf.InvalidProtocolBufferException {
616-
return new Advice(input, extensionRegistry);
585+
Builder builder = newBuilder();
586+
try {
587+
builder.mergeFrom(input, extensionRegistry);
588+
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
589+
throw e.setUnfinishedMessage(builder.buildPartial());
590+
} catch (com.google.protobuf.UninitializedMessageException e) {
591+
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
592+
} catch (java.io.IOException e) {
593+
throw new com.google.protobuf.InvalidProtocolBufferException(e)
594+
.setUnfinishedMessage(builder.buildPartial());
595+
}
596+
return builder.buildPartial();
617597
}
618598
};
619599

0 commit comments

Comments
 (0)