apple / swift-atomics

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

cannot support Cocoapods #16

Closed chunxige closed 2 years ago

lorentey commented 3 years ago

This is a package intended to be used with the Swift Package Manager. Is there a specific reason you cannot add it as a package dependency?

liuxuan30 commented 3 years ago

Hi @lorentey our side issue is, we have an open source framework danielgindi/Charts published on pod, and recently we adopted swift-algorithm, similar to this repo, it can only be adopted via SPM.

After we add it as dependency from SPM, when we try to push an update to pod, pod will complain cannot find swift-algorithm, and we cannot workaround it unless anyone push swift-algorithm o swift-atomics to pod.

It then became choosing a side: either drop pod support, or don't use SPM dependency, or we have to do ugly things like maintain a copy of the repo in our code base and update it manually.

Allan-Nava commented 3 years ago

How can I fix for the .podspec?

Screenshot 2021-04-12 at 13 46 25

lorentey commented 3 years ago

Adding support for alternate build systems is a maintenance burden we are ill-prepared to handle. I'd much prefer to encourage the use of the Swift Package Manager going forward. Apologies if this seems overly cautious; I understand it is inconvenient not to be able to directly use this repository.

If for some reason you must support build systems that aren't compatible with SPM, then vendoring this library is one way to still depend on it. (The license explains the conditions you need to meet when redistributing the code.)

(Adding support for CMake in #25 already makes me very uncomfortable -- and that's a strictly temporary thing, enabling potential adoption of these packages in the package manager itself while the Windows port is being bootstrapped.)

lorentey commented 2 years ago

C.f. https://github.com/apple/swift-collections/issues/131