RESOLVED FIXED 218850
configure-xcode-for-embedded-development breaks @available in Swift files
https://bugs.webkit.org/show_bug.cgi?id=218850
Summary configure-xcode-for-embedded-development breaks @available in Swift files
Ali Juma
Reported 2020-11-12 08:49:39 PST
The changes applied by configure-xcode-for-embedded-development leave Xcode in state where using @available in a Swift class breaks compilation of Objective-C methods marked with API_AVAILABLE that call into that class. Specifically, suppose we have: -a Swift class Foo marked @available(iOS 14.0, *) -an ObjC class Bar with a method myMethod marked API_AVAILABLE(ios(14)) The changes applied by configure-xcode-for-embedded-development for AvailabilityProhibitedInternal.h cause API_AVAILABLE to be ignored, but @available is not ignored. This means that calling from myMethod into Foo, which should be fine since both are available only in iOS 14+, results in a build failure when building with -Werror -Wunguarded-availability, since after pre-processing, myMethod has no availability notation. I ran into this when trying to build Chrome for iOS using the same Xcode that I use for building WebKit.
Attachments
Patch (1.91 KB, patch)
2020-11-12 08:59 PST, Ali Juma
no flags
Ali Juma
Comment 1 2020-11-12 08:59:43 PST
Jonathan Bedard
Comment 2 2020-11-12 09:04:30 PST
Comment on attachment 413939 [details] Patch I think this is correct, but I want to verify that our embedded builds still work after this change, which will take some time. Unfortunately, EWS isn't going to test the changes here.
Jonathan Bedard
Comment 3 2020-11-12 14:06:51 PST
Comment on attachment 413939 [details] Patch Tested with out embedded builds, should be good to go!
Ali Juma
Comment 4 2020-11-12 14:09:45 PST
(In reply to Jonathan Bedard from comment #3) > Comment on attachment 413939 [details] > Patch > > Tested with out embedded builds, should be good to go! Thanks for the review and for testing this!
EWS
Comment 5 2020-11-12 14:19:10 PST
Committed r269752: <https://trac.webkit.org/changeset/269752> All reviewed patches have been landed. Closing bug and clearing flags on attachment 413939 [details].
Radar WebKit Bug Importer
Comment 6 2020-11-12 14:20:18 PST
Note You need to log in before you can comment on or make changes to this bug.