Skip to content

Commit 078fd23

Browse files
authored
Remove generated StatusCode (grpc#703)
* Remove generated `StatusCode` * Rev version for breaking change * Upgrade min sdk version * Fix issues
1 parent bdbe5f5 commit 078fd23

File tree

12 files changed

+33
-337
lines changed

12 files changed

+33
-337
lines changed

.github/workflows/dart.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
strategy:
1818
matrix:
19-
sdk: [3.0.0, dev]
19+
sdk: [3.2.0, dev]
2020
steps:
2121
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
2222
- uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3
@@ -60,7 +60,7 @@ jobs:
6060
strategy:
6161
matrix:
6262
os: [ubuntu-latest, macos-latest, windows-latest]
63-
sdk: [3.0.0, dev]
63+
sdk: [3.2.0, dev]
6464
platform: [vm, chrome]
6565
exclude:
6666
# We only run Chrome tests on Linux. No need to run them

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
## 3.2.5
1+
## 4.0.0
22

33
* Set compressed flag correctly for grpc-encoding = identity. Fixes [#669](https://github.com/grpc/grpc-dart/issues/669) (https://github.com/grpc/grpc-dart/pull/693)
4+
* Remove generated status codes.
45

56
## 3.2.4
67

lib/grpc.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
// ignore: dangling_library_doc_comments
1717
/// Status detail types and error codes
18-
export 'package:grpc/src/generated/google/rpc/code.pbenum.dart';
1918
export 'package:grpc/src/generated/google/rpc/error_details.pb.dart';
2019

2120
export 'src/auth/auth.dart' show BaseAuthenticator;

lib/src/auth/auth_io.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class _CredentialsRefreshingAuthenticator extends HttpBasedAuthenticator {
6969
await super.authenticate(metadata, uri);
7070
if (_quotaProject != null) {
7171
// https://cloud.google.com/apis/docs/system-parameters#definitions
72-
metadata['X-Goog-User-Project'] = _quotaProject!;
72+
metadata['X-Goog-User-Project'] = _quotaProject;
7373
}
7474
}
7575

lib/src/client/transport/http2_credentials.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class ChannelCredentials {
5858
if (!isSecure) return null;
5959
if (_certificateBytes != null) {
6060
return createSecurityContext(false)
61-
..setTrustedCertificatesBytes(_certificateBytes!,
61+
..setTrustedCertificatesBytes(_certificateBytes,
6262
password: _certificatePassword);
6363
}
6464
final context = SecurityContext(withTrustedRoots: true);

lib/src/generated/google/rpc/code.pb.dart

Lines changed: 0 additions & 14 deletions
This file was deleted.

lib/src/generated/google/rpc/code.pbenum.dart

Lines changed: 0 additions & 79 deletions
This file was deleted.

lib/src/generated/google/rpc/code.pbjson.dart

Lines changed: 0 additions & 47 deletions
This file was deleted.

lib/src/protos/google/rpc/code.proto

Lines changed: 0 additions & 186 deletions
This file was deleted.

lib/src/server/handler.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ class ServerHandler extends ServiceCall {
170170
final acceptedEncodings =
171171
clientMetadata!['grpc-accept-encoding']?.split(',') ?? [];
172172
_callEncodingCodec = acceptedEncodings
173-
.map(_codecRegistry!.lookup)
173+
.map(_codecRegistry.lookup)
174174
.firstWhere((c) => c != null, orElse: () => null);
175175
}
176176

0 commit comments

Comments
 (0)