Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Examples/v2/echo/Generated/echo.grpc.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions Examples/v2/echo/Subcommands/Collect.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions Examples/v2/hello-world/Generated/helloworld.grpc.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Examples/v2/hello-world/HelloWorld.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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, *)
Expand Down
6 changes: 3 additions & 3 deletions Examples/v2/hello-world/Subcommands/Greet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions Examples/v2/hello-world/Subcommands/Serve.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions Examples/v2/route-guide/Generated/route_guide.grpc.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 4 additions & 8 deletions Package@swift-6.swift
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,7 @@ extension Target {
],
swiftSettings: [
.swiftLanguageMode(.v6),
.enableUpcomingFeature("ExistentialAny"),
.enableUpcomingFeature("InternalImportsByDefault")
.enableUpcomingFeature("ExistentialAny")
]
)
}
Expand Down Expand Up @@ -710,8 +709,7 @@ extension Target {
path: "Examples/v2/echo",
swiftSettings: [
.swiftLanguageMode(.v6),
.enableUpcomingFeature("ExistentialAny"),
.enableUpcomingFeature("InternalImportsByDefault")
.enableUpcomingFeature("ExistentialAny")
]
)
}
Expand Down Expand Up @@ -773,8 +771,7 @@ extension Target {
],
swiftSettings: [
.swiftLanguageMode(.v6),
.enableUpcomingFeature("ExistentialAny"),
.enableUpcomingFeature("InternalImportsByDefault")
.enableUpcomingFeature("ExistentialAny")
]
)
}
Expand Down Expand Up @@ -837,8 +834,7 @@ extension Target {
],
swiftSettings: [
.swiftLanguageMode(.v6),
.enableUpcomingFeature("ExistentialAny"),
.enableUpcomingFeature("InternalImportsByDefault")
.enableUpcomingFeature("ExistentialAny")
]
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 4 additions & 4 deletions Sources/performance-worker/BenchmarkClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions Sources/performance-worker/BenchmarkService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

internal import GRPCCore
private import Synchronization
import GRPCCore
import Synchronization

import struct Foundation.Data

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions Sources/performance-worker/PerformanceWorker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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, *)
Expand Down
6 changes: 3 additions & 3 deletions Sources/performance-worker/RPCStats.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions Sources/protoc-gen-grpc-swift/Options.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Tests/GRPCHTTP2TransportTests/ControlService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

internal import GRPCCore
import GRPCCore

import struct Foundation.Data

Expand Down
4 changes: 2 additions & 2 deletions Tests/GRPCHTTP2TransportTests/Generated/control.grpc.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions Tests/GRPCHTTP2TransportTests/HTTP2TransportNIOPosixTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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, *)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
12 changes: 6 additions & 6 deletions Tests/GRPCHTTP2TransportTests/HTTP2TransportTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

private import XCTest
import XCTest

func XCTAssertThrowsError<T, E: Error>(
ofType: E.Type,
Expand Down
4 changes: 2 additions & 2 deletions Tests/GRPCHTTP2TransportTests/XCTestCase+Vsock.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

private import NIOPosix
internal import XCTest
import NIOPosix
import XCTest

extension XCTestCase {
func vsockAvailable() -> Bool {
Expand Down
Loading