apple / apple/swift-http-types
Drop CF dependency
- Dominant language
- Swift
- Stars
- 1k
- Forks
- 80
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 12
Description
I noticed that this library [uses CoreFoundation directly](https://github.com/apple/swift-http-types/blob/39661f4ca82db8ad050cc060a471c8e2c542b24f/Sources/HTTPTypesFoundation/HTTPRequest%2BURL.swift#L15). IIRC that is not portable; CF is available on Darwin platforms and Linux, but is deliberately omitted from other platforms (e.g. Windows).
> CoreFoundation is not meant to be public, and the Windows port has generally been far more aggressive about preventing leakage of internal interfaces and encouraging cross-compilation.
See discussion on the [Swift forums announcement thread](https://forums.swift.org/t/announcing-swift-http-types/66088/7). Basically, Foundation doesn't (yet) provide the APIs this library needs. There may be ways around it, but that discussion is probably better to have here than on the forums.
Contributor guide
Research direction
Start with Sources/HTTPTypesFoundation/HTTPRequest+URL.swift, especially the direct CoreFoundation use noted in the issue. Read the linked Swift Forums discussion to understand the portability constraints and possible alternatives. Done means the library no longer depends directly on CoreFoundation while retaining the required URL behavior on supported platforms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- backend-api-design
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100