Cocoanetics / DTFoundation

Standard toolset classes and categories
BSD 2-Clause "Simplified" License
805 stars 237 forks source link

Fixed SPM issues #128

Closed nostradani closed 3 years ago

nostradani commented 3 years ago

This should fix some linker issues when using SPM. Also build issues for the unit tests within SPM were resolved.

Some unit tests currently fail when using SPM since the used resource files are not part of the SPM build at the moment.

odrobnik commented 3 years ago

This is all for the test target, right?

nostradani commented 3 years ago

Well those 3 commits are intentional:

odrobnik commented 3 years ago

This commit of mine had already fixed the animated GIF thing: 614fc0168446c1571dab61eceb7703b08c5d3528

nostradani commented 3 years ago

Ok, I reverted my workaround. I hope this should be ok now.

odrobnik commented 3 years ago

@nostradani I don't quite understand the strategy of having a test target... how would that be used? How can you run the tests? Do you have to have another project that adds a dependency to specifically the test target?

nostradani commented 3 years ago

Well I intended the test target to be used (in the near future) to verify whether the SPM builds behaves correctly. We already saw that there can be slight differences especially if build settings etc. in the Xcode project would be set which weren't reflected in the Package.swift. You can run it manually by invoking xcodebuild or "swift test". Ideally it should be run by a CI on a regular basis (e.g. after each new push). However we are not quite there yet. First I would probably need to upgrade to Swift 5.3 in order to support resources (for some unit tests)