Browse Source

Remove unexported executables from products (#592)

Motivation:

From https://developer.apple.com/documentation/swift_packages/product

> Executable
> Use an executable product to vend an executable target.
> Use this only if you want to make the executable available to clients.

Several executable products are not meant to be made available to
clients, but rather exist for internal integration or performance tests.
Further, most of these products are not namespaced and have generic names.
The code-generator product, `protoc-gen-grpc-swift`, appears to be the
only executable intended for export and it is already appropriately
namespaced.

Modifications:

Unexport the executable products that are not intended for use by clients.
Change the `Makefile` to reference the executable targets rather than their
derived products.

Result:

Fewer potential namespace conflicts. This fixed #591.
Kevin Sweeney 6 years ago
parent
commit
60205adb10
2 changed files with 2 additions and 6 deletions
  1. 2 2
      Makefile
  2. 0 4
      Package.swift

+ 2 - 2
Makefile

@@ -26,10 +26,10 @@ protoc-gen-grpc-swift:
 	${SWIFT_BUILD} --product protoc-gen-grpc-swift
 	${SWIFT_BUILD} --product protoc-gen-grpc-swift
 
 
 interop-test-runner:
 interop-test-runner:
-	${SWIFT_BUILD} --product InteroperabilityTestRunner
+	${SWIFT_BUILD} --target InteroperabilityTestRunner
 
 
 interop-backoff-test-runner:
 interop-backoff-test-runner:
-	${SWIFT_BUILD} --product ConnectionBackoffInteropTestRunner
+	${SWIFT_BUILD} --target ConnectionBackoffInteropTestRunner
 
 
 ### Xcodeproj and LinuxMain
 ### Xcodeproj and LinuxMain
 
 

+ 0 - 4
Package.swift

@@ -21,10 +21,6 @@ let package = Package(
   name: "GRPC",
   name: "GRPC",
   products: [
   products: [
     .library(name: "GRPC", targets: ["GRPC"]),
     .library(name: "GRPC", targets: ["GRPC"]),
-    .executable(name: "InteroperabilityTestRunner", targets: ["GRPCInteroperabilityTests"]),
-    .executable(name: "ConnectionBackoffInteropTestRunner", targets: ["GRPCConnectionBackoffInteropTest"]),
-    .executable(name: "PerformanceTestRunner", targets: ["GRPCPerformanceTests"]),
-    .executable(name: "Echo", targets: ["Echo"]),
     .executable(name: "protoc-gen-grpc-swift", targets: ["protoc-gen-grpc-swift"]),
     .executable(name: "protoc-gen-grpc-swift", targets: ["protoc-gen-grpc-swift"]),
   ],
   ],
   dependencies: [
   dependencies: [