-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce image layers in protoc v25.3 plugins (#1287)
- Loading branch information
Showing
14 changed files
with
98 additions
and
29 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
* | ||
!BUILD | ||
!cpp.cc | ||
!disable_cpp_editions.patch | ||
!Dockerfile |
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
20 changes: 20 additions & 0 deletions
20
plugins/protocolbuffers/cpp/v25.3/disable_cpp_editions.patch
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,20 @@ | ||
diff --git a/src/google/protobuf/compiler/cpp/generator.h b/src/google/protobuf/compiler/cpp/generator.h | ||
index 64f334d5b..fd6e08e84 100644 | ||
--- a/src/google/protobuf/compiler/cpp/generator.h | ||
+++ b/src/google/protobuf/compiler/cpp/generator.h | ||
@@ -70,14 +70,7 @@ class PROTOC_EXPORT CppGenerator : public CodeGenerator { | ||
std::string* error) const override; | ||
|
||
uint64_t GetSupportedFeatures() const override { | ||
- return FEATURE_PROTO3_OPTIONAL | FEATURE_SUPPORTS_EDITIONS; | ||
- } | ||
- | ||
- Edition GetMinimumEdition() const override { return Edition::EDITION_PROTO2; } | ||
- Edition GetMaximumEdition() const override { return Edition::EDITION_2023; } | ||
- | ||
- std::vector<const FieldDescriptor*> GetFeatureExtensions() const override { | ||
- return {GetExtensionReflection(pb::cpp)}; | ||
+ return FEATURE_PROTO3_OPTIONAL; | ||
} | ||
|
||
private: |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
* | ||
!BUILD | ||
!disable_objc_editions.patch | ||
!Dockerfile | ||
!objectivec.cc |
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
16 changes: 16 additions & 0 deletions
16
plugins/protocolbuffers/objc/v25.3/disable_objc_editions.patch
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,16 @@ | ||
diff --git a/src/google/protobuf/compiler/objectivec/generator.h b/src/google/protobuf/compiler/objectivec/generator.h | ||
index be5a6a448..4da2dba0d 100644 | ||
--- a/src/google/protobuf/compiler/objectivec/generator.h | ||
+++ b/src/google/protobuf/compiler/objectivec/generator.h | ||
@@ -47,10 +47,8 @@ class PROTOC_EXPORT ObjectiveCGenerator : public CodeGenerator { | ||
std::string* error) const override; | ||
|
||
uint64_t GetSupportedFeatures() const override { | ||
- return (FEATURE_PROTO3_OPTIONAL | FEATURE_SUPPORTS_EDITIONS); | ||
+ return FEATURE_PROTO3_OPTIONAL; | ||
} | ||
- Edition GetMinimumEdition() const override { return Edition::EDITION_PROTO2; } | ||
- Edition GetMaximumEdition() const override { return Edition::EDITION_2023; } | ||
}; | ||
|
||
} // namespace objectivec |
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