Skip to content

Commit

Permalink
Add more build settings to test targets (#11)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
glbrntt authored Nov 6, 2024
1 parent 9231b0d commit d9ee1e6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ let targets: [Target] = [
.product(name: "GRPCCodeGen", package: "grpc-swift"),
.product(name: "SwiftProtobuf", package: "swift-protobuf"),
.product(name: "SwiftProtobufPluginLibrary", package: "swift-protobuf"),
]
],
swiftSettings: defaultSwiftSettings
),

// Runtime serialization components
Expand All @@ -72,7 +73,8 @@ let targets: [Target] = [
.target(name: "GRPCProtobuf"),
.product(name: "GRPCCore", package: "grpc-swift"),
.product(name: "SwiftProtobuf", package: "swift-protobuf"),
]
],
swiftSettings: defaultSwiftSettings
),

// Code generator library for protoc-gen-grpc-swift
Expand All @@ -91,7 +93,8 @@ let targets: [Target] = [
.product(name: "GRPCCodeGen", package: "grpc-swift"),
.product(name: "SwiftProtobuf", package: "swift-protobuf"),
.product(name: "SwiftProtobufPluginLibrary", package: "swift-protobuf"),
]
],
swiftSettings: defaultSwiftSettings
)
]

Expand Down
2 changes: 1 addition & 1 deletion Sources/protoc-gen-grpc-swift/Options.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ enum GenerationError: Error {
/// Raised when a parameter was giving an invalid value
case invalidParameterValue(name: String, value: String)
/// Raised to wrap another error but provide a context message.
case wrappedError(message: String, error: Error)
case wrappedError(message: String, error: any Error)

var localizedDescription: String {
switch self {
Expand Down

0 comments on commit d9ee1e6

Please sign in to comment.