-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
As expected, there aren't any (noticeable) issues with enabling editions in Connect Kotlin. I did take this opportunity to make the `CodeGenerator` interface match closer to the upstream protobuf `CodeGenerator` interface (at least from the C++ version) so that information about editions and features support would be conveyed by the `CodeGenerator` rather than being hardcoded in the `Plugin` code. Signed-off-by: John Chadwick <[email protected]>
- Loading branch information
1 parent
234a590
commit dc7d1cf
Showing
4 changed files
with
80 additions
and
2 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
protoc-gen-connect-kotlin/proto/buf/editions/v1/editions.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// Copyright 2022-2023 The Connect Authors | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
edition = "2023"; | ||
|
||
package buf.editions.v1; | ||
|
||
option features.field_presence = IMPLICIT; | ||
|
||
message EditionsRequest { | ||
message NestedMessage { | ||
string not_utf8 = 1 [ features.utf8_validation = NONE ]; | ||
} | ||
|
||
repeated NestedMessage nested = 1 [ | ||
features.repeated_field_encoding = EXPANDED, | ||
features.message_encoding = DELIMITED | ||
]; | ||
} | ||
|
||
message EditionsResponse { | ||
enum NestedEnum { | ||
option features.enum_type = CLOSED; | ||
NESTED_ENUM_VALUE_UNSPECIFIED = 0; | ||
} | ||
|
||
NestedEnum enum = 1 [ features.field_presence = EXPLICIT ]; | ||
} | ||
|
||
service EditionsService { | ||
rpc Editions(EditionsRequest) returns (EditionsResponse) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters