Bug 280912
Summary: | Can't build WebKit's clang module on watchOS/tvOS due to availability errors | ||
---|---|---|---|
Product: | WebKit | Reporter: | Elliott Williams <emw> |
Component: | Tools / Tests | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | 280734 | ||
Bug Blocks: |
Elliott Williams
As part of merging WebKit's Swift overlay into the main framework <https://bugs.webkit.org/show_bug.cgi?id=280734>, I've experimented with building the overlay APIs for all Apple platforms. Presently the overlay is only built for platforms where WebKit is a public framework.
When I try to build for watchOS/tvOS, I get errors emitting WebKit's underlying clang module, due to availability. For example:
WebKit SwiftEmitModule normal arm64 Emitting\ module\ for\ WebKit
Source/WebKit/UIProcess/API/Cocoa/NSAttributedString.h:30:9: note: while building module 'UIKit' imported from Source/WebKit/UIProcess/API/Cocoa/NSAttributedString.h:30:
#import <UIKit/NSAttributedString.h>
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "Headers/UIKit.h"
WebKitBuild/Release-appletvsimulator/SDKAdditions/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:20:9: note: in file included from WebKitBuild/Release-appletvsimulator/SDKAdditions/System/Library/Frameworks/UIKit.framewor
k/Headers/UIKit.h:20:
#import <UIKit/ShareSheet.h>
WebKitBuild/Release-appletvsimulator/SDKAdditions/System/Library/Frameworks/UIKit.framework/Headers/ShareSheet.h:12:9: note: in file included from WebKitBuild/Release-appletvsimulator/SDKAdditions/System/Library/Frameworks/UIKit.fra
mework/Headers/ShareSheet.h:12:
#import <UIKit/UIDocumentInteractionController.h>
WebKitBuild/Release-appletvsimulator/SDKAdditions/System/Library/Frameworks/UIKit.framework/Headers/UIDocumentInteractionController.h:20:98: error: 'UIActionSheetDelegate' is unavailable: not available on tvOS
API_AVAILABLE(ios(3.2)) __TVOS_PROHIBITED @interface UIDocumentInteractionController : NSObject <UIActionSheetDelegate>
WebKitBuild/Release-appletvsimulator/SDKAdditions/System/Library/Frameworks/UIKit.framework/Headers/UIActionSheet.h:63:11: note: 'UIActionSheetDelegate' has been explicitly marked unavailable here
@protocol UIActionSheetDelegate <NSObject>
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "Headers/WebKit.h"
WebKitBuild/Release-appletvsimulator/WebKit.framework/Headers/WebKit.h:26:9: note: in file included from WebKitBuild/Release-appletvsimulator/WebKit.framework/Headers/WebKit.h:26:
#import <WebKit/NSAttributedString.h>
Source/WebKit/UIProcess/API/Cocoa/NSAttributedString.h:30:9: error: could not build module 'UIKit'
#import <UIKit/NSAttributedString.h>
<unknown>:0: error: could not build Objective-C module 'WebKit'
The problem is "__TVOS_PROHIBITED" indicates that UIDocumentInteractionController is SPI on tvOS. Normally, our <AvailabilityProhibitedInternal.h> header in the appropriate additions SDK in WebKitLibraries/SDKs would suppress this availability marker, but I think it's being ignored entirely because clang is looking at the `availability` modulemap in the SDK, not importing headers textually. Perhaps we need a new way to suppress availability info for building with modules.
In the meantime, I don't think this blocks merging the Swift overlay. It just means we cannot bring the overlay API to these two platforms.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/137312444>