We should be able to raise the deployment target of SourceKit-LSP to macOS 14.0 and thus use the atomics from the standard library.
Activity
ahoppen commentedon Jan 23, 2025
Synced to Apple’s issue tracker as rdar://143438616
mustiikhalil commentedon Jan 25, 2025
I wonder if replacing it with a
ManagedAtomic<Type>
would be more than enough or does it have to beUnsafeAtomic
?ahoppen commentedon Jan 27, 2025
I meant
ManagedAtomic
by the atomic types in the standard library.mustiikhalil commentedon Jan 27, 2025
Perfect! I can take a look at this by the end of this week
mustiikhalil commentedon Feb 4, 2025
Do we want to always import
swift-atomics
in each and every framework? or should we write a wrapper around it?example:
The code above will replace somthing like this:
ahoppen commentedon Feb 4, 2025
I was thinking to use the
Atomic
type that’s available in the standard library: https://github.com/swiftlang/swift-evolution/blob/main/proposals/0410-atomics.mdmustiikhalil commentedon Feb 4, 2025
Oh I didn't know that existed within the
Synchronization
framework.At the same time wouldn't that only work on swift
6
and above? Is deprecating swift 5.10 support in the libraries roadmap?https://github.com/swiftlang/swift/blob/c14561fba3c057a247f5bcaa514536cd0d22102b/stdlib/public/Synchronization/Atomics/Atomic.swift#L20
(And it seems that that Atomics is based on macOS 15, not sure yet. Still trying to figure out why Xcode is misbehaving)
ahoppen commentedon Feb 4, 2025
Yes, we can raise the deployment target to macOS 15 on
main
, so we can useSynchronization
.