-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix tags in codegen for large field numbers #213
Merged
andrewparmet
merged 3 commits into
open-toast:main
from
andrewparmet:fix-tags-for-large-numbers
Feb 7, 2024
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
49 changes: 49 additions & 0 deletions
49
testing/interop/src/main/proto/google/protobuf/unittest_import.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,49 @@ | ||
// Protocol Buffers - Google's data interchange format | ||
// Copyright 2008 Google Inc. All rights reserved. | ||
// | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file or at | ||
// https://developers.google.com/open-source/licenses/bsd | ||
|
||
// Author: kenton@google.com (Kenton Varda) | ||
// Based on original Protocol Buffers design by | ||
// Sanjay Ghemawat, Jeff Dean, and others. | ||
// | ||
// A proto file which is imported by unittest.proto to test importing. | ||
|
||
syntax = "proto2"; | ||
|
||
// We don't put this in a package within proto2 because we need to make sure | ||
// that the generated code doesn't depend on being in the proto2 namespace. | ||
// In test_util.h we do | ||
// "using namespace unittest_import = protobuf_unittest_import". | ||
package protobuf_unittest_import; | ||
|
||
option optimize_for = SPEED; | ||
option cc_enable_arenas = true; | ||
|
||
// Exercise the java_package option. | ||
option java_package = "com.google.protobuf.test"; | ||
|
||
// Do not set a java_outer_classname here to verify that Proto2 works without | ||
// one. | ||
|
||
// Test public import | ||
import public "google/protobuf/unittest_import_public.proto"; | ||
|
||
message ImportMessage { | ||
optional int32 d = 1; | ||
} | ||
|
||
enum ImportEnum { | ||
IMPORT_FOO = 7; | ||
IMPORT_BAR = 8; | ||
IMPORT_BAZ = 9; | ||
} | ||
|
||
// To use an enum in a map, it must has the first value as 0. | ||
enum ImportEnumForMap { | ||
UNKNOWN = 0; | ||
FOO = 1; | ||
BAR = 2; | ||
} |
18 changes: 18 additions & 0 deletions
18
testing/interop/src/main/proto/google/protobuf/unittest_import_public.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,18 @@ | ||
// Protocol Buffers - Google's data interchange format | ||
// Copyright 2008 Google Inc. All rights reserved. | ||
// | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file or at | ||
// https://developers.google.com/open-source/licenses/bsd | ||
|
||
// Author: liujisi@google.com (Pherl Liu) | ||
|
||
syntax = "proto2"; | ||
|
||
package protobuf_unittest_import; | ||
|
||
option java_package = "com.google.protobuf.test"; | ||
|
||
message PublicImportMessage { | ||
optional int32 e = 1; | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UInt nonsense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this ABI going to be stable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know. We already do this below - can we merge and revisit pre-1.0?