Bug 238010 - Build broken on macOS Monterey 12.3 - PassKitSPI related error
Summary: Build broken on macOS Monterey 12.3 - PassKitSPI related error
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nikolas Zimmermann
URL:
Keywords: InRadar
: 237991 (view as bug list)
Depends on: 234194
Blocks:
  Show dependency treegraph
 
Reported: 2022-03-17 01:27 PDT by Nikolas Zimmermann
Modified: 2022-03-17 10:28 PDT (History)
11 users (show)

See Also:


Attachments
Patch, v1 (1.57 KB, patch)
2022-03-17 01:30 PDT, Nikolas Zimmermann
no flags Details | Formatted Diff | Diff
Patch, v1 (2.33 KB, patch)
2022-03-17 03:41 PDT, Nikolas Zimmermann
no flags Details | Formatted Diff | Diff
Patch, v2 (10.78 KB, patch)
2022-03-17 05:09 PDT, Nikolas Zimmermann
graouts: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikolas Zimmermann 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.
Comment 1 Nikolas Zimmermann 2022-03-17 01:30:09 PDT
Committed r291394 (248524@trunk): <https://commits.webkit.org/248524@trunk>
Comment 2 Nikolas Zimmermann 2022-03-17 01:30:27 PDT
Reopening to attach new patch.
Comment 3 Nikolas Zimmermann 2022-03-17 01:30:30 PDT
Created attachment 454940 [details]
Patch, v1
Comment 4 Nikolas Zimmermann 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.
Comment 5 Radar WebKit Bug Importer 2022-03-17 01:32:15 PDT
<rdar://problem/90417687>
Comment 6 Nikolas Zimmermann 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.
Comment 7 Nikolas Zimmermann 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.
Comment 8 Nikolas Zimmermann 2022-03-17 03:41:30 PDT
Created attachment 454952 [details]
Patch, v1
Comment 9 Nikolas Zimmermann 2022-03-17 05:09:46 PDT
Created attachment 454961 [details]
Patch, v2
Comment 10 Nikolas Zimmermann 2022-03-17 05:10:27 PDT
Tried to from-scratch release / debug builds -- now works flawlessly on macOS 12.3.
Comment 11 Nikolas Zimmermann 2022-03-17 06:02:57 PDT
Committed r291403 (248533@trunk): <https://commits.webkit.org/248533@trunk>
Comment 12 Ryan Haddad 2022-03-17 10:28:43 PDT
*** Bug 237991 has been marked as a duplicate of this bug. ***