Skip to content

Commit d9ee1e6

Browse files
authored
Add more build settings to test targets (#11)
Motivation: The test targets don't set the same Swift as the library targets. There's no reason for them not to. Modifications: - Apply default settings to test targets. - Add missing 'any' Result: Test targets use Swift 6 language mode, explicit existential any, and internal imports by default
1 parent 9231b0d commit d9ee1e6

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

Package.swift

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ let targets: [Target] = [
5454
.product(name: "GRPCCodeGen", package: "grpc-swift"),
5555
.product(name: "SwiftProtobuf", package: "swift-protobuf"),
5656
.product(name: "SwiftProtobufPluginLibrary", package: "swift-protobuf"),
57-
]
57+
],
58+
swiftSettings: defaultSwiftSettings
5859
),
5960

6061
// Runtime serialization components
@@ -72,7 +73,8 @@ let targets: [Target] = [
7273
.target(name: "GRPCProtobuf"),
7374
.product(name: "GRPCCore", package: "grpc-swift"),
7475
.product(name: "SwiftProtobuf", package: "swift-protobuf"),
75-
]
76+
],
77+
swiftSettings: defaultSwiftSettings
7678
),
7779

7880
// Code generator library for protoc-gen-grpc-swift
@@ -91,7 +93,8 @@ let targets: [Target] = [
9193
.product(name: "GRPCCodeGen", package: "grpc-swift"),
9294
.product(name: "SwiftProtobuf", package: "swift-protobuf"),
9395
.product(name: "SwiftProtobufPluginLibrary", package: "swift-protobuf"),
94-
]
96+
],
97+
swiftSettings: defaultSwiftSettings
9598
)
9699
]
97100

Sources/protoc-gen-grpc-swift/Options.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ enum GenerationError: Error {
2222
/// Raised when a parameter was giving an invalid value
2323
case invalidParameterValue(name: String, value: String)
2424
/// Raised to wrap another error but provide a context message.
25-
case wrappedError(message: String, error: Error)
25+
case wrappedError(message: String, error: any Error)
2626

2727
var localizedDescription: String {
2828
switch self {

0 commit comments

Comments
 (0)