diff --git a/Examples/v2/echo/Generated/echo.grpc.swift b/Examples/v2/echo/Generated/echo.grpc.swift index 6c5f82d29..856ccc074 100644 --- a/Examples/v2/echo/Generated/echo.grpc.swift +++ b/Examples/v2/echo/Generated/echo.grpc.swift @@ -21,8 +21,8 @@ // For information on using the generated types, please see the documentation: // https://github.com/grpc/grpc-swift -internal import GRPCCore -internal import GRPCProtobuf +import GRPCCore +import GRPCProtobuf internal enum Echo_Echo { internal static let descriptor = GRPCCore.ServiceDescriptor.echo_Echo diff --git a/Examples/v2/echo/Subcommands/Collect.swift b/Examples/v2/echo/Subcommands/Collect.swift index a617e83b9..63402e0c6 100644 --- a/Examples/v2/echo/Subcommands/Collect.swift +++ b/Examples/v2/echo/Subcommands/Collect.swift @@ -14,10 +14,10 @@ * limitations under the License. */ -internal import ArgumentParser -private import GRPCCore -private import GRPCHTTP2Core -private import GRPCHTTP2TransportNIOPosix +import ArgumentParser +import GRPCCore +import GRPCHTTP2Core +import GRPCHTTP2TransportNIOPosix @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) struct Collect: AsyncParsableCommand { diff --git a/Examples/v2/hello-world/Generated/helloworld.grpc.swift b/Examples/v2/hello-world/Generated/helloworld.grpc.swift index 319c5e65e..0336b83ca 100644 --- a/Examples/v2/hello-world/Generated/helloworld.grpc.swift +++ b/Examples/v2/hello-world/Generated/helloworld.grpc.swift @@ -21,8 +21,8 @@ // For information on using the generated types, please see the documentation: // https://github.com/grpc/grpc-swift -internal import GRPCCore -internal import GRPCProtobuf +import GRPCCore +import GRPCProtobuf internal enum Helloworld_Greeter { internal static let descriptor = GRPCCore.ServiceDescriptor.helloworld_Greeter diff --git a/Examples/v2/hello-world/HelloWorld.swift b/Examples/v2/hello-world/HelloWorld.swift index 1427fecd7..8d467670a 100644 --- a/Examples/v2/hello-world/HelloWorld.swift +++ b/Examples/v2/hello-world/HelloWorld.swift @@ -14,7 +14,7 @@ * limitations under the License. */ -internal import ArgumentParser +import ArgumentParser @main @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) diff --git a/Examples/v2/hello-world/Subcommands/Greet.swift b/Examples/v2/hello-world/Subcommands/Greet.swift index 9d97bb517..aca973814 100644 --- a/Examples/v2/hello-world/Subcommands/Greet.swift +++ b/Examples/v2/hello-world/Subcommands/Greet.swift @@ -14,9 +14,9 @@ * limitations under the License. */ -internal import ArgumentParser -internal import GRPCHTTP2Transport -internal import GRPCProtobuf +import ArgumentParser +import GRPCHTTP2Transport +import GRPCProtobuf @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) struct Greet: AsyncParsableCommand { diff --git a/Examples/v2/hello-world/Subcommands/Serve.swift b/Examples/v2/hello-world/Subcommands/Serve.swift index 1d60c82d7..fe4e462ea 100644 --- a/Examples/v2/hello-world/Subcommands/Serve.swift +++ b/Examples/v2/hello-world/Subcommands/Serve.swift @@ -14,9 +14,9 @@ * limitations under the License. */ -internal import ArgumentParser -internal import GRPCHTTP2Transport -internal import GRPCProtobuf +import ArgumentParser +import GRPCHTTP2Transport +import GRPCProtobuf @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) struct Serve: AsyncParsableCommand { diff --git a/Examples/v2/route-guide/Generated/route_guide.grpc.swift b/Examples/v2/route-guide/Generated/route_guide.grpc.swift index e2fd21a5f..cf7cb7182 100644 --- a/Examples/v2/route-guide/Generated/route_guide.grpc.swift +++ b/Examples/v2/route-guide/Generated/route_guide.grpc.swift @@ -21,8 +21,8 @@ // For information on using the generated types, please see the documentation: // https://github.com/grpc/grpc-swift -internal import GRPCCore -internal import GRPCProtobuf +import GRPCCore +import GRPCProtobuf internal enum Routeguide_RouteGuide { internal static let descriptor = GRPCCore.ServiceDescriptor.routeguide_RouteGuide diff --git a/Package@swift-6.swift b/Package@swift-6.swift index 7b5b81394..04dee5de7 100644 --- a/Package@swift-6.swift +++ b/Package@swift-6.swift @@ -346,8 +346,7 @@ extension Target { ], swiftSettings: [ .swiftLanguageMode(.v6), - .enableUpcomingFeature("ExistentialAny"), - .enableUpcomingFeature("InternalImportsByDefault") + .enableUpcomingFeature("ExistentialAny") ] ) } @@ -710,8 +709,7 @@ extension Target { path: "Examples/v2/echo", swiftSettings: [ .swiftLanguageMode(.v6), - .enableUpcomingFeature("ExistentialAny"), - .enableUpcomingFeature("InternalImportsByDefault") + .enableUpcomingFeature("ExistentialAny") ] ) } @@ -773,8 +771,7 @@ extension Target { ], swiftSettings: [ .swiftLanguageMode(.v6), - .enableUpcomingFeature("ExistentialAny"), - .enableUpcomingFeature("InternalImportsByDefault") + .enableUpcomingFeature("ExistentialAny") ] ) } @@ -837,8 +834,7 @@ extension Target { ], swiftSettings: [ .swiftLanguageMode(.v6), - .enableUpcomingFeature("ExistentialAny"), - .enableUpcomingFeature("InternalImportsByDefault") + .enableUpcomingFeature("ExistentialAny") ] ) } diff --git a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec03-step04-gen-grpc.txt b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec03-step04-gen-grpc.txt index 1c084165e..ab2c22fd8 100644 --- a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec03-step04-gen-grpc.txt +++ b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec03-step04-gen-grpc.txt @@ -2,5 +2,4 @@ $ protoc --plugin=.build/debug/protoc-gen-grpc-swift \ -I Protos \ --grpc-swift_out=Sources/Generated \ --grpc-swift_opt=_V2=true \ - --grpc-swift_opt=UseAccessLevelOnImports=false \ Protos/route_guide.proto diff --git a/Sources/performance-worker/BenchmarkClient.swift b/Sources/performance-worker/BenchmarkClient.swift index 3e1318b12..57afa894f 100644 --- a/Sources/performance-worker/BenchmarkClient.swift +++ b/Sources/performance-worker/BenchmarkClient.swift @@ -14,10 +14,10 @@ * limitations under the License. */ -private import Foundation -internal import GRPCCore -private import NIOConcurrencyHelpers -private import Synchronization +import Foundation +import GRPCCore +import NIOConcurrencyHelpers +import Synchronization @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) final class BenchmarkClient: Sendable { diff --git a/Sources/performance-worker/BenchmarkService.swift b/Sources/performance-worker/BenchmarkService.swift index 112b1f1f0..11631eaaf 100644 --- a/Sources/performance-worker/BenchmarkService.swift +++ b/Sources/performance-worker/BenchmarkService.swift @@ -14,8 +14,8 @@ * limitations under the License. */ -internal import GRPCCore -private import Synchronization +import GRPCCore +import Synchronization import struct Foundation.Data diff --git a/Sources/performance-worker/Generated/grpc_testing_benchmark_service.grpc.swift b/Sources/performance-worker/Generated/grpc_testing_benchmark_service.grpc.swift index 47cbbeccb..663922d0b 100644 --- a/Sources/performance-worker/Generated/grpc_testing_benchmark_service.grpc.swift +++ b/Sources/performance-worker/Generated/grpc_testing_benchmark_service.grpc.swift @@ -24,8 +24,8 @@ // For information on using the generated types, please see the documentation: // https://github.com/grpc/grpc-swift -internal import GRPCCore -internal import GRPCProtobuf +import GRPCCore +import GRPCProtobuf internal enum Grpc_Testing_BenchmarkService { internal static let descriptor = GRPCCore.ServiceDescriptor.grpc_testing_BenchmarkService diff --git a/Sources/performance-worker/Generated/grpc_testing_worker_service.grpc.swift b/Sources/performance-worker/Generated/grpc_testing_worker_service.grpc.swift index 467e2cdac..f1637253f 100644 --- a/Sources/performance-worker/Generated/grpc_testing_worker_service.grpc.swift +++ b/Sources/performance-worker/Generated/grpc_testing_worker_service.grpc.swift @@ -24,8 +24,8 @@ // For information on using the generated types, please see the documentation: // https://github.com/grpc/grpc-swift -internal import GRPCCore -internal import GRPCProtobuf +import GRPCCore +import GRPCProtobuf internal enum Grpc_Testing_WorkerService { internal static let descriptor = GRPCCore.ServiceDescriptor.grpc_testing_WorkerService diff --git a/Sources/performance-worker/PerformanceWorker.swift b/Sources/performance-worker/PerformanceWorker.swift index e93bfca60..83c9f7e82 100644 --- a/Sources/performance-worker/PerformanceWorker.swift +++ b/Sources/performance-worker/PerformanceWorker.swift @@ -14,11 +14,11 @@ * limitations under the License. */ -internal import ArgumentParser -private import GRPCCore -private import GRPCHTTP2Core -private import GRPCHTTP2TransportNIOPosix -private import NIOPosix +import ArgumentParser +import GRPCCore +import GRPCHTTP2Core +import GRPCHTTP2TransportNIOPosix +import NIOPosix @main @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) diff --git a/Sources/performance-worker/RPCStats.swift b/Sources/performance-worker/RPCStats.swift index ef0703d9e..bc2bba74b 100644 --- a/Sources/performance-worker/RPCStats.swift +++ b/Sources/performance-worker/RPCStats.swift @@ -14,9 +14,9 @@ * limitations under the License. */ -private import Foundation -internal import GRPCCore -internal import NIOConcurrencyHelpers +import Foundation +import GRPCCore +import NIOConcurrencyHelpers /// Stores the real time latency histogram and error code count dictionary, /// for the RPCs made by a particular GRPCClient. It gets updated after diff --git a/Sources/protoc-gen-grpc-swift/Options.swift b/Sources/protoc-gen-grpc-swift/Options.swift index 7c7077eff..2b0f96d46 100644 --- a/Sources/protoc-gen-grpc-swift/Options.swift +++ b/Sources/protoc-gen-grpc-swift/Options.swift @@ -74,16 +74,10 @@ struct GeneratorOptions { private(set) var gRPCModuleName = "GRPC" private(set) var swiftProtobufModuleName = "SwiftProtobuf" private(set) var generateReflectionData = false - #if compiler(>=6.0) private(set) var v2 = false #endif - - #if compiler(>=6.0) - private(set) var useAccessLevelOnImports = true - #else private(set) var useAccessLevelOnImports = false - #endif init(parameter: any CodeGeneratorParameter) throws { try self.init(pairs: parameter.parsedPairs) diff --git a/Tests/GRPCHTTP2TransportTests/ControlService.swift b/Tests/GRPCHTTP2TransportTests/ControlService.swift index e9d5b322f..dfb83b132 100644 --- a/Tests/GRPCHTTP2TransportTests/ControlService.swift +++ b/Tests/GRPCHTTP2TransportTests/ControlService.swift @@ -14,7 +14,7 @@ * limitations under the License. */ -internal import GRPCCore +import GRPCCore import struct Foundation.Data diff --git a/Tests/GRPCHTTP2TransportTests/Generated/control.grpc.swift b/Tests/GRPCHTTP2TransportTests/Generated/control.grpc.swift index 6ec4497cf..ebd5c8e76 100644 --- a/Tests/GRPCHTTP2TransportTests/Generated/control.grpc.swift +++ b/Tests/GRPCHTTP2TransportTests/Generated/control.grpc.swift @@ -22,8 +22,8 @@ // For information on using the generated types, please see the documentation: // https://github.com/grpc/grpc-swift -internal import GRPCCore -internal import GRPCProtobuf +import GRPCCore +import GRPCProtobuf internal enum Control { internal static let descriptor = GRPCCore.ServiceDescriptor.Control diff --git a/Tests/GRPCHTTP2TransportTests/HTTP2TransportNIOPosixTests.swift b/Tests/GRPCHTTP2TransportTests/HTTP2TransportNIOPosixTests.swift index 28bc49967..4f6993dde 100644 --- a/Tests/GRPCHTTP2TransportTests/HTTP2TransportNIOPosixTests.swift +++ b/Tests/GRPCHTTP2TransportTests/HTTP2TransportNIOPosixTests.swift @@ -14,13 +14,13 @@ * limitations under the License. */ -private import GRPCCore -private import GRPCHTTP2Core -private import GRPCHTTP2TransportNIOPosix -internal import XCTest +import GRPCCore +import GRPCHTTP2Core +import GRPCHTTP2TransportNIOPosix +import XCTest #if canImport(NIOSSL) -private import NIOSSL +import NIOSSL #endif @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) diff --git a/Tests/GRPCHTTP2TransportTests/HTTP2TransportNIOTransportServicesTests.swift b/Tests/GRPCHTTP2TransportTests/HTTP2TransportNIOTransportServicesTests.swift index be54c0890..8219540ec 100644 --- a/Tests/GRPCHTTP2TransportTests/HTTP2TransportNIOTransportServicesTests.swift +++ b/Tests/GRPCHTTP2TransportTests/HTTP2TransportNIOTransportServicesTests.swift @@ -15,10 +15,10 @@ */ #if canImport(Network) -private import GRPCCore -private import GRPCHTTP2Core -internal import GRPCHTTP2TransportNIOTransportServices -internal import XCTest +import GRPCCore +import GRPCHTTP2Core +import GRPCHTTP2TransportNIOTransportServices +import XCTest @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) final class HTTP2TransportNIOTransportServicesTests: XCTestCase { diff --git a/Tests/GRPCHTTP2TransportTests/HTTP2TransportTests.swift b/Tests/GRPCHTTP2TransportTests/HTTP2TransportTests.swift index b0652c2fe..2de224ffc 100644 --- a/Tests/GRPCHTTP2TransportTests/HTTP2TransportTests.swift +++ b/Tests/GRPCHTTP2TransportTests/HTTP2TransportTests.swift @@ -14,12 +14,12 @@ * limitations under the License. */ -internal import GRPCCore -private import GRPCHTTP2Core -private import GRPCHTTP2TransportNIOPosix -private import GRPCHTTP2TransportNIOTransportServices -private import GRPCProtobuf -internal import XCTest +import GRPCCore +import GRPCHTTP2Core +import GRPCHTTP2TransportNIOPosix +import GRPCHTTP2TransportNIOTransportServices +import GRPCProtobuf +import XCTest @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) final class HTTP2TransportTests: XCTestCase { diff --git a/Tests/GRPCHTTP2TransportTests/Test Utilities/HTTP2StatusCodeServer.swift b/Tests/GRPCHTTP2TransportTests/Test Utilities/HTTP2StatusCodeServer.swift index 3e1df197e..d4f6e00ee 100644 --- a/Tests/GRPCHTTP2TransportTests/Test Utilities/HTTP2StatusCodeServer.swift +++ b/Tests/GRPCHTTP2TransportTests/Test Utilities/HTTP2StatusCodeServer.swift @@ -14,11 +14,11 @@ * limitations under the License. */ -internal import GRPCHTTP2Core -private import NIOCore -private import NIOHPACK -private import NIOHTTP2 -private import NIOPosix +import GRPCHTTP2Core +import NIOCore +import NIOHPACK +import NIOHTTP2 +import NIOPosix /// An HTTP/2 test server which only responds to request headers by sending response headers and /// then closing. Each stream will be closed with the ":status" set to the value of the diff --git a/Tests/GRPCHTTP2TransportTests/Test Utilities/XCTest+Utilities.swift b/Tests/GRPCHTTP2TransportTests/Test Utilities/XCTest+Utilities.swift index 053065da4..3848388bc 100644 --- a/Tests/GRPCHTTP2TransportTests/Test Utilities/XCTest+Utilities.swift +++ b/Tests/GRPCHTTP2TransportTests/Test Utilities/XCTest+Utilities.swift @@ -14,7 +14,7 @@ * limitations under the License. */ -private import XCTest +import XCTest func XCTAssertThrowsError( ofType: E.Type, diff --git a/Tests/GRPCHTTP2TransportTests/XCTestCase+Vsock.swift b/Tests/GRPCHTTP2TransportTests/XCTestCase+Vsock.swift index d66676c99..cb613fb63 100644 --- a/Tests/GRPCHTTP2TransportTests/XCTestCase+Vsock.swift +++ b/Tests/GRPCHTTP2TransportTests/XCTestCase+Vsock.swift @@ -14,8 +14,8 @@ * limitations under the License. */ -private import NIOPosix -internal import XCTest +import NIOPosix +import XCTest extension XCTestCase { func vsockAvailable() -> Bool {