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 498b0b8 commit 71f3b3b
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 @@ -91,9 +91,9 @@ class FileGenerator {
p.print("\(comments)import Foundation")

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 71f3b3b

Please sign in to comment.