From 917c68752de3b8f6bb74cd36a58f6d99072e5c02 Mon Sep 17 00:00:00 2001 From: Thomas Van Lenten Date: Mon, 11 Dec 2023 16:23:37 -0500 Subject: [PATCH] Add note about bundled protos not needing import SwiftProtobuf. --- Reference/SwiftProtobuf/google/protobuf/any.pb.swift | 1 + Reference/SwiftProtobuf/google/protobuf/api.pb.swift | 1 + Reference/SwiftProtobuf/google/protobuf/descriptor.pb.swift | 1 + Reference/SwiftProtobuf/google/protobuf/duration.pb.swift | 1 + Reference/SwiftProtobuf/google/protobuf/empty.pb.swift | 1 + Reference/SwiftProtobuf/google/protobuf/field_mask.pb.swift | 1 + .../SwiftProtobuf/google/protobuf/source_context.pb.swift | 1 + Reference/SwiftProtobuf/google/protobuf/struct.pb.swift | 1 + Reference/SwiftProtobuf/google/protobuf/timestamp.pb.swift | 1 + Reference/SwiftProtobuf/google/protobuf/type.pb.swift | 1 + Reference/SwiftProtobuf/google/protobuf/wrappers.pb.swift | 1 + Reference/upstream/google/protobuf/any.pb.swift | 1 + Reference/upstream/google/protobuf/api.pb.swift | 1 + Reference/upstream/google/protobuf/descriptor.pb.swift | 1 + Reference/upstream/google/protobuf/duration.pb.swift | 1 + Reference/upstream/google/protobuf/empty.pb.swift | 1 + Reference/upstream/google/protobuf/field_mask.pb.swift | 1 + Reference/upstream/google/protobuf/source_context.pb.swift | 1 + Reference/upstream/google/protobuf/struct.pb.swift | 1 + Reference/upstream/google/protobuf/timestamp.pb.swift | 1 + Reference/upstream/google/protobuf/type.pb.swift | 1 + Reference/upstream/google/protobuf/wrappers.pb.swift | 1 + Sources/SwiftProtobuf/any.pb.swift | 1 + Sources/SwiftProtobuf/api.pb.swift | 1 + Sources/SwiftProtobuf/descriptor.pb.swift | 1 + Sources/SwiftProtobuf/duration.pb.swift | 1 + Sources/SwiftProtobuf/empty.pb.swift | 1 + Sources/SwiftProtobuf/field_mask.pb.swift | 1 + Sources/SwiftProtobuf/source_context.pb.swift | 1 + Sources/SwiftProtobuf/struct.pb.swift | 1 + Sources/SwiftProtobuf/timestamp.pb.swift | 1 + Sources/SwiftProtobuf/type.pb.swift | 1 + Sources/SwiftProtobuf/wrappers.pb.swift | 1 + Sources/protoc-gen-swift/FileGenerator.swift | 6 +++--- 34 files changed, 36 insertions(+), 3 deletions(-) diff --git a/Reference/SwiftProtobuf/google/protobuf/any.pb.swift b/Reference/SwiftProtobuf/google/protobuf/any.pb.swift index 0f0c45079..a40bbd88e 100644 --- a/Reference/SwiftProtobuf/google/protobuf/any.pb.swift +++ b/Reference/SwiftProtobuf/google/protobuf/any.pb.swift @@ -38,6 +38,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import Foundation +// 'import SwiftProtobuf' suppressed, this proto file is meant to be bundled in the runtime. // If the compiler emits an error on this type, it is because this file // was generated by a version of the `protoc` Swift plug-in that is diff --git a/Reference/SwiftProtobuf/google/protobuf/api.pb.swift b/Reference/SwiftProtobuf/google/protobuf/api.pb.swift index dab980c69..a6df107b4 100644 --- a/Reference/SwiftProtobuf/google/protobuf/api.pb.swift +++ b/Reference/SwiftProtobuf/google/protobuf/api.pb.swift @@ -38,6 +38,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import Foundation +// 'import SwiftProtobuf' suppressed, this proto file is meant to be bundled in the runtime. // If the compiler emits an error on this type, it is because this file // was generated by a version of the `protoc` Swift plug-in that is diff --git a/Reference/SwiftProtobuf/google/protobuf/descriptor.pb.swift b/Reference/SwiftProtobuf/google/protobuf/descriptor.pb.swift index c49db72a3..84894fb03 100644 --- a/Reference/SwiftProtobuf/google/protobuf/descriptor.pb.swift +++ b/Reference/SwiftProtobuf/google/protobuf/descriptor.pb.swift @@ -46,6 +46,7 @@ // without any other information (e.g. without reading its imports). import Foundation +// 'import SwiftProtobuf' suppressed, this proto file is meant to be bundled in the runtime. // If the compiler emits an error on this type, it is because this file // was generated by a version of the `protoc` Swift plug-in that is diff --git a/Reference/SwiftProtobuf/google/protobuf/duration.pb.swift b/Reference/SwiftProtobuf/google/protobuf/duration.pb.swift index ac7f8577f..0c9698d6b 100644 --- a/Reference/SwiftProtobuf/google/protobuf/duration.pb.swift +++ b/Reference/SwiftProtobuf/google/protobuf/duration.pb.swift @@ -38,6 +38,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import Foundation +// 'import SwiftProtobuf' suppressed, this proto file is meant to be bundled in the runtime. // If the compiler emits an error on this type, it is because this file // was generated by a version of the `protoc` Swift plug-in that is diff --git a/Reference/SwiftProtobuf/google/protobuf/empty.pb.swift b/Reference/SwiftProtobuf/google/protobuf/empty.pb.swift index 789986ba2..49af42a90 100644 --- a/Reference/SwiftProtobuf/google/protobuf/empty.pb.swift +++ b/Reference/SwiftProtobuf/google/protobuf/empty.pb.swift @@ -38,6 +38,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import Foundation +// 'import SwiftProtobuf' suppressed, this proto file is meant to be bundled in the runtime. // If the compiler emits an error on this type, it is because this file // was generated by a version of the `protoc` Swift plug-in that is diff --git a/Reference/SwiftProtobuf/google/protobuf/field_mask.pb.swift b/Reference/SwiftProtobuf/google/protobuf/field_mask.pb.swift index 36e439891..ff085f269 100644 --- a/Reference/SwiftProtobuf/google/protobuf/field_mask.pb.swift +++ b/Reference/SwiftProtobuf/google/protobuf/field_mask.pb.swift @@ -38,6 +38,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import Foundation +// 'import SwiftProtobuf' suppressed, this proto file is meant to be bundled in the runtime. // If the compiler emits an error on this type, it is because this file // was generated by a version of the `protoc` Swift plug-in that is diff --git a/Reference/SwiftProtobuf/google/protobuf/source_context.pb.swift b/Reference/SwiftProtobuf/google/protobuf/source_context.pb.swift index acdcfa8ad..523acd4d8 100644 --- a/Reference/SwiftProtobuf/google/protobuf/source_context.pb.swift +++ b/Reference/SwiftProtobuf/google/protobuf/source_context.pb.swift @@ -38,6 +38,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import Foundation +// 'import SwiftProtobuf' suppressed, this proto file is meant to be bundled in the runtime. // If the compiler emits an error on this type, it is because this file // was generated by a version of the `protoc` Swift plug-in that is diff --git a/Reference/SwiftProtobuf/google/protobuf/struct.pb.swift b/Reference/SwiftProtobuf/google/protobuf/struct.pb.swift index fd0afcc0c..c190ce966 100644 --- a/Reference/SwiftProtobuf/google/protobuf/struct.pb.swift +++ b/Reference/SwiftProtobuf/google/protobuf/struct.pb.swift @@ -38,6 +38,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import Foundation +// 'import SwiftProtobuf' suppressed, this proto file is meant to be bundled in the runtime. // If the compiler emits an error on this type, it is because this file // was generated by a version of the `protoc` Swift plug-in that is diff --git a/Reference/SwiftProtobuf/google/protobuf/timestamp.pb.swift b/Reference/SwiftProtobuf/google/protobuf/timestamp.pb.swift index c9ce1d880..5523f69c2 100644 --- a/Reference/SwiftProtobuf/google/protobuf/timestamp.pb.swift +++ b/Reference/SwiftProtobuf/google/protobuf/timestamp.pb.swift @@ -38,6 +38,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import Foundation +// 'import SwiftProtobuf' suppressed, this proto file is meant to be bundled in the runtime. // If the compiler emits an error on this type, it is because this file // was generated by a version of the `protoc` Swift plug-in that is diff --git a/Reference/SwiftProtobuf/google/protobuf/type.pb.swift b/Reference/SwiftProtobuf/google/protobuf/type.pb.swift index d13116d24..b1e7da231 100644 --- a/Reference/SwiftProtobuf/google/protobuf/type.pb.swift +++ b/Reference/SwiftProtobuf/google/protobuf/type.pb.swift @@ -38,6 +38,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import Foundation +// 'import SwiftProtobuf' suppressed, this proto file is meant to be bundled in the runtime. // If the compiler emits an error on this type, it is because this file // was generated by a version of the `protoc` Swift plug-in that is diff --git a/Reference/SwiftProtobuf/google/protobuf/wrappers.pb.swift b/Reference/SwiftProtobuf/google/protobuf/wrappers.pb.swift index e68533a1d..92c7a6a69 100644 --- a/Reference/SwiftProtobuf/google/protobuf/wrappers.pb.swift +++ b/Reference/SwiftProtobuf/google/protobuf/wrappers.pb.swift @@ -48,6 +48,7 @@ // individual entries of a map or fields of a oneof can already detect presence. import Foundation +// 'import SwiftProtobuf' suppressed, this proto file is meant to be bundled in the runtime. // If the compiler emits an error on this type, it is because this file // was generated by a version of the `protoc` Swift plug-in that is diff --git a/Reference/upstream/google/protobuf/any.pb.swift b/Reference/upstream/google/protobuf/any.pb.swift index 0f0c45079..a40bbd88e 100644 --- a/Reference/upstream/google/protobuf/any.pb.swift +++ b/Reference/upstream/google/protobuf/any.pb.swift @@ -38,6 +38,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import Foundation +// 'import SwiftProtobuf' suppressed, this proto file is meant to be bundled in the runtime. // If the compiler emits an error on this type, it is because this file // was generated by a version of the `protoc` Swift plug-in that is diff --git a/Reference/upstream/google/protobuf/api.pb.swift b/Reference/upstream/google/protobuf/api.pb.swift index dab980c69..a6df107b4 100644 --- a/Reference/upstream/google/protobuf/api.pb.swift +++ b/Reference/upstream/google/protobuf/api.pb.swift @@ -38,6 +38,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import Foundation +// 'import SwiftProtobuf' suppressed, this proto file is meant to be bundled in the runtime. // If the compiler emits an error on this type, it is because this file // was generated by a version of the `protoc` Swift plug-in that is diff --git a/Reference/upstream/google/protobuf/descriptor.pb.swift b/Reference/upstream/google/protobuf/descriptor.pb.swift index c49db72a3..84894fb03 100644 --- a/Reference/upstream/google/protobuf/descriptor.pb.swift +++ b/Reference/upstream/google/protobuf/descriptor.pb.swift @@ -46,6 +46,7 @@ // without any other information (e.g. without reading its imports). import Foundation +// 'import SwiftProtobuf' suppressed, this proto file is meant to be bundled in the runtime. // If the compiler emits an error on this type, it is because this file // was generated by a version of the `protoc` Swift plug-in that is diff --git a/Reference/upstream/google/protobuf/duration.pb.swift b/Reference/upstream/google/protobuf/duration.pb.swift index ac7f8577f..0c9698d6b 100644 --- a/Reference/upstream/google/protobuf/duration.pb.swift +++ b/Reference/upstream/google/protobuf/duration.pb.swift @@ -38,6 +38,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import Foundation +// 'import SwiftProtobuf' suppressed, this proto file is meant to be bundled in the runtime. // If the compiler emits an error on this type, it is because this file // was generated by a version of the `protoc` Swift plug-in that is diff --git a/Reference/upstream/google/protobuf/empty.pb.swift b/Reference/upstream/google/protobuf/empty.pb.swift index 789986ba2..49af42a90 100644 --- a/Reference/upstream/google/protobuf/empty.pb.swift +++ b/Reference/upstream/google/protobuf/empty.pb.swift @@ -38,6 +38,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import Foundation +// 'import SwiftProtobuf' suppressed, this proto file is meant to be bundled in the runtime. // If the compiler emits an error on this type, it is because this file // was generated by a version of the `protoc` Swift plug-in that is diff --git a/Reference/upstream/google/protobuf/field_mask.pb.swift b/Reference/upstream/google/protobuf/field_mask.pb.swift index 36e439891..ff085f269 100644 --- a/Reference/upstream/google/protobuf/field_mask.pb.swift +++ b/Reference/upstream/google/protobuf/field_mask.pb.swift @@ -38,6 +38,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import Foundation +// 'import SwiftProtobuf' suppressed, this proto file is meant to be bundled in the runtime. // If the compiler emits an error on this type, it is because this file // was generated by a version of the `protoc` Swift plug-in that is diff --git a/Reference/upstream/google/protobuf/source_context.pb.swift b/Reference/upstream/google/protobuf/source_context.pb.swift index acdcfa8ad..523acd4d8 100644 --- a/Reference/upstream/google/protobuf/source_context.pb.swift +++ b/Reference/upstream/google/protobuf/source_context.pb.swift @@ -38,6 +38,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import Foundation +// 'import SwiftProtobuf' suppressed, this proto file is meant to be bundled in the runtime. // If the compiler emits an error on this type, it is because this file // was generated by a version of the `protoc` Swift plug-in that is diff --git a/Reference/upstream/google/protobuf/struct.pb.swift b/Reference/upstream/google/protobuf/struct.pb.swift index fd0afcc0c..c190ce966 100644 --- a/Reference/upstream/google/protobuf/struct.pb.swift +++ b/Reference/upstream/google/protobuf/struct.pb.swift @@ -38,6 +38,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import Foundation +// 'import SwiftProtobuf' suppressed, this proto file is meant to be bundled in the runtime. // If the compiler emits an error on this type, it is because this file // was generated by a version of the `protoc` Swift plug-in that is diff --git a/Reference/upstream/google/protobuf/timestamp.pb.swift b/Reference/upstream/google/protobuf/timestamp.pb.swift index c9ce1d880..5523f69c2 100644 --- a/Reference/upstream/google/protobuf/timestamp.pb.swift +++ b/Reference/upstream/google/protobuf/timestamp.pb.swift @@ -38,6 +38,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import Foundation +// 'import SwiftProtobuf' suppressed, this proto file is meant to be bundled in the runtime. // If the compiler emits an error on this type, it is because this file // was generated by a version of the `protoc` Swift plug-in that is diff --git a/Reference/upstream/google/protobuf/type.pb.swift b/Reference/upstream/google/protobuf/type.pb.swift index d13116d24..b1e7da231 100644 --- a/Reference/upstream/google/protobuf/type.pb.swift +++ b/Reference/upstream/google/protobuf/type.pb.swift @@ -38,6 +38,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import Foundation +// 'import SwiftProtobuf' suppressed, this proto file is meant to be bundled in the runtime. // If the compiler emits an error on this type, it is because this file // was generated by a version of the `protoc` Swift plug-in that is diff --git a/Reference/upstream/google/protobuf/wrappers.pb.swift b/Reference/upstream/google/protobuf/wrappers.pb.swift index e68533a1d..92c7a6a69 100644 --- a/Reference/upstream/google/protobuf/wrappers.pb.swift +++ b/Reference/upstream/google/protobuf/wrappers.pb.swift @@ -48,6 +48,7 @@ // individual entries of a map or fields of a oneof can already detect presence. import Foundation +// 'import SwiftProtobuf' suppressed, this proto file is meant to be bundled in the runtime. // If the compiler emits an error on this type, it is because this file // was generated by a version of the `protoc` Swift plug-in that is diff --git a/Sources/SwiftProtobuf/any.pb.swift b/Sources/SwiftProtobuf/any.pb.swift index 5a6ad3854..01c0a88eb 100644 --- a/Sources/SwiftProtobuf/any.pb.swift +++ b/Sources/SwiftProtobuf/any.pb.swift @@ -38,6 +38,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import Foundation +// 'import SwiftProtobuf' suppressed, this proto file is meant to be bundled in the runtime. // If the compiler emits an error on this type, it is because this file // was generated by a version of the `protoc` Swift plug-in that is diff --git a/Sources/SwiftProtobuf/api.pb.swift b/Sources/SwiftProtobuf/api.pb.swift index e41b0f1ce..4f1f79eb6 100644 --- a/Sources/SwiftProtobuf/api.pb.swift +++ b/Sources/SwiftProtobuf/api.pb.swift @@ -38,6 +38,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import Foundation +// 'import SwiftProtobuf' suppressed, this proto file is meant to be bundled in the runtime. // If the compiler emits an error on this type, it is because this file // was generated by a version of the `protoc` Swift plug-in that is diff --git a/Sources/SwiftProtobuf/descriptor.pb.swift b/Sources/SwiftProtobuf/descriptor.pb.swift index 72ece99b0..8c25a9a4c 100644 --- a/Sources/SwiftProtobuf/descriptor.pb.swift +++ b/Sources/SwiftProtobuf/descriptor.pb.swift @@ -46,6 +46,7 @@ // without any other information (e.g. without reading its imports). import Foundation +// 'import SwiftProtobuf' suppressed, this proto file is meant to be bundled in the runtime. // If the compiler emits an error on this type, it is because this file // was generated by a version of the `protoc` Swift plug-in that is diff --git a/Sources/SwiftProtobuf/duration.pb.swift b/Sources/SwiftProtobuf/duration.pb.swift index 565ef3f6d..92a9b2e94 100644 --- a/Sources/SwiftProtobuf/duration.pb.swift +++ b/Sources/SwiftProtobuf/duration.pb.swift @@ -38,6 +38,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import Foundation +// 'import SwiftProtobuf' suppressed, this proto file is meant to be bundled in the runtime. // If the compiler emits an error on this type, it is because this file // was generated by a version of the `protoc` Swift plug-in that is diff --git a/Sources/SwiftProtobuf/empty.pb.swift b/Sources/SwiftProtobuf/empty.pb.swift index 436e38e4b..b103b9d67 100644 --- a/Sources/SwiftProtobuf/empty.pb.swift +++ b/Sources/SwiftProtobuf/empty.pb.swift @@ -38,6 +38,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import Foundation +// 'import SwiftProtobuf' suppressed, this proto file is meant to be bundled in the runtime. // If the compiler emits an error on this type, it is because this file // was generated by a version of the `protoc` Swift plug-in that is diff --git a/Sources/SwiftProtobuf/field_mask.pb.swift b/Sources/SwiftProtobuf/field_mask.pb.swift index 8d6be191b..a77c5af81 100644 --- a/Sources/SwiftProtobuf/field_mask.pb.swift +++ b/Sources/SwiftProtobuf/field_mask.pb.swift @@ -38,6 +38,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import Foundation +// 'import SwiftProtobuf' suppressed, this proto file is meant to be bundled in the runtime. // If the compiler emits an error on this type, it is because this file // was generated by a version of the `protoc` Swift plug-in that is diff --git a/Sources/SwiftProtobuf/source_context.pb.swift b/Sources/SwiftProtobuf/source_context.pb.swift index 25a034385..fb28f3445 100644 --- a/Sources/SwiftProtobuf/source_context.pb.swift +++ b/Sources/SwiftProtobuf/source_context.pb.swift @@ -38,6 +38,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import Foundation +// 'import SwiftProtobuf' suppressed, this proto file is meant to be bundled in the runtime. // If the compiler emits an error on this type, it is because this file // was generated by a version of the `protoc` Swift plug-in that is diff --git a/Sources/SwiftProtobuf/struct.pb.swift b/Sources/SwiftProtobuf/struct.pb.swift index ca15b48b3..1090095ba 100644 --- a/Sources/SwiftProtobuf/struct.pb.swift +++ b/Sources/SwiftProtobuf/struct.pb.swift @@ -38,6 +38,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import Foundation +// 'import SwiftProtobuf' suppressed, this proto file is meant to be bundled in the runtime. // If the compiler emits an error on this type, it is because this file // was generated by a version of the `protoc` Swift plug-in that is diff --git a/Sources/SwiftProtobuf/timestamp.pb.swift b/Sources/SwiftProtobuf/timestamp.pb.swift index 2d43c2e32..fce7a75ce 100644 --- a/Sources/SwiftProtobuf/timestamp.pb.swift +++ b/Sources/SwiftProtobuf/timestamp.pb.swift @@ -38,6 +38,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import Foundation +// 'import SwiftProtobuf' suppressed, this proto file is meant to be bundled in the runtime. // If the compiler emits an error on this type, it is because this file // was generated by a version of the `protoc` Swift plug-in that is diff --git a/Sources/SwiftProtobuf/type.pb.swift b/Sources/SwiftProtobuf/type.pb.swift index 04433403e..38ed7d398 100644 --- a/Sources/SwiftProtobuf/type.pb.swift +++ b/Sources/SwiftProtobuf/type.pb.swift @@ -38,6 +38,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import Foundation +// 'import SwiftProtobuf' suppressed, this proto file is meant to be bundled in the runtime. // If the compiler emits an error on this type, it is because this file // was generated by a version of the `protoc` Swift plug-in that is diff --git a/Sources/SwiftProtobuf/wrappers.pb.swift b/Sources/SwiftProtobuf/wrappers.pb.swift index 2c3c87b31..b0885a1aa 100644 --- a/Sources/SwiftProtobuf/wrappers.pb.swift +++ b/Sources/SwiftProtobuf/wrappers.pb.swift @@ -48,6 +48,7 @@ // individual entries of a map or fields of a oneof can already detect presence. import Foundation +// 'import SwiftProtobuf' suppressed, this proto file is meant to be bundled in the runtime. // If the compiler emits an error on this type, it is because this file // was generated by a version of the `protoc` Swift plug-in that is diff --git a/Sources/protoc-gen-swift/FileGenerator.swift b/Sources/protoc-gen-swift/FileGenerator.swift index 2a5e0aceb..5765c9914 100644 --- a/Sources/protoc-gen-swift/FileGenerator.swift +++ b/Sources/protoc-gen-swift/FileGenerator.swift @@ -109,9 +109,9 @@ class FileGenerator { return "" } }() - if !fileDescriptor.isBundledProto { - // The well known types ship with the runtime, everything else needs - // to import the runtime. + if fileDescriptor.isBundledProto { + p.print("// 'import \(namer.swiftProtobufModuleName)' suppressed, this proto file is meant to be bundled in the runtime.") + } else { p.print("\(visibilityAnnotation)import \(namer.swiftProtobufModuleName)") } if let neededImports = generatorOptions.protoToModuleMappings.neededModules(forFile: fileDescriptor) {