We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b33e90 commit c69d459Copy full SHA for c69d459
Sources/protoc-gen-swift/FileGenerator.swift
@@ -90,6 +90,15 @@ class FileGenerator {
90
91
p.print("\(comments)import Foundation")
92
93
+ if self.generatorOptions.implementationOnlyImports,
94
+ self.generatorOptions.visibility == .public {
95
+ errorString = """
96
+ Cannot use @_implementationOnly imports when the proto visibility is public.
97
+ Either change the visibility to internal, or disable @_implementationOnly imports.
98
+ """
99
+ return
100
+ }
101
+
102
// Import all other imports as @_implementationOnly if the visiblity is
103
// internal and the option is set, to avoid exposing internal types to users.
104
let visibilityAnnotation: String = {
0 commit comments