swift-http-types icon indicating copy to clipboard operation
swift-http-types copied to clipboard

Move HTTPRequest.url to the main library

Open guoye-zhang opened this issue 11 months ago • 4 comments

Resolves #76

guoye-zhang avatar Dec 12 '24 21:12 guoye-zhang

Are there ways to re-export these symbols so we don't need to introduce API breakages?

2 breaking changes detected in HTTPTypesFoundation:
  💔 API breakage: var HTTPRequest.url has been removed
  💔 API breakage: constructor HTTPRequest.init(method:url:headerFields:) has been removed

Maybe @_exported import or @_disfavoredOverload?

guoye-zhang avatar Dec 12 '24 21:12 guoye-zhang

@_exported import is totally workable.

Lukasa avatar Dec 16 '24 13:12 Lukasa

@_exported import doesn't seem to address the API breakage check. Maybe the check itself is too strict?

guoye-zhang avatar Dec 16 '24 20:12 guoye-zhang

API breakage is usually strict, and I think this is one way in which it is.

Lukasa avatar Dec 19 '24 14:12 Lukasa

@guoye-zhang hey, any updates here

weissi avatar Oct 15 '25 23:10 weissi

This requires an admin to take action since it fails the ABI breakage check

guoye-zhang avatar Oct 16 '25 19:10 guoye-zhang

Can you update the branch to resolve the conflicts. I can help with getting it merged.

FranzBusch avatar Oct 16 '25 19:10 FranzBusch

Rebased. I think this is a "semver/minor" change since it technically adds an API?

guoye-zhang avatar Oct 16 '25 20:10 guoye-zhang

This is the output

2 breaking changes detected in HTTPTypesFoundation:
  💔 API breakage: var HTTPRequest.url has been removed
  💔 API breakage: constructor HTTPRequest.init(method:url:headerFields:) has been removed
Error: Process completed with exit code 1.

but I think that's bogus because of the @_exported import which brings those APIs back. @FranzBusch how do we override that check?

weissi avatar Oct 17 '25 01:10 weissi

Amazing, thanks @guoye-zhang & @Lukasa , I'd appreciate a release with this change so we can update and remove our copies of this code base. Thank you

weissi avatar Oct 17 '25 13:10 weissi

I just tagged 1.5.0 with this change

guoye-zhang avatar Oct 18 '25 00:10 guoye-zhang