Bug 206982 - REGRESSION(r254389): High Sierra build is broken
Summary: REGRESSION(r254389): High Sierra build is broken
Status: RESOLVED DUPLICATE of bug 206723
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Myles C. Maxfield
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-01-29 19:48 PST by Myles C. Maxfield
Modified: 2020-02-01 10:18 PST (History)
9 users (show)

See Also:


Attachments
Patch (3.93 KB, patch)
2020-01-29 19:50 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (1.83 KB, patch)
2020-01-29 20:06 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (1.83 KB, patch)
2020-01-30 10:08 PST, Chris Dumez
ap: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Myles C. Maxfield 2020-01-29 19:48:56 PST
REGRESSION(r254389): High Sierra build is broken
Comment 1 Myles C. Maxfield 2020-01-29 19:50:04 PST
Created attachment 389222 [details]
Patch
Comment 2 Myles C. Maxfield 2020-01-29 19:50:07 PST
<rdar://problem/59005412>
Comment 3 Myles C. Maxfield 2020-01-29 20:06:53 PST
Created attachment 389223 [details]
Patch
Comment 4 Alexey Proskuryakov 2020-01-29 21:02:28 PST
Comment on attachment 389223 [details]
Patch

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

r- for changing Mojave code path. Please also see my comment in Radar.

> Source/WTF/wtf/PlatformHave.h:578
> +#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500) || PLATFORM(IOS_FAMILY)

High Sierra is 10.13
Mojave is 10.14
Catalina is 10.15
Comment 5 Chris Dumez 2020-01-30 10:08:15 PST
Created attachment 389263 [details]
Patch
Comment 6 Alexey Proskuryakov 2020-01-30 10:19:22 PST
I didn't verify whether this fix was sufficient. It is unusual that it's enough to ifdef out includes, but no actual implementation code.
Comment 7 Chris Dumez 2020-01-30 10:32:18 PST
(In reply to Alexey Proskuryakov from comment #6)
> I didn't verify whether this fix was sufficient. It is unusual that it's
> enough to ifdef out includes, but no actual implementation code.

I think we are fine because the following gets declared after the #endif:
@interface NSLocale ()
+ (nonnull NSArray<NSString *> *)minimizedLanguagesFromLanguages:(nonnull NSArray<NSString *> *)languages;
@end
Comment 8 Chris Dumez 2020-01-30 10:33:53 PST
Comment on attachment 389263 [details]
Patch

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

> Source/WTF/wtf/spi/cocoa/NSLocaleSPI.h:30
> +#if HAVE(NSLOCALE_INTERNATIONALSUPPORTEXTENSIONS)

I guess we could have used __has_include(<InternationalSupport/NSLocale+InternationalSupportExtensions.h>) too.
Comment 9 Myles C. Maxfield 2020-01-30 11:30:43 PST
(In reply to Alexey Proskuryakov from comment #4)
> Comment on attachment 389223 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=389223&action=review
> 
> r- for changing Mojave code path. Please also see my comment in Radar.
> 
> > Source/WTF/wtf/PlatformHave.h:578
> > +#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500) || PLATFORM(IOS_FAMILY)
> 
> High Sierra is 10.13
> Mojave is 10.14
> Catalina is 10.15

This doesn't change the Mojave code path. The relevant code is already hidden behind a respondsToSelector: check. The selector only exists in Catalina. Therefore, previous OSes don't need the #include at all.
Comment 10 Chris Dumez 2020-01-30 12:41:11 PST
(In reply to Myles C. Maxfield from comment #9)
> (In reply to Alexey Proskuryakov from comment #4)
> > Comment on attachment 389223 [details]
> > Patch
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=389223&action=review
> > 
> > r- for changing Mojave code path. Please also see my comment in Radar.
> > 
> > > Source/WTF/wtf/PlatformHave.h:578
> > > +#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500) || PLATFORM(IOS_FAMILY)
> > 
> > High Sierra is 10.13
> > Mojave is 10.14
> > Catalina is 10.15
> 
> This doesn't change the Mojave code path. The relevant code is already
> hidden behind a respondsToSelector: check. 

As mentioned on your other bug, I cannot find minimizedLanguagesFromLanguages: in my very recent macOS SDK in the <InternationalSupport/NSLocale+InternationalSupportExtensions.h> header. Is this expected?
I only have it in my iOS SDK.

> The selector only exists in
> Catalina. Therefore, previous OSes don't need the #include at all.
Comment 11 Alexey Proskuryakov 2020-02-01 10:18:03 PST
After more investigation, we determined that a better fix for this was already landed. 

It does look like the code is wrong for macOS, but it builds now.

*** This bug has been marked as a duplicate of bug 206723 ***