Skip to content

Commit

Permalink
Enable StrictConcurrency=complete in builds.
Browse files Browse the repository at this point in the history
- Add [email protected], [email protected] as clones of the existing
  file.
- Update Package.swift to 5.8 and enable `StrictConcurrency=complete` for
  `SwiftProtobuf` and the related testing libraries.
  • Loading branch information
thomasvl committed Aug 15, 2023
1 parent dc3f5f4 commit 43dc8a1
Show file tree
Hide file tree
Showing 3 changed files with 177 additions and 4 deletions.
17 changes: 13 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.6
// swift-tools-version:5.8

// Package.swift
//
Expand Down Expand Up @@ -37,7 +37,10 @@ let package = Package(
targets: [
.target(
name: "SwiftProtobuf",
exclude: ["CMakeLists.txt"]
exclude: ["CMakeLists.txt"],
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency=complete"),
]
),
.target(
name: "SwiftProtobufPluginLibrary",
Expand All @@ -46,7 +49,10 @@ let package = Package(
),
.target(
name: "SwiftProtobufTestHelpers",
dependencies: ["SwiftProtobuf"]
dependencies: ["SwiftProtobuf"],
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency=complete"),
]
),
.executableTarget(
name: "protoc-gen-swift",
Expand All @@ -67,7 +73,10 @@ let package = Package(
),
.testTarget(
name: "SwiftProtobufTests",
dependencies: ["SwiftProtobuf"]
dependencies: ["SwiftProtobuf"],
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency=complete"),
]
),
.testTarget(
name: "SwiftProtobufPluginLibraryTests",
Expand Down
82 changes: 82 additions & 0 deletions [email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
// swift-tools-version:5.6

// Package.swift
//
// Copyright (c) 2014 - 2018 Apple Inc. and the project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See LICENSE.txt for license information:
// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt
//

import PackageDescription

let package = Package(
name: "SwiftProtobuf",
products: [
.executable(
name: "protoc-gen-swift",
targets: ["protoc-gen-swift"]
),
.library(
name: "SwiftProtobuf",
targets: ["SwiftProtobuf"]
),
.library(
name: "SwiftProtobufPluginLibrary",
targets: ["SwiftProtobufPluginLibrary"]
),
.plugin(
name: "SwiftProtobufPlugin",
targets: ["SwiftProtobufPlugin"]
),
],
dependencies: [
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"),
],
targets: [
.target(
name: "SwiftProtobuf",
exclude: ["CMakeLists.txt"]
),
.target(
name: "SwiftProtobufPluginLibrary",
dependencies: ["SwiftProtobuf"],
exclude: ["CMakeLists.txt"]
),
.target(
name: "SwiftProtobufTestHelpers",
dependencies: ["SwiftProtobuf"]
),
.executableTarget(
name: "protoc-gen-swift",
dependencies: ["SwiftProtobufPluginLibrary", "SwiftProtobuf"],
exclude: ["CMakeLists.txt"]
),
.executableTarget(
name: "Conformance",
dependencies: ["SwiftProtobuf"],
exclude: ["failure_list_swift.txt", "text_format_failure_list_swift.txt"]
),
.plugin(
name: "SwiftProtobufPlugin",
capability: .buildTool(),
dependencies: [
"protoc-gen-swift"
]
),
.testTarget(
name: "SwiftProtobufTests",
dependencies: ["SwiftProtobuf"]
),
.testTarget(
name: "SwiftProtobufPluginLibraryTests",
dependencies: ["SwiftProtobufPluginLibrary", "SwiftProtobufTestHelpers"]
),
.testTarget(
name: "protoc-gen-swiftTests",
dependencies: ["protoc-gen-swift", "SwiftProtobufTestHelpers"]
),
],
swiftLanguageVersions: [.v5]
)
82 changes: 82 additions & 0 deletions [email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
// swift-tools-version:5.6

// Package.swift
//
// Copyright (c) 2014 - 2018 Apple Inc. and the project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See LICENSE.txt for license information:
// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt
//

import PackageDescription

let package = Package(
name: "SwiftProtobuf",
products: [
.executable(
name: "protoc-gen-swift",
targets: ["protoc-gen-swift"]
),
.library(
name: "SwiftProtobuf",
targets: ["SwiftProtobuf"]
),
.library(
name: "SwiftProtobufPluginLibrary",
targets: ["SwiftProtobufPluginLibrary"]
),
.plugin(
name: "SwiftProtobufPlugin",
targets: ["SwiftProtobufPlugin"]
),
],
dependencies: [
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"),
],
targets: [
.target(
name: "SwiftProtobuf",
exclude: ["CMakeLists.txt"]
),
.target(
name: "SwiftProtobufPluginLibrary",
dependencies: ["SwiftProtobuf"],
exclude: ["CMakeLists.txt"]
),
.target(
name: "SwiftProtobufTestHelpers",
dependencies: ["SwiftProtobuf"]
),
.executableTarget(
name: "protoc-gen-swift",
dependencies: ["SwiftProtobufPluginLibrary", "SwiftProtobuf"],
exclude: ["CMakeLists.txt"]
),
.executableTarget(
name: "Conformance",
dependencies: ["SwiftProtobuf"],
exclude: ["failure_list_swift.txt", "text_format_failure_list_swift.txt"]
),
.plugin(
name: "SwiftProtobufPlugin",
capability: .buildTool(),
dependencies: [
"protoc-gen-swift"
]
),
.testTarget(
name: "SwiftProtobufTests",
dependencies: ["SwiftProtobuf"]
),
.testTarget(
name: "SwiftProtobufPluginLibraryTests",
dependencies: ["SwiftProtobufPluginLibrary", "SwiftProtobufTestHelpers"]
),
.testTarget(
name: "protoc-gen-swiftTests",
dependencies: ["protoc-gen-swift", "SwiftProtobufTestHelpers"]
),
],
swiftLanguageVersions: [.v5]
)

0 comments on commit 43dc8a1

Please sign in to comment.