Title: [269752] trunk/Tools
Revision
269752
Author
[email protected]
Date
2020-11-12 14:18:46 -0800 (Thu, 12 Nov 2020)

Log Message

configure-xcode-for-embedded-development breaks @available in Swift files
https://bugs.webkit.org/show_bug.cgi?id=218850

Reviewed by Jonathan Bedard.

The changes applied by configure-xcode-for-embedded-development
for AvailabilityProhibitedInternal.h cause API_AVAILABLE to be ignored
in Objective-C, but @available is not ignored in Swift. As a result,
if an Objective-C method marked with API_AVAILABLE makes a call
into a Swift class marked with @available, this can lead to an
availability warning even when the calling method is only available
when the callee is available.

To fix this, ensure that @available is also ignored in Swift.

* Scripts/configure-xcode-for-embedded-development:

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (269751 => 269752)


--- trunk/Tools/ChangeLog	2020-11-12 22:12:21 UTC (rev 269751)
+++ trunk/Tools/ChangeLog	2020-11-12 22:18:46 UTC (rev 269752)
@@ -1,3 +1,22 @@
+2020-11-12  Ali Juma  <[email protected]>
+
+        configure-xcode-for-embedded-development breaks @available in Swift files
+        https://bugs.webkit.org/show_bug.cgi?id=218850
+
+        Reviewed by Jonathan Bedard.
+
+        The changes applied by configure-xcode-for-embedded-development
+        for AvailabilityProhibitedInternal.h cause API_AVAILABLE to be ignored
+        in Objective-C, but @available is not ignored in Swift. As a result,
+        if an Objective-C method marked with API_AVAILABLE makes a call
+        into a Swift class marked with @available, this can lead to an
+        availability warning even when the calling method is only available
+        when the callee is available.
+
+        To fix this, ensure that @available is also ignored in Swift.
+
+        * Scripts/configure-xcode-for-embedded-development:
+
 2020-11-12  Chris Dumez  <[email protected]>
 
         [GPUProcess] Add basic GPUProcess crash handling for media playback

Modified: trunk/Tools/Scripts/configure-xcode-for-embedded-development (269751 => 269752)


--- trunk/Tools/Scripts/configure-xcode-for-embedded-development	2020-11-12 22:12:21 UTC (rev 269751)
+++ trunk/Tools/Scripts/configure-xcode-for-embedded-development	2020-11-12 22:18:46 UTC (rev 269752)
@@ -97,6 +97,9 @@
 #undef __API_AVAILABLE_GET_MACRO
 #define __API_AVAILABLE_GET_MACRO(...) __NULL_AVAILABILITY
 
+#undef SWIFT_AVAILABILITY
+#define SWIFT_AVAILABILITY __NULL_AVAILABILITY
+
 // Take care of {A,S}PI_DEPRECATED{,WITH_REPLACEMENT}{,_BEGIN,_END}
 #undef __API_DEPRECATED_MSG_GET_MACRO
 #define __API_DEPRECATED_MSG_GET_MACRO(...) __NULL_AVAILABILITY
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to