Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion protobuf/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## 4.1.1-wip
## 4.1.1

* Minimum SDK dependency bumped from 3.6.0 to 3.7.0. ([#1024])

Expand Down
2 changes: 1 addition & 1 deletion protobuf/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: protobuf
version: 4.1.1-wip
version: 4.1.1
description: >-
Runtime library for protocol buffers support. Use with package:protoc_plugin
to generate Dart code for your '.proto' files.
Expand Down
2 changes: 1 addition & 1 deletion protoc_plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## 22.5.0-wip
## 22.5.0

* Generated files are now formatted using the Dart formatter. The code is
formatted using the min. SDK for `package:protoc_plugin`; currently `3.7.0`.
Expand Down
2 changes: 1 addition & 1 deletion protoc_plugin/lib/src/formatter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'package:dart_style/dart_style.dart';
import 'package:pub_semver/pub_semver.dart';

// Note: keep this in sync with the SDK constraint in pubspec.yaml.
final Version formatUsingVersion = Version(3, 6, 0);
final Version formatUsingVersion = Version(3, 7, 0);

final DartFormatter _formatter = DartFormatter(
languageVersion: formatUsingVersion,
Expand Down
2 changes: 1 addition & 1 deletion protoc_plugin/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: protoc_plugin
version: 22.5.0-wip
version: 22.5.0
description: A protobuf protoc compiler plugin used to generate Dart code.
repository: https://github.com/google/protobuf.dart/tree/master/protoc_plugin

Expand Down
17 changes: 12 additions & 5 deletions protoc_plugin/test/goldens/client.pb.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@ class TestApi {
TestApi(this._client);

$async.Future<SomeReply> aMethod(
$pb.ClientContext? ctx, SomeRequest request) =>
_client.invoke<SomeReply>(ctx, 'Test', 'AMethod', request, SomeReply());
$pb.ClientContext? ctx,
SomeRequest request,
) => _client.invoke<SomeReply>(ctx, 'Test', 'AMethod', request, SomeReply());
$async.Future<$0.AnotherReply> anotherMethod(
$pb.ClientContext? ctx, $0.EmptyMessage request) =>
_client.invoke<$0.AnotherReply>(
ctx, 'Test', 'AnotherMethod', request, $0.AnotherReply());
$pb.ClientContext? ctx,
$0.EmptyMessage request,
) => _client.invoke<$0.AnotherReply>(
ctx,
'Test',
'AnotherMethod',
request,
$0.AnotherReply(),
);
}
17 changes: 12 additions & 5 deletions protoc_plugin/test/goldens/serviceGenerator.pb.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
abstract class TestServiceBase extends $pb.GeneratedService {
$async.Future<$0.SomeReply> aMethod(
$pb.ServerContext ctx, $0.SomeRequest request);
$pb.ServerContext ctx,
$0.SomeRequest request,
);
$async.Future<$1.AnotherReply> anotherMethod(
$pb.ServerContext ctx, $1.EmptyMessage request);
$pb.ServerContext ctx,
$1.EmptyMessage request,
);

$pb.GeneratedMessage createRequest($core.String methodName) {
switch (methodName) {
Expand All @@ -15,8 +19,11 @@ abstract class TestServiceBase extends $pb.GeneratedService {
}
}

$async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx,
$core.String methodName, $pb.GeneratedMessage request) {
$async.Future<$pb.GeneratedMessage> handleCall(
$pb.ServerContext ctx,
$core.String methodName,
$pb.GeneratedMessage request,
) {
switch (methodName) {
case 'AMethod':
return aMethod(ctx, request as $0.SomeRequest);
Expand All @@ -29,5 +36,5 @@ abstract class TestServiceBase extends $pb.GeneratedService {

$core.Map<$core.String, $core.dynamic> get $json => TestServiceBase$json;
$core.Map<$core.String, $core.Map<$core.String, $core.dynamic>>
get $messageJson => TestServiceBase$messageJson;
get $messageJson => TestServiceBase$messageJson;
}
Loading