⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 269752 in webkit


Ignore:
Timestamp:
Nov 12, 2020, 2:18:46 PM (6 years ago)
Author:
ajuma@chromium.org
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:
Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r269750 r269752  
     12020-11-12  Ali Juma  <ajuma@chromium.org>
     2
     3        configure-xcode-for-embedded-development breaks @available in Swift files
     4        https://bugs.webkit.org/show_bug.cgi?id=218850
     5
     6        Reviewed by Jonathan Bedard.
     7
     8        The changes applied by configure-xcode-for-embedded-development
     9        for AvailabilityProhibitedInternal.h cause API_AVAILABLE to be ignored
     10        in Objective-C, but @available is not ignored in Swift. As a result,
     11        if an Objective-C method marked with API_AVAILABLE makes a call
     12        into a Swift class marked with @available, this can lead to an
     13        availability warning even when the calling method is only available
     14        when the callee is available.
     15
     16        To fix this, ensure that @available is also ignored in Swift.
     17
     18        * Scripts/configure-xcode-for-embedded-development:
     19
    1202020-11-12  Chris Dumez  <cdumez@apple.com>
    221
  • trunk/Tools/Scripts/configure-xcode-for-embedded-development

    r267764 r269752  
    9898#define __API_AVAILABLE_GET_MACRO(...) __NULL_AVAILABILITY
    9999
     100#undef SWIFT_AVAILABILITY
     101#define SWIFT_AVAILABILITY __NULL_AVAILABILITY
     102
    100103// Take care of {A,S}PI_DEPRECATED{,WITH_REPLACEMENT}{,_BEGIN,_END}
    101104#undef __API_DEPRECATED_MSG_GET_MACRO
Note: See TracChangeset for help on using the changeset viewer.