// swift-tools-version: 6.4 import PackageDescription let package = Package( name: "Utility", platforms: [ .macOS(.v15), ], products: [ .library( name: "Utility", targets: [ "Utility" ] ) ], targets: [ .target( name: "Utility", path: "Sources", ), .testTarget( name: "UtilityTests", dependencies: [ .byName(name: "Utility") ], path: "Tests" ), ] ) // Applied to every target: strict memory safety and warnings as errors as guardrails — deprecations stay warnings, so a // dependency update cannot break the build — plus the upcoming concurrency features Swift 7 turns on by default. for target in package.targets { target.swiftSettings = (target.swiftSettings ?? []) + [ .strictMemorySafety(), .treatAllWarnings(as: .error), .treatWarning("DeprecatedDeclaration", as: .warning), .enableUpcomingFeature("NonisolatedNonsendingByDefault"), .enableUpcomingFeature("InferIsolatedConformances"), ] }