Bug 238010

Summary: Build broken on macOS Monterey 12.3 - PassKitSPI related error
Product: WebKit Reporter: Nikolas Zimmermann <zimmermann>
Component: WebCore Misc.Assignee: Nikolas Zimmermann <zimmermann>
Status: RESOLVED FIXED    
Severity: Normal CC: eric.carlson, ews-watchlist, glenn, graouts, hi, jer.noble, philipj, ryanhaddad, sergio, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=237991
Bug Depends on: 234194    
Bug Blocks:    
Attachments:
Description Flags
Patch, v1
none
Patch, v1
none
Patch, v2 graouts: review+

Nikolas Zimmermann
Reported 2022-03-17 01:27:11 PDT
The Xcode build is broken: PushSubscriptionIdentifier.h is present twice in the Xcode project file, and the "copy phase" fails due to that.
Attachments
Patch, v1 (1.57 KB, patch)
2022-03-17 01:30 PDT, Nikolas Zimmermann
no flags
Patch, v1 (2.33 KB, patch)
2022-03-17 03:41 PDT, Nikolas Zimmermann
no flags
Patch, v2 (10.78 KB, patch)
2022-03-17 05:09 PDT, Nikolas Zimmermann
graouts: review+
Nikolas Zimmermann
Comment 1 2022-03-17 01:30:09 PDT
Nikolas Zimmermann
Comment 2 2022-03-17 01:30:27 PDT
Reopening to attach new patch.
Nikolas Zimmermann
Comment 3 2022-03-17 01:30:30 PDT
Created attachment 454940 [details] Patch, v1
Nikolas Zimmermann
Comment 4 2022-03-17 01:32:04 PDT
(In reply to Nikolas Zimmermann from comment #2) > Reopening to attach new patch. Nah, just for reference I wanted to have the patch here as well.
Radar WebKit Bug Importer
Comment 5 2022-03-17 01:32:15 PDT
Nikolas Zimmermann
Comment 6 2022-03-17 02:06:36 PDT
For reference: this was a side problem due to a Xcode setting and is not the real build issue: PassKitSPI.h:309 refers to an unknown type 'PKShippingMethod' on macOS Monterey 12.3 -- upgraded yesterday and can't build WebKit since then: In file included from /Users/nzimmermann/Software/GitRepositories/WebKitVanilla/Source/WebCore/PAL/pal/cocoa/PassKitSoftLink.mm:30: /Users/nzimmermann/Software/GitRepositories/WebKitVanilla/Source/WebCore/PAL/pal/spi/cocoa/PassKitSPI.h:309:42: error: unknown type name 'PKShippingMethod'; did you mean 'PKShippingMethods'? - (instancetype)initWithMethods:(NSArray<PKShippingMethod *> *)methods defaultMethod:(nullable PKShippingMethod *)defaultMethod; ^~~~~~~~~~~~~~~~ PKShippingMethods /Users/nzimmermann/Software/GitRepositories/WebKitVanilla/Source/WebCore/PAL/pal/spi/cocoa/PassKitSPI.h:308:12: note: 'PKShippingMethods' declared here @interface PKShippingMethods : NSObject ^ /Users/nzimmermann/Software/GitRepositories/WebKitVanilla/Source/WebCore/PAL/pal/spi/cocoa/PassKitSPI.h:309:96: error: expected a type - (instancetype)initWithMethods:(NSArray<PKShippingMethod *> *)methods defaultMethod:(nullable PKShippingMethod *)defaultMethod; ^ 2 errors generated.
Nikolas Zimmermann
Comment 7 2022-03-17 03:38:12 PDT
Hmm, if the APPLE_INTERNAL_SDK is not used, then PassKitSPI.h just includes PassKit.h on iOS and for PLATFORM(MAC) it actually contains the definitions of e.g. PKAddressField, ... and also PKShippingMethod. But PKShippingMethod interface is declared after the first usage -- that's causing the build error -- will prepare a fix.
Nikolas Zimmermann
Comment 8 2022-03-17 03:41:30 PDT
Created attachment 454952 [details] Patch, v1
Nikolas Zimmermann
Comment 9 2022-03-17 05:09:46 PDT
Created attachment 454961 [details] Patch, v2
Nikolas Zimmermann
Comment 10 2022-03-17 05:10:27 PDT
Tried to from-scratch release / debug builds -- now works flawlessly on macOS 12.3.
Nikolas Zimmermann
Comment 11 2022-03-17 06:02:57 PDT
Ryan Haddad
Comment 12 2022-03-17 10:28:43 PDT
*** Bug 237991 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.