From 30fca5c445065b194fb7105084052363d4c7ebf5 Mon Sep 17 00:00:00 2001 From: Gus Cairo Date: Wed, 28 Aug 2024 14:17:47 +0100 Subject: [PATCH] Fix Foundation import's access level in generated code --- Sources/protoc-gen-swift/FileGenerator.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/protoc-gen-swift/FileGenerator.swift b/Sources/protoc-gen-swift/FileGenerator.swift index 251512e9e..2e2e99775 100644 --- a/Sources/protoc-gen-swift/FileGenerator.swift +++ b/Sources/protoc-gen-swift/FileGenerator.swift @@ -96,7 +96,7 @@ class FileGenerator { } } - p.print("\(comments)import Foundation") + p.print("\(comments)\(generatorOptions.importDirective.snippet) Foundation") if fileDescriptor.isBundledProto { p.print("// 'import \(namer.swiftProtobufModuleName)' suppressed, this proto file is meant to be bundled in the runtime.")