Swift Package Manager and Command Line Tools

I always arrive late to the party, and am not an early adopter; I have far too many other hobbies to be a tech-masochist. #SegmentationFault11

So I wanted to dive deeper into Swift Package Manager and using it to write my own packages, modules, and even command line tools.

It was not always straightforward and mostly Xcode is to blame.

Ultimately, Xcode is not a reliable environment for some of this stuff because if you make changes to your module, it is unclear as to when your test target(s) become aware of this. Building doesn't help, building for testing doesn't help. Cleaning then building doesn't help, and thus you think you've done something wrong because you'll get compiler errors... in reference to things you already changed, so you just sit there scratching your head.

In the end, quite often you'll be forced to run swift build from a Terminal window in the root folder of your Package, and then swift test to run your unit tests. Then you'll have to handle compiler errors from the output in the terminal window.

So is this a nice process? Absolutely not.

I think when it comes to dependency management, it's easiest to stay with one approach. To me, as much as Cocoapods "is opinionated" and will make it necessary to use a workspace, I find it's the most mature out of all of them, and ultimately the most reliable.

So I will consider whether I use SPM yet. I'd love to as it really seems great.