Merge pull request #110 from lorentey/there-is-no-such-thing-as-an-implementation-only-import

[native] Stop using @_implementationOnly import in package configs
This commit is contained in:
Karoy Lorentey authored and GitHub committed 2023-12-14 19:34:47 -05:00
commit 1f2007ef41
1 file changed
+10 -2
+10 -2
View File
@@ -16,9 +16,17 @@ internal func _sa_retain_n(_ object: UnsafeMutableRawPointer, _ delta: UInt32)
@_silgen_name("_sa_release_n")
internal func _sa_release_n(_ object: UnsafeMutableRawPointer, _ delta: UInt32)
#elseif ATOMICS_NATIVE_BUILTINS
@_implementationOnly import _AtomicsShims
#else
// Note: with ATOMICS_NATIVE_BUILTINS, this file contains the last remaining
// import of the shims module, and we only need it to get the declarations for
// _sa_retain_n/_sa_release_n. The import is unfortunately still problematic;
// these functions need to be moved into the stdlib or (preferably) we need
// a compiler-level fix for https://github.com/apple/swift/issues/56105 to get rid
// of it.
//
// Hiding the import using @_implementationOnly is not possible unless
// Swift's library evolution dialect is enabled. (Which we cannot easily test
// here.) Perhaps `internal import` will help work around this at some point.
import _AtomicsShims
#endif