On Dec 17, 2020, at 08:17, Aaron Madlon-Kay wrote:
> A port I maintain, Sequel-Ace, has recently switched from including a
> dependency with CocoaPods (which vendors all dependency code alongside the
> main project in the same repo) to Swift Package Manager (which fetches at
> build time):
> https://github.com/Sequel-Ace/Sequel-Ace/pull/586
>
> This is potentially yet another source of fetch-at-build problems that we’ve
> been seeing with other package managing ecosystems (Go, Haskell, etc.). But
> interestingly I can’t even get to that point: it seems packages can’t be
> fetched due to sandboxing issues.
>
>> Build settings from command line:
>> ARCHS = x86_64
>> CLANG_CXX_LIBRARY = libc++
>> CODE_SIGN_IDENTITY =
>> CODE_SIGNING_REQUIRED = NO
>> GCC_VERSION = com.apple.compilers.llvm.clang.1_0
>> MACOSX_DEPLOYMENT_TARGET = 11.1
>> OBJROOT =
>> /opt/local/var/macports/build/_Users_amake_Code_MacPorts_aqua_Sequel-Ace/Sequel-Ace/work/Sequel-Ace-3.0.0-3007/build/
>> SDKROOT =
>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk
>> SYMROOT =
>> /opt/local/var/macports/build/_Users_amake_Code_MacPorts_aqua_Sequel-Ace/Sequel-Ace/work/Sequel-Ace-3.0.0-3007/build/
>> Resolve Package Graph
>> Fetching https://github.com/firebase/firebase-ios-sdk
>> xcodebuild: error: Could not resolve package dependencies:
>> sandbox-exec: sandbox_apply: Operation not permitted
>
> Does anyone know how we might go about accommodating projects using SPM?
I expect you would need to list all of the dependencies as distfiles. If each
dependency comes from a different base URL, you'd need to list all the base
URLs as master_sites and use :tags to tie each distfile and master_site
together. You might need to symlink or copy the distfiles to wherever SPM
expects them to be, or else tell SPM where to find them in distpath. If you
can't figure out how to do that or where it expects them, you'll have to ask
the developers of SPM. If they don't have a way to do that, they'd have to add
that, or you could help them add that.