Bug 190732 - clean-webkit pulls in many unnecessary dependencies in webkitpy
Summary: clean-webkit pulls in many unnecessary dependencies in webkitpy
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: Dean Johnson
URL:
Keywords: InRadar
Depends on:
Blocks: 193025
  Show dependency treegraph
 
Reported: 2018-10-18 13:54 PDT by Dean Johnson
Modified: 2018-12-24 18:26 PST (History)
5 users (show)

See Also:


Attachments
Patch (2.96 KB, patch)
2018-10-18 13:59 PDT, Dean Johnson
no flags Details | Formatted Diff | Diff
Patch (2.76 KB, patch)
2018-10-18 14:18 PDT, Dean Johnson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dean Johnson 2018-10-18 13:54:31 PDT
Tools/Scripts/clean-webkit pulls in many unnecessary dependencies in webkitpy through creation of the Host object, which starts auto-installing 'bugzilla', 'buildbot' and 'web' packages. These can take a while to install, and are not needed at all if just trying to clean your checkout.
Comment 1 Dean Johnson 2018-10-18 13:59:05 PDT
Created attachment 352727 [details]
Patch
Comment 2 Alexey Proskuryakov 2018-10-18 14:14:17 PDT
Comment on attachment 352727 [details]
Patch

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

> Tools/Scripts/webkitpy/common/host.py:63
> +    @property
> +    def bugs(self):
> +        if not hasattr(self, '_bugs'):
> +            from webkitpy.common.net import bugzilla
> +            self._bugs = bugzilla.Bugzilla()
> +        return self._bugs

I think that this would be better with @memoized.

@memoized
def bugs(self):
    return bugzilla.Bugzilla()
Comment 3 Alexey Proskuryakov 2018-10-18 14:15:04 PDT
Well, also the import.
Comment 4 Dean Johnson 2018-10-18 14:18:06 PDT
Created attachment 352732 [details]
Patch
Comment 5 Dean Johnson 2018-10-18 14:19:24 PDT
Changed to use @memoized. Still need @property to access the functions as if they were a property, to allow class attributes 'bugzilla', 'buildbot', and 'web' to continue being used as they were.
Comment 6 Alexey Proskuryakov 2018-10-18 14:20:51 PDT
Comment on attachment 352732 [details]
Patch

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

> Tools/Scripts/webkitpy/common/host.py:58
> +    @property

Do we need @property here? Looks like @memoized tends to be used without.
Comment 7 Alexey Proskuryakov 2018-10-18 14:21:12 PDT
Saw your explanation now.
Comment 8 WebKit Commit Bot 2018-10-18 15:14:59 PDT
Comment on attachment 352732 [details]
Patch

Clearing flags on attachment: 352732

Committed r237269: <https://trac.webkit.org/changeset/237269>
Comment 9 WebKit Commit Bot 2018-10-18 15:15:01 PDT
All reviewed patches have been landed.  Closing bug.
Comment 10 Radar WebKit Bug Importer 2018-10-18 15:15:26 PDT
<rdar://problem/45386267>
Comment 11 Daniel Bates 2018-12-24 18:26:17 PST
(In reply to WebKit Commit Bot from comment #8)
> Comment on attachment 352732 [details]
> Patch
> 
> Clearing flags on attachment: 352732
> 
> Committed r237269: <https://trac.webkit.org/changeset/237269>

This broke "webkit-patch what-broke". See bug #193025.