Bug 210723

Summary: REGRESSION (r260334): SpacebarScrolling.cpp (test in TestWebKitAPI) fails to compile because it includes an Objective-C header
Product: WebKit Reporter: Aakash Jain <aakash_jain>
Component: Tools / TestsAssignee: Darin Adler <darin>
Status: RESOLVED FIXED    
Severity: Normal CC: beidson, darin, ddkilzer, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 210708    
Bug Blocks:    
Attachments:
Description Flags
Patch none

Description Aakash Jain 2020-04-19 10:12:59 PDT
Mac build seems to be broken recently.

e.g.: https://ews-build.webkit.org/#/builders/28/builds/974/steps/10/logs/errors

CompileC /Volumes/Data/worker/Commit-Queue/build/WebKitBuild/TestWebKitAPI.build/Release/TestWebKitAPILibrary.build/Objects-normal/x86_64/SpacebarScrolling.o Tests/WebKit/SpacebarScrolling.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
    cd /Volumes/Data/worker/Commit-Queue/build/Tools/TestWebKitAPI
    export LANG=en_US.US-ASCII
In file included from /Volumes/Data/worker/Commit-Queue/build/Tools/TestWebKitAPI/Tests/WebKit/SpacebarScrolling.cpp:34:
In file included from /Volumes/Data/worker/Commit-Queue/build/WebKitBuild/Release/WebKit.framework/PrivateHeaders/WKPreferencesPrivate.h:26:
In file included from /Volumes/Data/worker/Commit-Queue/build/WebKitBuild/Release/WebKit.framework/Headers/WKPreferences.h:27:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:8:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:484:1: error: expected unqualified-id
@class NSString, Protocol;
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:495:50: error: unknown type name 'Protocol'
FOUNDATION_EXPORT NSString *NSStringFromProtocol(Protocol *proto) API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
                                                 ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:496:19: error: unknown type name 'Protocol'
FOUNDATION_EXPORT Protocol * _Nullable NSProtocolFromString(NSString *namestr) API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
                  ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:500:53: error: format argument not an NSString
FOUNDATION_EXPORT void NSLog(NSString *format, ...) NS_FORMAT_FUNCTION(1,2) NS_NO_TAIL_CALL;
                             ~~~~~~~~~~~~~~~~       ^                  ~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:84:49: note: expanded from macro 'NS_FORMAT_FUNCTION'
        #define NS_FORMAT_FUNCTION(F,A) __attribute__((format(__NSString__, F, A)))
                                                       ^                    ~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:501:63: error: format argument not an NSString
FOUNDATION_EXPORT void NSLogv(NSString *format, va_list args) NS_FORMAT_FUNCTION(1,0) NS_NO_TAIL_CALL;
                              ~~~~~~~~~~~~~~~~                ^                  ~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:84:49: note: expanded from macro 'NS_FORMAT_FUNCTION'
        #define NS_FORMAT_FUNCTION(F,A) __attribute__((format(__NSString__, F, A)))
                                                       ^                    ~
In file included from /Volumes/Data/worker/Commit-Queue/build/Tools/TestWebKitAPI/Tests/WebKit/SpacebarScrolling.cpp:34:
Comment 1 Darin Adler 2020-04-19 10:17:51 PDT
Created attachment 396917 [details]
Patch
Comment 2 Darin Adler 2020-04-19 10:24:14 PDT
Committed r260336: <https://trac.webkit.org/changeset/260336>
Comment 3 Radar WebKit Bug Importer 2020-04-19 10:25:13 PDT
<rdar://problem/62023265>