apple / swift-atomics

Low-level atomic operations for Swift
Apache License 2.0
1.05k stars 50 forks source link

Swift Atomics can't be used in Swift Playgrounds.app #62

Open wtholliday opened 1 year ago

wtholliday commented 1 year ago

Swift Atomics can't be used in Swift Playgrounds.app because of a C target. We would like to use Swift Atomics in AudioKit (https://github.com/audiokit/audiokit) and we support Swift Playgrounds.

(Note that this bug is distinct from https://github.com/apple/swift-atomics/issues/55)

Information

Checklist

Steps to Reproduce

  1. Download Swift Playgrounds from App Store
  2. Create a new app
  3. File -> Add Package
  4. Enter https://github.com/apple/swift-atomics
  5. Click the play button

Expected behavior

Swift Atomics can be used in Swift Playgrounds.

Actual behavior

Compilation fails because Swift Atomics uses a C target.

image
rvsrvs commented 1 year ago

actually, i think addressing #55 would fix this as well, but that entails changes that are unlikely to happen.

lorentey commented 1 year ago

Getting rid of the C module with something along the lines of https://github.com/apple/swift-atomics/pull/74 would likely get rid of these issues. However, this will require some Swift compiler & stdlib work, so it will take time.