WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
280912
Can't build WebKit's clang module on watchOS/tvOS due to availability errors
https://bugs.webkit.org/show_bug.cgi?id=280912
Summary
Can't build WebKit's clang module on watchOS/tvOS due to availability errors
Elliott Williams
Reported
2024-10-04 15:33:40 PDT
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
Comment 1
2024-10-04 15:34:08 PDT
<
rdar://problem/137312444
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug