From 6d10457738408d65157830d4a34a645f0569f15b Mon Sep 17 00:00:00 2001 From: feuyeux Date: Sun, 6 Oct 2024 01:50:33 +0800 Subject: [PATCH] :( --- hello-grpc-swift/Package.swift | 16 ++++++++++------ hello-grpc-swift/README.md | 9 +++++++++ hello-grpc-swift/fmt.sh | 3 ++- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/hello-grpc-swift/Package.swift b/hello-grpc-swift/Package.swift index 5b91890..ee0cee4 100644 --- a/hello-grpc-swift/Package.swift +++ b/hello-grpc-swift/Package.swift @@ -15,20 +15,24 @@ extension Target.Dependency { static let helloCommon: Self = .target(name: "HelloCommon") // Product dependencies - static let argumentParser: Self = .product(name: "ArgumentParser", package: "swift-argument-parser") + static let argumentParser: Self = .product( + name: "ArgumentParser", package: "swift-argument-parser") static let grpc: Self = .product(name: "GRPC", package: "grpc-swift") static let nio: Self = .product(name: "NIO", package: "swift-nio") - static let nioConcurrencyHelpers: Self = .product(name: "NIOConcurrencyHelpers", package: "swift-nio") + static let nioConcurrencyHelpers: Self = .product( + name: "NIOConcurrencyHelpers", package: "swift-nio") static let nioCore: Self = .product(name: "NIOCore", package: "swift-nio") static let nioEmbedded: Self = .product(name: "NIOEmbedded", package: "swift-nio") static let nioExtras: Self = .product(name: "NIOExtras", package: "swift-nio-extras") - static let nioFoundationCompat: Self = .product(name: "NIOFoundationCompat", package: "swift-nio") + static let nioFoundationCompat: Self = .product( + name: "NIOFoundationCompat", package: "swift-nio") static let nioHTTP1: Self = .product(name: "NIOHTTP1", package: "swift-nio") static let nioHTTP2: Self = .product(name: "NIOHTTP2", package: "swift-nio-http2") static let nioPosix: Self = .product(name: "NIOPosix", package: "swift-nio") static let nioSSL: Self = .product(name: "NIOSSL", package: "swift-nio-ssl") static let nioTLS: Self = .product(name: "NIOTLS", package: "swift-nio") - static let nioTransportServices: Self = .product(name: "NIOTransportServices", package: "swift-nio-transport-services") + static let nioTransportServices: Self = .product( + name: "NIOTransportServices", package: "swift-nio-transport-services") static let logging: Self = .product(name: "Logging", package: "swift-log") static let protobuf: Self = .product(name: "SwiftProtobuf", package: "swift-protobuf") } @@ -44,7 +48,7 @@ extension Target { ], path: "Sources/Common", exclude: [ - "landing.proto", + "landing.proto" ] ) @@ -76,7 +80,7 @@ extension Target { static let helloCommonUT: Target = .testTarget( name: "HelloCommonTest", dependencies: [ - "HelloCommon", + "HelloCommon" ], path: "Tests/helloTests" ) diff --git a/hello-grpc-swift/README.md b/hello-grpc-swift/README.md index 69d10ec..a86cb75 100644 --- a/hello-grpc-swift/README.md +++ b/hello-grpc-swift/README.md @@ -62,8 +62,17 @@ rm -rf .build Clean: ⇧shift+⌘cmd+K in xcode ``` +```sh + +export proxy_port=56458 +export http_proxy=127.0.0.1:$proxy_port +export https_proxy=127.0.0.1:$proxy_port +``` + ```sh swift build +swift build --product protoc-gen-swift +swift build --product protoc-gen-grpc-swift ``` ## run diff --git a/hello-grpc-swift/fmt.sh b/hello-grpc-swift/fmt.sh index 410cd1f..46e6a2e 100755 --- a/hello-grpc-swift/fmt.sh +++ b/hello-grpc-swift/fmt.sh @@ -5,4 +5,5 @@ cd "$( )/" || exit set -e -swiftformat --indent 4 --swiftversion 5.10 --exclude "**/*.grpc.swift,**/*.pb.swift" . \ No newline at end of file +# swiftformat --indent 4 --swiftversion 5.10 --exclude "**/*.grpc.swift,**/*.pb.swift" . +swift-format --indent 4 --swiftversion 6.0.1 --exclude "**/*.grpc.swift,**/*.pb.swift" .