Skip to content

Commit

Permalink
Don't allow implementationOnly with package visibility.
Browse files Browse the repository at this point in the history
Follow up to #1472, looks like we didn't realize this gate should also be updated.
  • Loading branch information
thomasvl committed Jan 3, 2024
1 parent 0a2fdf9 commit d9f89da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/protoc-gen-swift/FileGenerator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ class FileGenerator {
p.print("import Foundation\n")

if self.generatorOptions.implementationOnlyImports,
self.generatorOptions.visibility == .public {
self.generatorOptions.visibility != .internal {
errorString = """
Cannot use @_implementationOnly imports when the proto visibility is public.
Cannot use @_implementationOnly imports when the proto visibility is public or package.
Either change the visibility to internal, or disable @_implementationOnly imports.
"""
return
Expand Down

0 comments on commit d9f89da

Please sign in to comment.