currently it is not possible to publish a valid package on the swiftpackageindex.com that depends on swift-atomics with AtomicReference enabled, because doing so requires unsafe build flags. there is no reason to require these build flags to be passed, because the swift runtime now guarantees support for doublewide compare-and-exchange anyway.
it is currently not possible to work-around the issue by patching and vendoring the swift-atomics libraries, because _AtomicShims is a C target, and cannot be aliased to a different name. therefore, the patched _AtomicShims module will always conflict with the original module during compilation. this conflict occurs because other packages, such as swift-nio, also depend on swift-atomics.
if swift-atomics were to enable AtomicReference by default and tag a minor release in the canonical apple/swift-atomics repository, libraries that depend on both swift-atomics and swift-nio would be instantly unblocked, because swift-nio specifies an open swift-atomics requirement.
see https://forums.swift.org/t/swift-atomics-no-way-to-enable-atomicreference-on-linux/63169 for a more detailed explanation.
currently it is not possible to publish a valid package on the swiftpackageindex.com that depends on
swift-atomics
withAtomicReference
enabled, because doing so requires unsafe build flags. there is no reason to require these build flags to be passed, because the swift runtime now guarantees support for doublewide compare-and-exchange anyway.it is currently not possible to work-around the issue by patching and vendoring the
swift-atomics
libraries, because_AtomicShims
is a C target, and cannot be aliased to a different name. therefore, the patched_AtomicShims
module will always conflict with the original module during compilation. this conflict occurs because other packages, such asswift-nio
, also depend onswift-atomics
.if
swift-atomics
were to enableAtomicReference
by default and tag a minor release in the canonicalapple/swift-atomics
repository, libraries that depend on bothswift-atomics
andswift-nio
would be instantly unblocked, becauseswift-nio
specifies an openswift-atomics
requirement.