Skip to content

Commit f952d38

Browse files
Merge upstream/master into aot_monorepo_compat
- Merged upstream changes including protobuf 5.1.0 upgrade - Updated pubspec.yaml to use protobuf ^5.1.0 (from ^4.0.0) - Preserved repository URL (open-runtime fork) - ServerInterceptor and ServerStreamingInvoker already in upstream, preserved - Resolved conflicts by taking upstream versions for generated protobuf files - Updated version to 5.0.0 to match upstream
2 parents 9a61c6c + 774fd15 commit f952d38

File tree

164 files changed

+8447
-6222
lines changed

Some content is hidden

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

164 files changed

+8447
-6222
lines changed

.github/workflows/dart.yml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,19 @@ jobs:
1515
runs-on: ubuntu-latest
1616
strategy:
1717
matrix:
18-
sdk: [3.5, dev]
18+
sdk: [stable, dev]
1919
steps:
2020
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
21-
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
21+
- uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c
2222
with:
2323
sdk: ${{ matrix.sdk }}
2424
- name: Report version
2525
run: dart --version
2626
- name: Install dependencies
2727
run: dart pub get
2828
- name: Check formatting (using dev dartfmt release)
29-
if: ${{ matrix.sdk == 'dev' }}
29+
if: ${{ matrix.sdk == 'stable' }}
3030
run: dart format --output=none --set-exit-if-changed .
31-
- name: Analyze code (introp and examples)
32-
run: |
33-
for example in interop example/*/; do
34-
pushd $example
35-
echo [Getting dependencies in $example]
36-
dart pub get
37-
popd
38-
done
39-
shell: bash
4031
- name: Analyze code
4132
run: dart analyze --fatal-infos .
4233
- name: Check that grpc-web sample builds with DDC
@@ -59,7 +50,7 @@ jobs:
5950
strategy:
6051
matrix:
6152
os: [ubuntu-latest, macos-latest, windows-latest]
62-
sdk: [3.5, dev]
53+
sdk: [stable, dev]
6354
platform: [vm, chrome]
6455
exclude:
6556
# We only run Chrome tests on Linux. No need to run them
@@ -70,7 +61,7 @@ jobs:
7061
platform: chrome
7162
steps:
7263
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
73-
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
64+
- uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c
7465
with:
7566
sdk: ${{ matrix.sdk }}
7667
- name: Report version

.github/workflows/health.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
name: Health
2+
23
on:
34
pull_request:
45
branches: [ master ]
56
types: [opened, synchronize, reopened, labeled, unlabeled]
7+
68
jobs:
79
health:
810
uses: dart-lang/ecosystem/.github/workflows/health.yaml@main
911
with:
10-
checks: "changelog,do-not-submit,breaking,coverage,leaking"
11-
ignore_coverage: "example/**,interop/**"
12+
checks: "changelog,do-not-submit,breaking,leaking"
1213
permissions:
1314
pull-requests: write

.github/workflows/post_summaries.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
name: Comment on the pull request
22

33
on:
4-
# Trigger this workflow after the Health workflow completes. This workflow will have permissions to
5-
# do things like create comments on the PR, even if the original workflow couldn't.
4+
# Trigger this workflow after the given workflows completes.
5+
# This workflow will have permissions to do things like create comments on the
6+
# PR, even if the original workflow couldn't.
67
workflow_run:
78
workflows:
89
- Health
@@ -14,4 +15,4 @@ jobs:
1415
upload:
1516
uses: dart-lang/ecosystem/.github/workflows/post_summaries.yaml@main
1617
permissions:
17-
pull-requests: write
18+
pull-requests: write

CHANGELOG.md

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,53 @@
1-
## 4.0.2-wip
1+
## 5.0.0
2+
3+
- Upgrading protos with new `googleapis` and `protobuf` versions.
4+
5+
## 4.3.1
6+
7+
- Downgrade `meta` dependency to `1.16.0`
8+
9+
## 4.3.0
10+
11+
- Require `package:protobuf` 5.0.0
12+
13+
## 4.2.0
14+
15+
- Export a protobuf generated symbol (`Any`)
16+
- Simplify hierarchy of `ResponseFuture` (no longer have a private class in the
17+
type hierarchy)
18+
- Require Dart 3.8.
19+
- Require package:googleapis_auth
20+
- Require package:http 1.4.0
21+
- Require package:lints 6.0.0
22+
- Require package:protobuf 4.1.0
23+
- Dart format all files for the new 3.8 formatter.
24+
25+
## 4.1.0
26+
27+
* Add a `serverInterceptors` argument to `ConnectionServer`. These interceptors
28+
are acting as middleware, wrapping a `ServiceMethod` invocation.
29+
* Make sure that `CallOptions.mergeWith` is symmetric: given `WebCallOptions`
30+
it should return `WebCallOptions`.
31+
32+
## 4.0.4
33+
34+
* Allow the latest `package:googleapis_auth`.
35+
36+
## 4.0.3
37+
38+
* Widen `package:protobuf` constraint to allow version 4.0.0.
39+
40+
## 4.0.2
241

342
* Internal optimization to client code.
443
* Small fixes, such as ports in testing and enabling `timeline_test.dart`.
5-
* When the keep alive manager runs into a timeout, it will finish the transport instead of closing
6-
the connection, as defined in the gRPC spec.
44+
* When the keep alive manager runs into a timeout, it will finish the transport
45+
instead of closing the connection, as defined in the gRPC spec.
746
* Upgrade to `package:lints` version 5.0.0 and Dart SDK version 3.5.0.
847
* Upgrade `example/grpc-web` code.
948
* Update xhr transport to migrate off legacy JS/HTML apis.
10-
* Use `package:web` to get `HttpStatus`
49+
* Use `package:web` to get `HttpStatus`.
50+
* Fix `package:web` deprecations.
1151

1252
## 4.0.1
1353

analysis_options.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,5 @@ linter:
2020
- prefer_final_locals
2121
- prefer_relative_imports
2222
- prefer_single_quotes
23-
# Enable once 3.7 is stable.
24-
# - strict_top_level_inference
23+
- strict_top_level_inference
2524
- test_types_in_equals
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
11
include: ../../analysis_options.yaml
2-
3-
linter:
4-
rules:
5-
directives_ordering: false

example/googleapis/bin/logging.dart

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,19 @@
1616
import 'dart:async';
1717
import 'dart:io';
1818

19-
import 'package:grpc/grpc.dart';
20-
2119
import 'package:googleapis/src/generated/google/api/monitored_resource.pb.dart';
2220
import 'package:googleapis/src/generated/google/logging/type/log_severity.pb.dart';
2321
import 'package:googleapis/src/generated/google/logging/v2/log_entry.pb.dart';
2422
import 'package:googleapis/src/generated/google/logging/v2/logging.pbgrpc.dart';
23+
import 'package:grpc/grpc.dart';
2524

2625
Future<void> main() async {
2726
final serviceAccountFile = File('logging-service-account.json');
2827
if (!serviceAccountFile.existsSync()) {
29-
print('File logging-service-account.json not found. Please follow the '
30-
'steps in README.md to create it.');
28+
print(
29+
'File logging-service-account.json not found. Please follow the '
30+
'steps in README.md to create it.',
31+
);
3132
exit(-1);
3233
}
3334

@@ -36,18 +37,26 @@ Future<void> main() async {
3637
'https://www.googleapis.com/auth/logging.write',
3738
];
3839

39-
final authenticator = ServiceAccountAuthenticator(serviceAccountFile.readAsStringSync(), scopes);
40+
final authenticator = ServiceAccountAuthenticator(
41+
serviceAccountFile.readAsStringSync(),
42+
scopes,
43+
);
4044
final projectId = authenticator.projectId;
4145

4246
final channel = ClientChannel('logging.googleapis.com');
43-
final logging = LoggingServiceV2Client(channel, options: authenticator.toCallOptions);
47+
final logging = LoggingServiceV2Client(
48+
channel,
49+
options: authenticator.toCallOptions,
50+
);
4451

4552
final request = WriteLogEntriesRequest()
46-
..entries.add(LogEntry()
47-
..logName = 'projects/$projectId/logs/example'
48-
..severity = LogSeverity.INFO
49-
..resource = (MonitoredResource()..type = 'global')
50-
..textPayload = 'This is a log entry!');
53+
..entries.add(
54+
LogEntry()
55+
..logName = 'projects/$projectId/logs/example'
56+
..severity = LogSeverity.INFO
57+
..resource = (MonitoredResource()..type = 'global')
58+
..textPayload = 'This is a log entry!',
59+
);
5160
await logging.writeLogEntries(request);
5261

5362
await channel.shutdown();
Lines changed: 47 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
1+
// This is a generated file - do not edit.
12
//
2-
// Generated code. Do not modify.
3-
// source: google/api/label.proto
4-
//
5-
// @dart = 2.12
3+
// Generated from google/api/label.proto.
4+
5+
// @dart = 3.3
66

77
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
8-
// ignore_for_file: constant_identifier_names, library_prefixes
9-
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
10-
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
8+
// ignore_for_file: constant_identifier_names
9+
// ignore_for_file: curly_braces_in_flow_control_structures
10+
// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes
11+
// ignore_for_file: non_constant_identifier_names
1112

1213
import 'dart:core' as $core;
1314

1415
import 'package:protobuf/protobuf.dart' as $pb;
1516

1617
import 'label.pbenum.dart';
1718

19+
export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;
20+
1821
export 'label.pbenum.dart';
1922

2023
/// A description of a label.
@@ -25,94 +28,82 @@ class LabelDescriptor extends $pb.GeneratedMessage {
2528
$core.String? description,
2629
}) {
2730
final result = create();
28-
if (key != null) {
29-
result.key = key;
30-
}
31-
if (valueType != null) {
32-
result.valueType = valueType;
33-
}
34-
if (description != null) {
35-
result.description = description;
36-
}
31+
if (key != null) result.key = key;
32+
if (valueType != null) result.valueType = valueType;
33+
if (description != null) result.description = description;
3734
return result;
3835
}
39-
LabelDescriptor._() : super();
40-
factory LabelDescriptor.fromBuffer($core.List<$core.int> i,
41-
[$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
42-
create()..mergeFromBuffer(i, r);
43-
factory LabelDescriptor.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
44-
create()..mergeFromJson(i, r);
45-
46-
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'LabelDescriptor',
47-
package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'), createEmptyInstance: create)
36+
37+
LabelDescriptor._();
38+
39+
factory LabelDescriptor.fromBuffer($core.List<$core.int> data,
40+
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
41+
create()..mergeFromBuffer(data, registry);
42+
factory LabelDescriptor.fromJson($core.String json,
43+
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
44+
create()..mergeFromJson(json, registry);
45+
46+
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
47+
_omitMessageNames ? '' : 'LabelDescriptor',
48+
package: const $pb.PackageName(_omitMessageNames ? '' : 'google.api'),
49+
createEmptyInstance: create)
4850
..aOS(1, _omitFieldNames ? '' : 'key')
49-
..e<LabelDescriptor_ValueType>(2, _omitFieldNames ? '' : 'valueType', $pb.PbFieldType.OE,
50-
defaultOrMaker: LabelDescriptor_ValueType.STRING,
51-
valueOf: LabelDescriptor_ValueType.valueOf,
51+
..aE<LabelDescriptor_ValueType>(2, _omitFieldNames ? '' : 'valueType',
5252
enumValues: LabelDescriptor_ValueType.values)
5353
..aOS(3, _omitFieldNames ? '' : 'description')
5454
..hasRequiredFields = false;
5555

56-
@$core.Deprecated('Using this can add significant overhead to your binary. '
57-
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
58-
'Will be removed in next major version')
59-
LabelDescriptor clone() => LabelDescriptor()..mergeFromMessage(this);
60-
@$core.Deprecated('Using this can add significant overhead to your binary. '
61-
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
62-
'Will be removed in next major version')
56+
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
57+
LabelDescriptor clone() => deepCopy();
58+
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
6359
LabelDescriptor copyWith(void Function(LabelDescriptor) updates) =>
64-
super.copyWith((message) => updates(message as LabelDescriptor)) as LabelDescriptor;
60+
super.copyWith((message) => updates(message as LabelDescriptor))
61+
as LabelDescriptor;
6562

63+
@$core.override
6664
$pb.BuilderInfo get info_ => _i;
6765

6866
@$core.pragma('dart2js:noInline')
6967
static LabelDescriptor create() => LabelDescriptor._();
68+
@$core.override
7069
LabelDescriptor createEmptyInstance() => create();
71-
static $pb.PbList<LabelDescriptor> createRepeated() => $pb.PbList<LabelDescriptor>();
7270
@$core.pragma('dart2js:noInline')
73-
static LabelDescriptor getDefault() =>
74-
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<LabelDescriptor>(create);
71+
static LabelDescriptor getDefault() => _defaultInstance ??=
72+
$pb.GeneratedMessage.$_defaultFor<LabelDescriptor>(create);
7573
static LabelDescriptor? _defaultInstance;
7674

7775
/// The label key.
7876
@$pb.TagNumber(1)
7977
$core.String get key => $_getSZ(0);
8078
@$pb.TagNumber(1)
81-
set key($core.String v) {
82-
$_setString(0, v);
83-
}
84-
79+
set key($core.String value) => $_setString(0, value);
8580
@$pb.TagNumber(1)
8681
$core.bool hasKey() => $_has(0);
8782
@$pb.TagNumber(1)
88-
void clearKey() => clearField(1);
83+
void clearKey() => $_clearField(1);
8984

9085
/// The type of data that can be assigned to the label.
9186
@$pb.TagNumber(2)
9287
LabelDescriptor_ValueType get valueType => $_getN(1);
9388
@$pb.TagNumber(2)
94-
set valueType(LabelDescriptor_ValueType v) {
95-
setField(2, v);
96-
}
97-
89+
set valueType(LabelDescriptor_ValueType value) => $_setField(2, value);
9890
@$pb.TagNumber(2)
9991
$core.bool hasValueType() => $_has(1);
10092
@$pb.TagNumber(2)
101-
void clearValueType() => clearField(2);
93+
void clearValueType() => $_clearField(2);
10294

10395
/// A human-readable description for the label.
10496
@$pb.TagNumber(3)
10597
$core.String get description => $_getSZ(2);
10698
@$pb.TagNumber(3)
107-
set description($core.String v) {
108-
$_setString(2, v);
109-
}
110-
99+
set description($core.String value) => $_setString(2, value);
111100
@$pb.TagNumber(3)
112101
$core.bool hasDescription() => $_has(2);
113102
@$pb.TagNumber(3)
114-
void clearDescription() => clearField(3);
103+
void clearDescription() => $_clearField(3);
115104
}
116105

117-
const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names');
118-
const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names');
106+
const $core.bool _omitFieldNames =
107+
$core.bool.fromEnvironment('protobuf.omit_field_names');
108+
const $core.bool _omitMessageNames =
109+
$core.bool.fromEnvironment('protobuf.omit_message_names');

0 commit comments

Comments
 (0)