Bug 210708

Summary: Update header postprocessing version cutoff to keep Apple internal builds working
Product: WebKit Reporter: Darin Adler <darin>
Component: WebKit APIAssignee: Darin Adler <darin>
Status: RESOLVED FIXED    
Severity: Normal CC: beidson, ddkilzer, mitz, simon.fraser, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 210723    
Attachments:
Description Flags
Patch
none
Patch
none
Patch beidson: review+

Description Darin Adler 2020-04-18 17:51:23 PDT
Update header postprocessing version cutoff to keep Apple internal builds working
Comment 1 Darin Adler 2020-04-18 17:53:09 PDT Comment hidden (obsolete)
Comment 2 Darin Adler 2020-04-18 17:53:30 PDT
I won’t land this until after my local builds for macOS and iOS both complete.
Comment 3 Darin Adler 2020-04-18 19:27:45 PDT Comment hidden (obsolete)
Comment 4 Tim Horton 2020-04-18 20:31:03 PDT
Comment on attachment 396886 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=396886&action=review

> Source/WebKit/Configurations/WebKit.xcconfig:159
> +WK_FRAMEWORK_HEADER_POSTPROCESSING_DISABLED[sdk=iphone*] = $(WK_FRAMEWORK_HEADER_POSTPROCESSING_DISABLED$(WK_IOS_1014));

IOS_1014 is definitely not right. Humorously, neither was IOS_1013, as it previously stood.
Comment 5 mitz 2020-04-18 20:31:58 PDT
Comment on attachment 396886 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=396886&action=review

> Source/WebKit/Configurations/WebKit.xcconfig:159
> +WK_FRAMEWORK_HEADER_POSTPROCESSING_DISABLED[sdk=iphone*] = $(WK_FRAMEWORK_HEADER_POSTPROCESSING_DISABLED$(WK_IOS_1014));

WK_IOS_1014 doesn’t make sense.
Comment 6 Darin Adler 2020-04-18 21:22:00 PDT
Created attachment 396891 [details]
Patch
Comment 7 Darin Adler 2020-04-18 21:22:37 PDT
OK, now I have a version that works!
Comment 8 Darin Adler 2020-04-18 21:22:57 PDT
So different from the one that Wenson reviewed that I didn’t put his name on it.
Comment 9 Darin Adler 2020-04-18 21:23:35 PDT
Comment on attachment 396891 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=396891&action=review

> Source/WebKit/Configurations/WebKit.xcconfig:-160
> -WK_FRAMEWORK_HEADER_POSTPROCESSING_DISABLED_IOS_BEFORE_1300 = YES;

Turns out 1300 was also not correct.
Comment 10 Brady Eidson 2020-04-18 21:28:28 PDT
Comment on attachment 396891 [details]
Patch

Wow.
Comment 11 Darin Adler 2020-04-18 21:42:07 PDT
Committed r260334: <https://trac.webkit.org/changeset/260334>
Comment 12 Radar WebKit Bug Importer 2020-04-18 21:43:13 PDT
<rdar://problem/61997281>
Comment 13 David Kilzer (:ddkilzer) 2020-04-19 10:19:53 PDT
This caused build failures due to the removal of #ifdef __OBJC__/#endif from Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h.  Obviously that C++ source file shouldn't be including an Objective-C header, so the fix will be to do something other than revert that change to WKPreferencesPrivate.h.

[...]
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:221:22: note: expanded from macro 'instancetype'
#define instancetype id
                     ^
In file included from /Volumes/Data/slave/mojave-release/build/Tools/TestWebKitAPI/Tests/WebKit/SpacebarScrolling.cpp:34:
In file included from /Volumes/Data/slave/mojave-release/build/WebKitBuild/Release/WebKit.framework/PrivateHeaders/WKPreferencesPrivate.h:26:
In file included from /Volumes/Data/slave/mojave-release/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:10:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:5:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:32:3: note: to match this '('
- (nullable instancetype)initWithCoder:(NSCoder *)aDecoder; // NS_DESIGNATED_INITIALIZER
  ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:32:4: error: C++ requires a type specifier for all declarations
- (nullable instancetype)initWithCoder:(NSCoder *)aDecoder; // NS_DESIGNATED_INITIALIZER
   ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:32:26: error: expected ';' after top level declarator
- (nullable instancetype)initWithCoder:(NSCoder *)aDecoder; // NS_DESIGNATED_INITIALIZER
                         ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:34:1: error: expected unqualified-id
@end
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:44:1: error: expected unqualified-id
@end
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:51:1: error: expected external declaration
+ (void)setVersion:(NSInteger)aVersion;
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:51:4: error: expected unqualified-id
+ (void)setVersion:(NSInteger)aVersion;
   ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

Builds: <https://build.webkit.org/builders/Apple%20Mojave%20Release%20(Build)?numbuilds=50>
Run: <https://build.webkit.org/builders/Apple%20Mojave%20Release%20%28Build%29/builds/14958>
Log: <https://build.webkit.org/builders/Apple%20Mojave%20Release%20%28Build%29/builds/14961/steps/compile-webkit/logs/stdio>

Looking now.
Comment 14 David Kilzer (:ddkilzer) 2020-04-19 10:20:57 PDT
Bug 210723 covers fixing the build failure:

REGRESSION (r260334): SpacebarScrolling.cpp (test in TestWebKitAPI) fails to compile because it includes an Objective-C header
<https://bugs.webkit.org/show_bug.cgi?id=210723>