File tree Expand file tree Collapse file tree 3 files changed +12
-20
lines changed
Expand file tree Collapse file tree 3 files changed +12
-20
lines changed Original file line number Diff line number Diff line change @@ -55,14 +55,3 @@ let package = Package(
5555 . package ( url: " https://github.com/apple/swift-docc-plugin " , from: " 1.0.0 " )
5656 )
5757#endif
58-
59- //for target in package.targets {
60- // target.swiftSettings = target.swiftSettings ?? []
61- // target.swiftSettings?.append(
62- // .unsafeFlags([
63- // "-Xfrontend", "-warn-concurrency",
64- // "-Xfrontend", "-enable-actor-data-race-checks",
65- // "-enable-library-evolution",
66- // ])
67- // )
68- //}
Original file line number Diff line number Diff line change @@ -109,13 +109,14 @@ let package = Package(
109109 )
110110#endif
111111
112- //for target in package.targets {
113- // target.swiftSettings = target.swiftSettings ?? []
112+ for target in package . targets {
113+ target. swiftSettings = target. swiftSettings ?? [ ]
114+ target. swiftSettings? . append ( contentsOf: [
115+ . enableExperimentalFeature( " StrictConcurrency " )
116+ ] )
114117// target.swiftSettings?.append(
115118// .unsafeFlags([
116- // "-Xfrontend", "-warn-concurrency",
117- // "-Xfrontend", "-enable-actor-data-race-checks",
118119// "-enable-library-evolution",
119120// ])
120121// )
121- // }
122+ }
Original file line number Diff line number Diff line change @@ -326,9 +326,9 @@ private class DependencyObjects: @unchecked Sendable {
326326 internal init ( ) { }
327327
328328 func store( _ object: AnyObject ) {
329- self . storage. withValue { storage in
330- storage [ ObjectIdentifier ( object ) ] = DependencyObject (
331- object: object,
329+ self . storage. withValue { [ id = ObjectIdentifier ( object ) , object = UncheckedSendable ( object ) ] storage in
330+ storage [ id ] = DependencyObject (
331+ object: object. wrappedValue ,
332332 dependencyValues: DependencyValues . _current
333333 )
334334 Task {
@@ -347,7 +347,9 @@ private class DependencyObjects: @unchecked Sendable {
347347 . compactMap ( { $1 as? _HasInitialValues } )
348348 . first?
349349 . initialValues
350- ?? self . storage. withValue ( { $0 [ ObjectIdentifier ( object) ] ? . dependencyValues } )
350+ ?? self . storage. withValue ( { [ id = ObjectIdentifier ( object) ] in
351+ $0 [ id] ? . dependencyValues
352+ } )
351353 }
352354}
353355
You can’t perform that action at this time.
0 commit comments