RESOLVED FIXED 168056
Transition "WebKit Library Version" checks to SDK version checks
https://bugs.webkit.org/show_bug.cgi?id=168056
Summary Transition "WebKit Library Version" checks to SDK version checks
Brady Eidson
Reported 2017-02-09 10:37:24 PST
Transition "WebKit Library Version" checks to SDK version checks Apps can use WebKit without linking directly to it (e.g. They link to a different framework which links to WebKit) In these cases the WebKit Library Version check will fail. Whenever possible it's much better to reference the SDK version the app was built against. <rdar://problem/30313696>
Attachments
Patch (8.76 KB, patch)
2017-02-09 11:01 PST, Brady Eidson
no flags
Patch (9.94 KB, patch)
2017-02-09 15:42 PST, Brady Eidson
ggaren: review+
Brady Eidson
Comment 1 2017-02-09 11:01:46 PST
Geoffrey Garen
Comment 2 2017-02-09 11:05:29 PST
Comment on attachment 301056 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=301056&action=review r=me > Source/WebKit2/UIProcess/Cocoa/VersionChecks.h:32 > +enum class SDKVersion { Since we're going to cast to uint32_t, we should inherit from uint32_t here.
Brady Eidson
Comment 3 2017-02-09 11:08:27 PST
(In reply to comment #2) > Comment on attachment 301056 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=301056&action=review > > r=me > > > Source/WebKit2/UIProcess/Cocoa/VersionChecks.h:32 > > +enum class SDKVersion { > > Since we're going to cast to uint32_t, we should inherit from uint32_t here. 👍👍
Brady Eidson
Comment 4 2017-02-09 12:39:29 PST
Brady Eidson
Comment 5 2017-02-09 13:34:27 PST
WebKit Commit Bot
Comment 6 2017-02-09 13:47:23 PST
Re-opened since this is blocked by bug 168072
Brady Eidson
Comment 7 2017-02-09 15:41:08 PST
This change didn't allow ToT WebKit changes to work if you build against an older or not-yet-released SDK. We can't just ignore WebKit library version numbers altogether - We need to try them first and then fall back to the SDK version number when necessary.
Brady Eidson
Comment 8 2017-02-09 15:42:31 PST
Geoffrey Garen
Comment 9 2017-02-09 16:00:05 PST
Comment on attachment 301093 [details] Patch r=me Is there any way for a developer to avoid using or specifying LibraryVersion? LibraryVersion seems like an anti-pattern because we communicate compatibility issues to developers based on SDK version and not library version.
Brady Eidson
Comment 10 2017-02-09 16:08:29 PST
(In reply to comment #9) > Comment on attachment 301093 [details] > Patch > > r=me > > Is there any way for a developer to avoid using or specifying LibraryVersion? I don't know. > LibraryVersion seems like an anti-pattern because we communicate > compatibility issues to developers based on SDK version and not library > version. I agree with this, but we do have this dilemma... Maybe the right approach is to do the SDK check *first*, then fallback to the library version if the SDK check returns false. That would prefer SDK for 3rd party apps, but let ToT WebKit development prefer the library version for testing purposes.
Brady Eidson
Comment 11 2017-02-09 16:09:01 PST
(In reply to comment #10) > (In reply to comment #9) > > Comment on attachment 301093 [details] > > Patch > > > > r=me > > > > Is there any way for a developer to avoid using or specifying LibraryVersion? > > I don't know. > > > LibraryVersion seems like an anti-pattern because we communicate > > compatibility issues to developers based on SDK version and not library > > version. > > I agree with this, but we do have this dilemma... > > Maybe the right approach is to do the SDK check *first*, then fallback to > the library version if the SDK check returns false. > > That would prefer SDK for 3rd party apps, but let ToT WebKit development > prefer the library version for testing purposes. I'm going to do it this way and assume you're okay with it, and then you can yell at me later if that was a bad assumption.
Brady Eidson
Comment 12 2017-02-09 16:23:04 PST
Alexey Proskuryakov
Comment 13 2017-02-10 13:05:41 PST
Comment on attachment 301093 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=301093&action=review > Source/WTF/wtf/spi/darwin/dyldSPI.h:61 > +#define DYLD_MACOSX_VERSION_10_12_4 0x000A0C04 As previously commented in follow-up bug, we should never check for minor SDK version - it's not OK for WebKit to change behavior when the developer switches to a new minor Xcode version.
Brady Eidson
Comment 14 2017-02-10 13:10:46 PST
(In reply to comment #13) > Comment on attachment 301093 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=301093&action=review > > > Source/WTF/wtf/spi/darwin/dyldSPI.h:61 > > +#define DYLD_MACOSX_VERSION_10_12_4 0x000A0C04 > > As previously commented in follow-up bug, we should never check for minor > SDK version - it's not OK for WebKit to change behavior when the developer > switches to a new minor Xcode version. Replying in the other bug.
Note You need to log in before you can comment on or make changes to this bug.