Skip to content

Commit 7f98ba3

Browse files
committed
Remove '@_exported import GRPCCore'
Motivation: We added '@_exported import GRPCCore' to transport modules to make it easier for users as it saves them from adding an import. On reflection we've our position on this has changed and the implicit dependency will likely make things less clear. Modifications: - Remove exported import from in-proc transport - Update tutorials/examples to have explicit 'GRPCCore' imports Result: More explicit dependencies
1 parent 07e38e9 commit 7f98ba3

26 files changed

+29
-21
lines changed

Examples/echo/Package.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ let package = Package(
2121
name: "echo",
2222
platforms: [.macOS("15.0")],
2323
dependencies: [
24+
.package(url: "https://github.com/grpc/grpc-swift", exact: "1.0.0-alpha.1"),
2425
.package(url: "https://github.com/grpc/grpc-swift-protobuf", exact: "1.0.0-alpha.1"),
2526
.package(url: "https://github.com/grpc/grpc-swift-nio-transport", branch: "1.0.0-alpha.1"),
2627
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.5.0"),
@@ -29,6 +30,7 @@ let package = Package(
2930
.executableTarget(
3031
name: "echo",
3132
dependencies: [
33+
.product(name: "GRPCCore", package: "grpc-swift"),
3234
.product(name: "GRPCNIOTransportHTTP2", package: "grpc-swift-nio-transport"),
3335
.product(name: "GRPCProtobuf", package: "grpc-swift-protobuf"),
3436
.product(name: "ArgumentParser", package: "swift-argument-parser"),

Examples/hello-world/Package.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ let package = Package(
2121
name: "hello-world",
2222
platforms: [.macOS("15.0")],
2323
dependencies: [
24+
.package(url: "https://github.com/grpc/grpc-swift", exact: "1.0.0-alpha.1"),
2425
.package(url: "https://github.com/grpc/grpc-swift-protobuf", exact: "1.0.0-alpha.1"),
2526
.package(url: "https://github.com/grpc/grpc-swift-nio-transport", exact: "1.0.0-alpha.1"),
2627
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.5.0"),
@@ -29,6 +30,7 @@ let package = Package(
2930
.executableTarget(
3031
name: "hello-world",
3132
dependencies: [
33+
.product(name: "GRPCCore", package: "grpc-swift"),
3234
.product(name: "GRPCNIOTransportHTTP2", package: "grpc-swift-nio-transport"),
3335
.product(name: "GRPCProtobuf", package: "grpc-swift-protobuf"),
3436
.product(name: "ArgumentParser", package: "swift-argument-parser"),

Examples/hello-world/Sources/Subcommands/Greet.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616

1717
import ArgumentParser
18+
import GRPCNIOCore
1819
import GRPCNIOTransportHTTP2
1920
import GRPCProtobuf
2021

Examples/hello-world/Sources/Subcommands/Serve.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616

1717
import ArgumentParser
18+
import GRPCCore
1819
import GRPCNIOTransportHTTP2
1920
import GRPCProtobuf
2021

Examples/route-guide/Package.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ let package = Package(
2121
name: "route-guide",
2222
platforms: [.macOS("15.0")],
2323
dependencies: [
24+
.package(url: "https://github.com/grpc/grpc-swift", exact: "1.0.0-alpha.1"),
2425
.package(url: "https://github.com/grpc/grpc-swift-protobuf", exact: "1.0.0-alpha.1"),
2526
.package(url: "https://github.com/grpc/grpc-swift-nio-transport", exact: "1.0.0-alpha.1"),
2627
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.5.0"),
@@ -29,6 +30,7 @@ let package = Package(
2930
.executableTarget(
3031
name: "route-guide",
3132
dependencies: [
33+
.product(name: "GRPCCore", package: "grpc-swift"),
3234
.product(name: "GRPCNIOTransportHTTP2", package: "grpc-swift-nio-transport"),
3335
.product(name: "GRPCProtobuf", package: "grpc-swift-protobuf"),
3436
.product(name: "ArgumentParser", package: "swift-argument-parser"),

Examples/route-guide/Sources/Subcommands/GetFeature.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616

1717
import ArgumentParser
18+
import GRPCCore
1819
import GRPCNIOTransportHTTP2
1920

2021
struct GetFeature: AsyncParsableCommand {

Examples/route-guide/Sources/Subcommands/ListFeatures.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616

1717
import ArgumentParser
18+
import GRPCCore
1819
import GRPCNIOTransportHTTP2
1920

2021
struct ListFeatures: AsyncParsableCommand {

Examples/route-guide/Sources/Subcommands/RecordRoute.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616

1717
import ArgumentParser
18+
import GRPCCore
1819
import GRPCNIOTransportHTTP2
1920

2021
struct RecordRoute: AsyncParsableCommand {

Examples/route-guide/Sources/Subcommands/RouteChat.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616

1717
import ArgumentParser
18+
import GRPCCore
1819
import GRPCNIOTransportHTTP2
1920

2021
struct RouteChat: AsyncParsableCommand {

Examples/route-guide/Sources/Subcommands/Serve.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
import ArgumentParser
1818
import Foundation
19+
import GRPCCore
1920
import GRPCNIOTransportHTTP2
2021
import GRPCProtobuf
2122
import Synchronization

0 commit comments

Comments
 (0)