swift-http-types
swift-http-types copied to clipboard
Move foundation extensions behind traits
Motivation
Currently this package extends various Foundation types in a separate module. One problem with this module is that it unconditionally imports FoundationNetworking. This is undesirable on Linux since it brings curl as a dependency. Additionally, the discoverability of having to import an additional module isn't great.
Modification
This PR introduces two new traits that enable extensions on types from FoundationEssentials and FoundationNetworking respectively. Giving adopters fine control of what they want to link against. It also moves all the extensions into the main HTTPTypes module.
Result
Only a single module that is configurable through package traits.