bow-swift / bow

🏹 Bow is a cross-platform library for Typed Functional Programming in Swift
https://bow-swift.io
Other
643 stars 32 forks source link

Remove transitive test-only dependencies #584

Closed truizlop closed 4 years ago

truizlop commented 4 years ago

Currently, Bow depends on SwiftCheck to write tests and exposes some libraries for testing laws. SwiftCheck exposes dependencies that are only used for testing, but end up being fetched every time Bow is imported. One of this dependencies causes SwiftUI previews not to load at all because it encounters compilation errors when compiling this dependency.

Given the transitive dependencies for SwiftCheck are only used for testing, they should be removed. Therefore, as Swift Package Manager still does not allow to specify a dependency is only for testing, we have created a fork of SwiftCheck, where the Package.swift is modified to remove the test targets and the dependencies. The Package.swift in Bow now depends on this fork. Consumers of Bow will not fetch the transitive dependencies anymore, thus fixing the SwiftUI preview problem.

miguelangel-dev commented 4 years ago

Good workaround!