Bug 264058

Summary: ArgumentCodersCocoa.mm is being compiled into TestWebKitAPI (WKSecureCodingArchivingDelegate is implemented in both WebKit and TestWebKitAPI)
Product: WebKit Reporter: Timothy Hatcher <timothy>
Component: WebKit Misc.Assignee: Brady Eidson <beidson>
Status: ASSIGNED ---    
Severity: Normal CC: ap, cdumez, emw, kkinnunen, thorton, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 261361    

Description Timothy Hatcher 2023-11-01 14:19:06 PDT
This is causing tons of log spew on all API tests now:

objc[18580]: Class WKSecureCodingArchivingDelegate is implemented in both /Volumes/Data/worker/API-Tests-macOS-EWS/build/WebKitBuild/Release/WebKit.framework/Versions/A/WebKit (0x1170021a8) and /Volumes/Data/worker/API-Tests-macOS-EWS/build/WebKitBuild/Release/TestWebKitAPI (0x102d84f20). One of the two will be used. Which one is undefined.
objc[18580]: Class WKSecureCodingURLWrapper is implemented in both /Volumes/Data/worker/API-Tests-macOS-EWS/build/WebKitBuild/Release/WebKit.framework/Versions/A/WebKit (0x117002158) and /Volumes/Data/worker/API-Tests-macOS-EWS/build/WebKitBuild/Release/TestWebKitAPI (0x102d84ed0). One of the two will be used. Which one is undefined.
objc[18580]: Class WKSecureCodingCGColorWrapper is implemented in both /Volumes/Data/worker/API-Tests-macOS-EWS/build/WebKitBuild/Release/WebKit.framework/Versions/A/WebKit (0x117002180) and /Volumes/Data/worker/API-Tests-macOS-EWS/build/WebKitBuild/Release/TestWebKitAPI (0x102d84ef8). One of the two will be used. Which one is undefined.

This seems to be due to the file be compiled in libWebKitPlatform.a and that is linked by both WebKit and TestWebKitAPI.
Comment 1 Kimmo Kinnunen 2023-11-02 02:22:33 PDT
Regressed in bug 261361
https://github.com/WebKit/WebKit/pull/17617/files#diff-35ee6315eaf16be3c4c60df710ef539ab68a1979b4b9f74138fc188162f34535


The commit adds a test in WebKitTestAPI that uses both:
- WebKit.framework
- Source/WebKit internals via libWebKitPlatform.a

This is incorrect. WebKitTestAPI cannot link to libWebKitPlatform.a as it  links to WebKit.framework.

The test needs to be separated to two different pieces:
- Test that implements the test caller side in TestWebKitAPI
- A new runner executable that runs the webpushd that contains the unit-tested responses
Comment 2 Radar WebKit Bug Importer 2023-11-02 02:24:51 PDT
<rdar://problem/117841640>
Comment 3 Alexey Proskuryakov 2024-03-20 11:02:17 PDT
*** Bug 271023 has been marked as a duplicate of this bug. ***