소스 검색

Enable MemberImportVisibility check on all targets (#2142)

Enable MemberImportVisibility check on all targets. Use a standard
string header and footer to bracket the new block for ease of updating
in the future with scripts.

---------

Co-authored-by: George Barnett <gbarnett@apple.com>
Rick Newton-Rogers 1 년 전
부모
커밋
7ed6f7d194

+ 1 - 0
Package.swift

@@ -49,6 +49,7 @@ let defaultSwiftSettings: [SwiftSetting] = [
   .swiftLanguageMode(.v6),
   .enableUpcomingFeature("ExistentialAny"),
   .enableUpcomingFeature("InternalImportsByDefault"),
+  .enableUpcomingFeature("MemberImportVisibility"),
 ]
 
 let targets: [Target] = [

+ 2 - 0
Sources/GRPCCodeGen/CodeGenerationRequest.swift

@@ -14,6 +14,8 @@
  * limitations under the License.
  */
 
+import Foundation
+
 /// Describes the services, dependencies and trivia from an IDL file,
 /// and the IDL itself through its specific serializer and deserializer.
 public struct CodeGenerationRequest {

+ 2 - 0
Sources/GRPCCodeGen/Internal/Translator/Docs.swift

@@ -14,6 +14,8 @@
  * limitations under the License.
  */
 
+import Foundation
+
 package enum Docs {
   package static func suffix(_ header: String, withDocs footer: String) -> String {
     if footer.isEmpty {

+ 1 - 0
Tests/GRPCCoreTests/Configuration/ServiceConfigCodingTests.swift

@@ -16,6 +16,7 @@
 
 import Foundation
 import GRPCCore
+import SwiftProtobuf
 import XCTest
 
 final class ServiceConfigCodingTests: XCTestCase {

+ 1 - 0
Tests/GRPCCoreTests/Test Utilities/Services/HelloWorld.swift

@@ -13,6 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+import Foundation
 import GRPCCore
 
 struct HelloWorld: RegistrableRPCService {