You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Arena currently fetches the sources of direct dependencies and integrates them (flattened) into UserModule. It does not fetch sources of transitive dependencies, i.e. dependencies that are dependencies of your primary dependency.
The sources are actually there, in .build/checkouts, just need to pull them in.
$ ls -l SPM-Playground/SPM-Playground.playgroundbook/Contents/UserModules/UserModule.playgroundmodule/Sources/
total 8
-r--r--r-- 1 sas staff 52 2 Mar 09:18 ArenaTest-ArenaTest.swift
The text was updated successfully, but these errors were encountered:
Is there no way whatsoever to integrate frameworks or multiple modules within playground books? Flattening dependencies into a single namespace is quite error prone and we'll start seeing name clashes sooner or later 🤔
I tried placing them in subfolders but that fails on import into the playground app.
What I'm currently doing is prefixing the files with the module name when copying:
Foo/Helpers.swift -> Foo-Helpers.swift
That should avoid most if not all clashes (as Swift doesn't support files with the same name within the same module if I'm not mistaken). It would be easy to make this even safer by just adding a random hash in case of clashes. (Right now Arena bails out if the target file already exists.)
I wish there was a way to properly add a framework rather than this hack. Not sure if the swift forums are a good place to ask but I might just shoot a message there to see if it's possible somehow :)
Arena currently fetches the sources of direct dependencies and integrates them (flattened) into
UserModule
. It does not fetch sources of transitive dependencies, i.e. dependencies that are dependencies of your primary dependency.The sources are actually there, in
.build/checkouts
, just need to pull them in.Example
The text was updated successfully, but these errors were encountered: