Skip to content
Merged
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
27 changes: 19 additions & 8 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// swift-tools-version:5.10
// swift-tools-version:6.0
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftASN1 open source project
//
// Copyright (c) 2019-2023 Apple Inc. and the SwiftASN1 project authors
// Copyright (c) 2019-2025 Apple Inc. and the SwiftASN1 project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
Expand All @@ -16,10 +16,21 @@
import PackageDescription
import class Foundation.ProcessInfo

let upcomingFeatureSwiftSettings: [SwiftSetting] = [
.enableUpcomingFeature("ExistentialAny"),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want to keep ExistentialAny

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enabled it should be ready

.enableUpcomingFeature("StrictConcurrency"),
]
let strictConcurrencyDevelopment = false

let strictConcurrencySettings: [SwiftSetting] = {
var initialSettings: [SwiftSetting] = [
.enableUpcomingFeature("ExistentialAny")
]

if strictConcurrencyDevelopment {
// -warnings-as-errors here is a workaround so that IDE-based development can
// get tripped up on -require-explicit-sendable.
initialSettings.append(.unsafeFlags(["-require-explicit-sendable", "-warnings-as-errors"]))
}

return initialSettings
}()

let package = Package(
name: "swift-asn1",
Expand All @@ -30,12 +41,12 @@ let package = Package(
.target(
name: "SwiftASN1",
exclude: ["CMakeLists.txt"],
swiftSettings: upcomingFeatureSwiftSettings
swiftSettings: strictConcurrencySettings
),
.testTarget(
name: "SwiftASN1Tests",
dependencies: ["SwiftASN1"],
swiftSettings: upcomingFeatureSwiftSettings
swiftSettings: strictConcurrencySettings
),
]
)
Expand Down
Loading