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

Turn on strict concurrency. #57

Merged
merged 4 commits into from
Apr 15, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
testing something
  • Loading branch information
mbrandonw committed Apr 15, 2024
commit b129d2be3016c4fd5ae4cb7bab8806d4f07fa16a
25 changes: 8 additions & 17 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -27,42 +27,33 @@ let package = Package(
"PerceptionMacros",
.product(name: "OrderedCollections", package: "swift-collections"),
.product(name: "XCTestDynamicOverlay", package: "xctest-dynamic-overlay"),
],
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency"),
.unsafeFlags(["-Xfrontend", "-warn-concurrency",])
]
),
.testTarget(
name: "PerceptionTests",
dependencies: ["Perception"],
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency"),
.unsafeFlags(["-Xfrontend", "-warn-concurrency",])
]
dependencies: ["Perception"]
),

.macro(
name: "PerceptionMacros",
dependencies: [
.product(name: "SwiftSyntaxMacros", package: "swift-syntax"),
.product(name: "SwiftCompilerPlugin", package: "swift-syntax"),
],
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency"),
.unsafeFlags(["-Xfrontend", "-warn-concurrency",])
]
),
.testTarget(
name: "PerceptionMacrosTests",
dependencies: [
"PerceptionMacros",
.product(name: "MacroTesting", package: "swift-macro-testing"),
],
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency"),
.unsafeFlags(["-Xfrontend", "-warn-concurrency",])
]
),
]
)

for target in package.targets where target.type != .system {
target.swiftSettings = target.swiftSettings ?? []
target.swiftSettings?.append(
.enableExperimentalFeature("StrictConcurrency")
)
}
2 changes: 2 additions & 0 deletions Sources/Perception/WithPerceptionTracking.swift
Original file line number Diff line number Diff line change
@@ -164,3 +164,5 @@ public enum _PerceptionLocals {
@TaskLocal public static var isInPerceptionTracking = false
@TaskLocal public static var skipPerceptionChecking = false
}

public var x = 1
Loading