RESOLVED FIXED 178122
[GTK][WPE] Don't require brotli
https://bugs.webkit.org/show_bug.cgi?id=178122
Summary [GTK][WPE] Don't require brotli
Tomas Popela
Reported 2017-10-10 03:22:22 PDT
It is unnecessary to depend on brotli as it is only a dependency of woff2. Once there will be a new woff2 release with https://github.com/google/woff2/pull/95 included we should get rid off the brotli checks.
Attachments
Patch (4.75 KB, patch)
2017-10-10 03:30 PDT, Tomas Popela
no flags
Patch (1.21 KB, patch)
2017-11-14 08:44 PST, Michael Catanzaro
no flags
Tomas Popela
Comment 1 2017-10-10 03:24:20 PDT
To be correct - it is not necessary to depend ..
Tomas Popela
Comment 2 2017-10-10 03:30:00 PDT
Frédéric Wang (:fredw)
Comment 3 2017-10-10 04:08:41 PDT
Comment on attachment 323294 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=323294&action=review > Source/cmake/OptionsGTK.cmake:386 > find_package(WOFF2Dec 1.0.1) I'm wondering whether we should wait a new release of WOFF2 before landing this, and then update the version number here.
Tomas Popela
Comment 4 2017-10-10 04:19:02 PDT
(In reply to Frédéric Wang (:fredw) from comment #3) > I'm wondering whether we should wait a new release of WOFF2 before landing > this, and then update the version number here. Good point Fred! I will update the version once it will be released and I'll be landing this change.
Konstantin Tokarev
Comment 5 2017-10-10 04:45:56 PDT
I think it would be better to avoid removing FindBrotliDec from the tree and instead do the following: 1. In FindWOFF2.cmake use check_cxx_symbol_exists(woff2::ConvertWOFF2ToTTF). This will create internal test file which is compiled and linked to WOFF2DEC_LIBRARIES. 2. If check_cxx_symbol_exists fails, e.g. because WOFF2DEC_LIBRARIES is incomplete (broken pkg-config file, or pkg-config was not used at all and WOFF2DEC_LIBRARIES was found by find_library()), invoke find_package(BrotliDec 1.0.1) and append its variables to WOFF2 variables.
Konstantin Tokarev
Comment 6 2017-10-10 04:47:18 PDT
>and append its variables to WOFF2 variables. Looks like just set(WOFF2DEC_LIBRARIES ${WOFF2DEC_LIBRARIES} {BROTLIDEC_LIBRARIES})
Michael Catanzaro
Comment 7 2017-10-10 14:13:10 PDT
Comment on attachment 323294 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=323294&action=review Good catch, Tom! >> Source/cmake/OptionsGTK.cmake:386 >> find_package(WOFF2Dec 1.0.1) > > I'm wondering whether we should wait a new release of WOFF2 before landing this, and then update the version number here. Yes. Perhaps Rick would be willing to make another release for us?
Michael Catanzaro
Comment 8 2017-10-10 14:14:35 PDT
Ah, I forgot to read the last few comments before I wrote my reply. :) (In reply to Konstantin Tokarev from comment #5) > I think it would be better to avoid removing FindBrotliDec from the tree and > instead do the following: > > 1. In FindWOFF2.cmake use check_cxx_symbol_exists(woff2::ConvertWOFF2ToTTF). > This will create internal test file which is compiled and linked to > WOFF2DEC_LIBRARIES. > > 2. If check_cxx_symbol_exists fails, e.g. because WOFF2DEC_LIBRARIES is > incomplete (broken pkg-config file, or pkg-config was not used at all and > WOFF2DEC_LIBRARIES was found by find_library()), invoke > find_package(BrotliDec 1.0.1) and append its variables to WOFF2 variables. This is really unnecessarily complicated. The WOFF2 library is brand new and not packaged by distros yet; there's no need for such a compatibility check.
Tomas Popela
Comment 9 2017-10-11 00:38:25 PDT
Actually I realized that this is change is not needed at all, because we will require brotli at some point when we will the add support for brotli encoding as Dan doesn't want to include it in libsoup - https://bugzilla.gnome.org/show_bug.cgi?id=788418. Žan should we leave the brotli check in WebKit?
Frédéric Wang (:fredw)
Comment 10 2017-10-11 00:43:39 PDT
(In reply to Tomas Popela from comment #9) > Actually I realized that this is change is not needed at all, because we > will require brotli at some point when we will the add support for brotli > encoding as Dan doesn't want to include it in libsoup - > https://bugzilla.gnome.org/show_bug.cgi?id=788418. Žan should we leave the > brotli check in WebKit? OK. Anyway, I think this change is not too urgent. We would still need the change in Source/WebCore/CMakeLists.txt and the modification of the release version when a new version of WOFF2 is released.
Konstantin Tokarev
Comment 11 2017-10-11 02:14:58 PDT
(In reply to Tomas Popela from comment #9) > Actually I realized that this is change is not needed at all, because we > will require brotli at some point when we will the add support for brotli > encoding as Dan doesn't want to include it in libsoup - > https://bugzilla.gnome.org/show_bug.cgi?id=788418. Žan should we leave the > brotli check in WebKit? IMO it would be a better idea to support zstd encoding[1], unlike brotli it's clearly superior to zlib on both client and server side[2] [1] https://tools.ietf.org/id/draft-kucherawy-dispatch-zstd-00.html [2] http://zstd.net/
Michael Catanzaro
Comment 12 2017-10-11 05:45:59 PDT
(In reply to Tomas Popela from comment #9) > Actually I realized that this is change is not needed at all, because we > will require brotli at some point when we will the add support for brotli > encoding as Dan doesn't want to include it in libsoup - > https://bugzilla.gnome.org/show_bug.cgi?id=788418. Žan should we leave the > brotli check in WebKit? I don't think we should support brotli decoding unless it's supported by libsoup (which we might still decide to do), so let's still remove this unnecessary brotli check.
Carlos Alberto Lopez Perez
Comment 13 2017-10-11 08:00:14 PDT
(In reply to Konstantin Tokarev from comment #11) > (In reply to Tomas Popela from comment #9) > > Actually I realized that this is change is not needed at all, because we > > will require brotli at some point when we will the add support for brotli > > encoding as Dan doesn't want to include it in libsoup - > > https://bugzilla.gnome.org/show_bug.cgi?id=788418. Žan should we leave the > > brotli check in WebKit? > > IMO it would be a better idea to support zstd encoding[1], unlike brotli > it's clearly superior to zlib on both client and server side[2] > > [1] https://tools.ietf.org/id/draft-kucherawy-dispatch-zstd-00.html > [2] http://zstd.net/ There is nowadays an egg-chicken problem with it, and I think the Linux WebKit ports doesn't have enough market share to change the status-quo. I have made a python script that checks Alexa top N sites to check how many support a given encoding: https://gist.github.com/clopez/dcae6ba605e7fa521b5e989ca323f522 And the numbers I get after a run of the script is that only 3 domains (which are all facebook owned) support zstd support of encoding zstd - Alexa top 100 : 1 domains (1%) - Alexa top 1000 : 3 domains (0.3%) support of encoding br (brotli) - Alexa top 100 : 24 domains (24%) - Alexa top 1000 : 91 domains (9.1%) support of encoding gzip - Alexa top 100 : 81 domains (81%) - Alexa top 1000 : 867 domains (86.7%)
Carlos Alberto Lopez Perez
Comment 14 2017-10-11 08:18:34 PDT
(In reply to Michael Catanzaro from comment #12) > (In reply to Tomas Popela from comment #9) > > Actually I realized that this is change is not needed at all, because we > > will require brotli at some point when we will the add support for brotli > > encoding as Dan doesn't want to include it in libsoup - > > https://bugzilla.gnome.org/show_bug.cgi?id=788418. Žan should we leave the > > brotli check in WebKit? > > I don't think we should support brotli decoding unless it's supported by > libsoup (which we might still decide to do), so let's still remove this > unnecessary brotli check. I think the current patch is right (no matter what we decide now), because there isn't currently any support in webkit for decoding brotli content (AFAIK)... so lets remove this dependency check from CMake. If in the future someone wants to propose any feature for WebKit that requires to interact directly with brotli encoded content they can bring this back.
Michael Catanzaro
Comment 15 2017-10-11 10:46:45 PDT
Note a similar change will be needed for WPE (again, after the next WOFF2 release), see bug #178158.
Zan Dobersek
Comment 16 2017-10-13 09:57:43 PDT
(In reply to Tomas Popela from comment #9) > Actually I realized that this is change is not needed at all, because we > will require brotli at some point when we will the add support for brotli > encoding as Dan doesn't want to include it in libsoup - > https://bugzilla.gnome.org/show_bug.cgi?id=788418. Žan should we leave the > brotli check in WebKit? No need, I can revert the removal once it's needed again.
Frédéric Wang (:fredw)
Comment 17 2017-11-14 04:34:56 PST
Comment on attachment 323294 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=323294&action=review > Source/WebCore/CMakeLists.txt:3663 > + list(APPEND WebCore_LIBRARIES "${WOFF2DEC_LIBRARIES}") Brotli dep was removed in bug 179630, however we forgot to take that part :-( @Tomas, Michael: can one of you please handle that?
Michael Catanzaro
Comment 18 2017-11-14 08:42:40 PST
Thanks for pointing this out, Fred. I'll handle it. Had forgotten this bug.
Michael Catanzaro
Comment 19 2017-11-14 08:44:10 PST
WebKit Commit Bot
Comment 20 2017-11-14 09:18:10 PST
Comment on attachment 326880 [details] Patch Clearing flags on attachment: 326880 Committed r224817: <https://trac.webkit.org/changeset/224817>
WebKit Commit Bot
Comment 21 2017-11-14 09:18:12 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.