-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import HTTPTypesFoundation
pulls in FoundationNetworking
#76
Comments
Does this require a major version bump due to source breakages? |
Yeah, unfortunately it does due to the leaky nature of Swift imports. In this case it a "cheap" major, and we can encourage users to depend on a cross-major range. |
Yes, thank you! A "cheap major" is perfect here. We've done this before and asking users to do |
I checked and URLRequest and URLResponse are both in FoundationNetworking. Why do these packages |
Just for the |
Oh I see |
|
Alternatively, can we move |
I don't think update: I checked, |
Correct, currently we don't use |
FoundationEssentials is present on all non-Darwin platforms as part of the Swift toolchain. On Darwin it's still just Foundation. |
What's the difference between |
|
Would you recommend that we do something like:
|
Yes that's the recommend pattern to check if it exists and import only that. IMO that's the way we should do it here and move the extension for URL to the main module of this package behind the conditional import. |
Are people all OK with moving URL to the main package? I can make a new PR to do that |
Unfortunately,
import HTTPTypesFoundation
pulls inFoundationNetworking
unconditionally which has issues on Linux.We carry link-time checks to make sure that we're not accidentally using
URLSession
in places where it's important not to. Unfortunately, modules thatimport HTTPTypesFoundation
now also pull inFoundationNetworking
.Would it be possible to remove the
import FoundationNetworking
and move that to a separate module likeHTTPTypesFoundationNetworking
?The text was updated successfully, but these errors were encountered: