[Webkit-unassigned] [Bug 280912] New: Can't build WebKit's clang module on watchOS/tvOS due to availability errors
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Oct 4 15:33:40 PDT 2024
https://bugs.webkit.org/show_bug.cgi?id=280912
Bug ID: 280912
Summary: Can't build WebKit's clang module on watchOS/tvOS due
to availability errors
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Tools / Tests
Assignee: webkit-unassigned at lists.webkit.org
Reporter: emw at apple.com
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.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20241004/3e597160/attachment-0001.htm>
More information about the webkit-unassigned
mailing list