Skip to content

Conversation

@FranzBusch
Copy link
Member

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.

# 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants