Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Swift 6 #110

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
// swift-tools-version: 5.9
import PackageDescription

var package = Package(name: "swift-networking")
// swift-tools-version: 6.0
@preconcurrency import PackageDescription

var package = Package(
name: "swift-networking",
swiftLanguageModes: [
.v5,
.version("6"),
]
)

// MARK: 💫 Package Customization

Expand Down Expand Up @@ -184,7 +190,7 @@ extension Target.Dependency {
extension [SwiftSetting] {
#if swift(>=6)
static let concurrency: Self = [
// Already enabled
.enableUpcomingFeature("InferSendableFromCaptures")
]
#else
static let concurrency: Self = [
Expand Down Expand Up @@ -398,7 +404,7 @@ infix operator <>
extension String {

/// Adds the string as a module to the package, using the provided module
static func <+ (lhs: String, rhs: Module) {
@MainActor static func <+ (lhs: String, rhs: Module) {
var module = rhs
module.name = lhs
package.add(module: module)
Expand All @@ -409,7 +415,7 @@ infix operator <+
extension String {

/// Adds the string as a module to the package, allowing for inline customization
static func <> (lhs: String, rhs: Module.Builder) {
@MainActor static func <> (lhs: String, rhs: Module.Builder) {
var module = Module(name: lhs)
rhs(&module)
package.add(module: module)
Expand Down
Loading