jlandon / Alexandria

A library of Swift extensions to turbocharge your iOS development.
https://jlandon.github.io/Alexandria
MIT License
65 stars 8 forks source link

SPM Support #1

Closed jlandon closed 5 years ago

jlandon commented 8 years ago

As it stands right now, Swift Package Manager (SPM) requires all source files to be located in a root Sources/Source/src/srcs directory. This presents a few problems for this repo. The current directory structure groups source files based on functionality (e.g. extensions, utility classes, views, etc.). It is possible to simply nest these directories inside of Sources/, however, importing Alexandria as a whole is then not possible. For example, with a directory hierarchy such as this:

Sources/
   - Extensions/
   - Generics/
   - Transformers/
   - Types/
   - Utilities/
   - Views/

After building the package (i.e. swift build), each subdirectory is created as its own framework, so each one must be imported separately.

import Extensions
import Generics
...

Additionally, SPM currently has "no support for iOS, watchOS, or tvOS platforms". Since this repo currently only supports iOS projects and includes many extensions/utilities/views depending upon UIKit, there isn't much incentive to include SPM support at this time. When iOS support is inevitably added to SPM, we'll revisit this.

hsoi commented 8 years ago

Note that some of the above issues no longer apply (they did back in JunkDrawer, but in anticipation of SPM support we did centralize into Sources for Alexandria.

But the latter issue remains our chief blocker.