jflinter / Dwifft

Swift Diff

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Separating into 2 libs

lfarah opened this issue · comments

I think you should separate Dwifft.swift and Dwifft+UIKit.swift, because, as you said, maybe only Dwifft+UIKit.swift is actually useful for people. By doing that, I'd be easier to explain what the it does.
Dwifft is very useful and neat, but it has one major problem: It took me a whole paragraph to understand what could be explained with

Automatic updates of UITableView with animations in Swift 🔶

What are your thoughts?

I'm not going to do this, sorry - the UIKit additions depend entirely on Dwifft itself, and I don't want to maintain a second library so that people can avoid reading a paragraph of text.

Hey, no problem! What about adding that phrase as an easier way to explain Dwift+UIKit?
Also, lemme know if you need any help. Just open the issues and I'll do my best! 😃

I'd like to re-open this issue with the suggestion that the UIKit stuff is put into subspecs. That is really easy to do, and then people can easily include only the parts of the code they need.

See my previous comment - not going to happen, sorry. In my experience, when developing a library the fewer paths to integration (including via subspecs), the fewer things that can go wrong for users. This library is tiny; there is no reason to make it any more modular than it already is.

Alright, no worries. Its your library, so your choice. I really want to just use Dwifft without including the UIKit extension, so it's more complicated for me, in that I now have to manually copy over your file, and then any improvements or bug fixes, I won't get.

One last thought. When using subspecs, by default, CocoaPods includes all of the subspecs.
So pod 'Dwifft' would automatically include the UIKit extension. In order to exclude it, you would need to explicitly make your Podfile read pod 'Dwifft/Core'.

Not trying to be pushy, just wanted to give you some insight into things you may not have considered.

@jack-stripe: To lend some additional context, this is also how we built the Tumblr SDK: I’m sure 99% of users just pod install TMTumblrSDK and grab the whole thing, but for those who are more particular about what they’re including, we allow them to specify more specific subspaces: https://github.com/tumblr/TMTumblrSDK/blob/master/TMTumblrSDK.podspec.json#L29

No opinion from me – I use Dwifft’s UIKit extensions – but echoing @AnthonyMDev that this won’t actually add an extra step except for those who explicitly want to go out of their way to only pull in a subset.