Skip to content

Commit

Permalink
Remove generated StatusCode (#703)
Browse files Browse the repository at this point in the history
* Remove generated `StatusCode`

* Rev version for breaking change

* Upgrade min sdk version

* Fix issues
  • Loading branch information
mosuem authored Apr 25, 2024
1 parent bdbe5f5 commit 078fd23
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 337 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
sdk: [3.0.0, dev]
sdk: [3.2.0, dev]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
sdk: [3.0.0, dev]
sdk: [3.2.0, dev]
platform: [vm, chrome]
exclude:
# We only run Chrome tests on Linux. No need to run them
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## 3.2.5
## 4.0.0

* 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)
* Remove generated status codes.

## 3.2.4

Expand Down
1 change: 0 additions & 1 deletion lib/grpc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

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

export 'src/auth/auth.dart' show BaseAuthenticator;
Expand Down
2 changes: 1 addition & 1 deletion lib/src/auth/auth_io.dart
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class _CredentialsRefreshingAuthenticator extends HttpBasedAuthenticator {
await super.authenticate(metadata, uri);
if (_quotaProject != null) {
// https://cloud.google.com/apis/docs/system-parameters#definitions
metadata['X-Goog-User-Project'] = _quotaProject!;
metadata['X-Goog-User-Project'] = _quotaProject;
}
}

Expand Down
2 changes: 1 addition & 1 deletion lib/src/client/transport/http2_credentials.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class ChannelCredentials {
if (!isSecure) return null;
if (_certificateBytes != null) {
return createSecurityContext(false)
..setTrustedCertificatesBytes(_certificateBytes!,
..setTrustedCertificatesBytes(_certificateBytes,
password: _certificatePassword);
}
final context = SecurityContext(withTrustedRoots: true);
Expand Down
14 changes: 0 additions & 14 deletions lib/src/generated/google/rpc/code.pb.dart

This file was deleted.

79 changes: 0 additions & 79 deletions lib/src/generated/google/rpc/code.pbenum.dart

This file was deleted.

47 changes: 0 additions & 47 deletions lib/src/generated/google/rpc/code.pbjson.dart

This file was deleted.

186 changes: 0 additions & 186 deletions lib/src/protos/google/rpc/code.proto

This file was deleted.

2 changes: 1 addition & 1 deletion lib/src/server/handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ class ServerHandler extends ServiceCall {
final acceptedEncodings =
clientMetadata!['grpc-accept-encoding']?.split(',') ?? [];
_callEncodingCodec = acceptedEncodings
.map(_codecRegistry!.lookup)
.map(_codecRegistry.lookup)
.firstWhere((c) => c != null, orElse: () => null);
}

Expand Down
Loading

0 comments on commit 078fd23

Please sign in to comment.