Bug 160691 - Skip to check directories existence in build-webkit
Summary: Skip to check directories existence in build-webkit
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Gyuyoung Kim
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-09 07:29 PDT by Gyuyoung Kim
Modified: 2016-08-12 23:14 PDT (History)
8 users (show)

See Also:


Attachments
Patch (2.86 KB, patch)
2016-08-09 07:30 PDT, Gyuyoung Kim
no flags Details | Formatted Diff | Diff
Patch (2.86 KB, patch)
2016-08-09 07:35 PDT, Gyuyoung Kim
no flags Details | Formatted Diff | Diff
Patch (2.85 KB, patch)
2016-08-09 08:06 PDT, Gyuyoung Kim
no flags Details | Formatted Diff | Diff
Patch (2.94 KB, patch)
2016-08-09 17:06 PDT, Gyuyoung Kim
no flags Details | Formatted Diff | Diff
Patch (3.22 KB, patch)
2016-08-11 09:17 PDT, Gyuyoung Kim
no flags Details | Formatted Diff | Diff
Patch (2.95 KB, patch)
2016-08-12 01:36 PDT, Gyuyoung Kim
achristensen: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gyuyoung Kim 2016-08-09 07:29:39 PDT
EFL and GTK ports only use WebKit2 port, build-webkit script has been checking if WebKit1 directory exists. Remove the check.
Comment 1 Gyuyoung Kim 2016-08-09 07:30:30 PDT
Created attachment 285639 [details]
Patch
Comment 2 Gyuyoung Kim 2016-08-09 07:35:12 PDT
Created attachment 285640 [details]
Patch
Comment 3 Gyuyoung Kim 2016-08-09 08:06:27 PDT
Created attachment 285641 [details]
Patch
Comment 4 Alex Christensen 2016-08-09 09:34:53 PDT
Comment on attachment 285641 [details]
Patch

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

> Tools/Scripts/build-webkit:155
> +push @projects, "Source/WebKit2" if isEfl() or isGtk();

WebKit2 is needed for Mac and iOS, too.

> Tools/Scripts/webkitdirs.pm:-171
> -    until ((-d File::Spec->catdir($sourceDir, "Source") && -d File::Spec->catdir($sourceDir, "Source", "WebCore") && -d File::Spec->catdir($sourceDir, "Source", "WebKit")) || (-d File::Spec->catdir($sourceDir, "Internal") && -d File::Spec->catdir($sourceDir, "OpenSource")))

Why not just change this to WebKit2 instead of removing it?
Comment 5 Gyuyoung Kim 2016-08-09 17:06:35 PDT
Created attachment 285693 [details]
Patch
Comment 6 Gyuyoung Kim 2016-08-09 17:09:30 PDT
(In reply to comment #4)
> Comment on attachment 285641 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=285641&action=review
> 
> > Tools/Scripts/build-webkit:155
> > +push @projects, "Source/WebKit2" if isEfl() or isGtk();
> 
> WebKit2 is needed for Mac and iOS, too.

Missed it. Fixed.

> > Tools/Scripts/webkitdirs.pm:-171
> > -    until ((-d File::Spec->catdir($sourceDir, "Source") && -d File::Spec->catdir($sourceDir, "Source", "WebCore") && -d File::Spec->catdir($sourceDir, "Source", "WebKit")) || (-d File::Spec->catdir($sourceDir, "Internal") && -d File::Spec->catdir($sourceDir, "OpenSource")))
> 
> Why not just change this to WebKit2 instead of removing it?

Because I thought that *WebKit2* may influence on only WK1 ports. If not, it would be great to change it with *WebKit2*.
Comment 7 Gyuyoung Kim 2016-08-10 18:32:21 PDT
Alex, ping ?
Comment 8 Michael Catanzaro 2016-08-11 07:18:01 PDT
Comment on attachment 285693 [details]
Patch

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

> Tools/Scripts/webkitdirs.pm:171
> +    until ((-d File::Spec->catdir($sourceDir, "Source") && -d File::Spec->catdir($sourceDir, "Source", "WebCore") && -d File::Spec->catdir($sourceDir, "Source", "WebKit2")) || (-d File::Spec->catdir($sourceDir, "Internal") && -d File::Spec->catdir($sourceDir, "OpenSource")))

So this makes it possible to run build-webkit from a tarball that doesn't contain the WebKit directory... but makes it impossible to run it from a tarball that doesn't contain WebKit2. I would just remove it. Or replace it with JavaScriptCore; all ports will surely have that.
Comment 9 Michael Catanzaro 2016-08-11 07:23:58 PDT
Downstream ports will need to patch this.
Comment 10 Konstantin Tokarev 2016-08-11 07:32:56 PDT
CMake checks presense of all source files in configuration time, so it will bail out if e.g. WebKit2 directory is missing when build requires it. Shouldn't we just omit this check if isCMakeBuild() is true?
Comment 11 Gyuyoung Kim 2016-08-11 08:23:19 PDT
(In reply to comment #10)
> CMake checks presense of all source files in configuration time, so it will
> bail out if e.g. WebKit2 directory is missing when build requires it.
> Shouldn't we just omit this check if isCMakeBuild() is true?

As we talked on irc, let's postpone to land this patch for a while. Let me find better  solutions as you guys suggest.
Comment 12 Gyuyoung Kim 2016-08-11 09:17:11 PDT
Created attachment 285828 [details]
Patch
Comment 13 Gyuyoung Kim 2016-08-11 09:20:02 PDT
I apply annulen's suggestion to the patch for downstream ports. CMake ports don't need to check directories because CMake checks whether directories are there again.
Comment 14 Gyuyoung Kim 2016-08-11 09:21:01 PDT
Comment on attachment 285828 [details]
Patch

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

> Tools/Scripts/webkitdirs.pm:2076
> +    return 1 unless isAppleMacWebKit() || isIOSWebKit() || isWinCairo();

Please let me know other ports should be added to this list. e.g. isAppleWinWebKit() ?
Comment 15 Konstantin Tokarev 2016-08-11 09:25:29 PDT
Comment on attachment 285828 [details]
Patch

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

>> Tools/Scripts/webkitdirs.pm:2076
>> +    return 1 unless isAppleMacWebKit() || isIOSWebKit() || isWinCairo();
> 
> Please let me know other ports should be added to this list. e.g. isAppleWinWebKit() ?

This change is wrong, it makes WinCairo non-cmake. Also isIOSWebKit() is already covered by isAppleMacWebKit(), which is defined as (portName() eq Mac) || isIOSWebKit()
Comment 16 Gyuyoung Kim 2016-08-12 01:34:14 PDT
Comment on attachment 285828 [details]
Patch

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

>>> Tools/Scripts/webkitdirs.pm:2076
>>> +    return 1 unless isAppleMacWebKit() || isIOSWebKit() || isWinCairo();
>> 
>> Please let me know other ports should be added to this list. e.g. isAppleWinWebKit() ?
> 
> This change is wrong, it makes WinCairo non-cmake. Also isIOSWebKit() is already covered by isAppleMacWebKit(), which is defined as (portName() eq Mac) || isIOSWebKit()

Did win-cairo port adopt cmake ? I didn't know that. Thanks.
Comment 17 Gyuyoung Kim 2016-08-12 01:36:45 PDT
Created attachment 285901 [details]
Patch
Comment 18 Konstantin Tokarev 2016-08-12 02:06:28 PDT
LGTM
Comment 19 Darin Adler 2016-08-12 09:21:47 PDT
Comment on attachment 285901 [details]
Patch

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

> Tools/Scripts/webkitdirs.pm:170
>      # defined by containing Sources, WebCore, and WebKit

Should fix this comment.
Comment 20 Gyuyoung Kim 2016-08-12 23:13:27 PDT
Committed r204444: <http://trac.webkit.org/changeset/204444>
Comment 21 Gyuyoung Kim 2016-08-12 23:14:08 PDT
(In reply to comment #19)
> Comment on attachment 285901 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=285901&action=review
> 
> > Tools/Scripts/webkitdirs.pm:170
> >      # defined by containing Sources, WebCore, and WebKit
> 
> Should fix this comment.

Fixed.