Bug 168124 - Replace all WebKit Library Version checks in WK2 with SDK version checks
Summary: Replace all WebKit Library Version checks in WK2 with SDK version checks
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brady Eidson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-10 10:20 PST by Brady Eidson
Modified: 2020-02-06 15:57 PST (History)
4 users (show)

See Also:


Attachments
Patch (14.05 KB, patch)
2017-02-10 10:31 PST, Brady Eidson
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2017-02-10 10:20:02 PST
Replace all WebKit Library Version checks in WK2 with SDK version checks

This is a followup to https://bugs.webkit.org/show_bug.cgi?id=168056

We can completely rely on SDK version checks - even for unreleased SDKs - By giving all of our tools a secret way to always pass linkedOnOrAfter checks.
Comment 1 Brady Eidson 2017-02-10 10:31:11 PST
Created attachment 301170 [details]
Patch
Comment 2 WebKit Commit Bot 2017-02-10 10:33:58 PST
Attachment 301170 [details] did not pass style-queue:


ERROR: Tools/TestWebKitAPI/mac/mainMac.mm:43:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Tools/TestWebKitAPI/mac/mainMac.mm:44:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit2/UIProcess/Cocoa/VersionChecks.mm:39:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit2/UIProcess/Cocoa/VersionChecks.mm:40:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit2/UIProcess/Cocoa/VersionChecks.mm:41:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Tools/TestWebKitAPI/ios/mainIOS.mm:41:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Tools/TestWebKitAPI/ios/mainIOS.mm:42:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 7 in 13 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Geoffrey Garen 2017-02-10 10:34:30 PST
Comment on attachment 301170 [details]
Patch

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

r=me

What could possibly go wrong? :P

> Source/WebKit2/ChangeLog:10
> +        To allow our tools to still be able to adopt new behaviors even when built against older SDKs,

s/adopt/test/

> Source/WebKit2/UIProcess/Cocoa/VersionChecks.mm:42
> +        // Always make new behaviors work in Safari.

The code is pretty clear at explaining how it achieves this behavior, but I'm not sure why we want it. Would be nice for this comment to explain why we want this behavior.
Comment 4 Brady Eidson 2017-02-10 12:40:26 PST
https://trac.webkit.org/changeset/212134
Comment 5 Alexey Proskuryakov 2017-02-10 13:03:39 PST
Comment on attachment 301170 [details]
Patch

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

> Source/WebKit2/UIProcess/Cocoa/VersionChecks.h:-65
> -    static const uint32_t SDKVersion { DYLD_MACOSX_VERSION_10_12_4 };

This existing code looks wrong to me, we shouldn't change behavior for native clients other than in major updates. How did this get in? We should probably get this corrected soon.
Comment 6 Brady Eidson 2017-02-10 13:12:05 PST
(In reply to comment #5)
> Comment on attachment 301170 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=301170&action=review
> 
> > Source/WebKit2/UIProcess/Cocoa/VersionChecks.h:-65
> > -    static const uint32_t SDKVersion { DYLD_MACOSX_VERSION_10_12_4 };
> 
> This existing code looks wrong to me, we shouldn't change behavior for
> native clients other than in major updates.

Why not?

> How did this get in? 

Because I put it in because multiple people think it's right.

> We should probably get this corrected soon.

The first thing that would have to happen is to establish that something is incorrect, which I'm not sure we have done.
Comment 7 Brady Eidson 2017-02-10 13:12:48 PST
(In reply to comment #6)
> (In reply to comment #5)
> 
> > How did this get in? 
> 
> Because I put it in because multiple people think it's right.

And also, it had already be in - in practice - with the WebKit Library Version check.
Comment 8 Brady Eidson 2017-02-10 13:18:39 PST
(In reply to comment #7)
> (In reply to comment #6)
> > (In reply to comment #5)
> > 
> > > How did this get in? 
> > 
> > Because I put it in because multiple people think it's right.
> 
> And also, it had already be in - in practice - with the WebKit Library
> Version check.

To link to that:
https://trac.webkit.org/changeset/210031
Comment 9 Brady Eidson 2017-02-13 15:28:51 PST
Followed up: https://trac.webkit.org/changeset/212256