Bug 214309 - [webkitcorepy] Spin off general webkitpy tools into a pip module
Summary: [webkitcorepy] Spin off general webkitpy tools into a pip module
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: Safari 13
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jonathan Bedard
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-07-14 11:22 PDT by Jonathan Bedard
Modified: 2020-07-15 14:40 PDT (History)
18 users (show)

See Also:


Attachments
Patch (53.21 KB, patch)
2020-07-14 11:43 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch for landing (53.40 KB, patch)
2020-07-15 14:11 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Bedard 2020-07-14 11:22:33 PDT
This bug is intended as the start of a discussion on how to better organize our Python tooling so that it's 1) more re-usable (particularly relevant for services) 2) better tested 3) less coupled to WebKit's specific development quirks.

Eventually, the intention is to break off many more parts of webkitpy into this, or other, modules until webkitpy only contains code specific to developing WebKit within the WebKit checkout.
Comment 1 Jonathan Bedard 2020-07-14 11:43:02 PDT
Created attachment 404258 [details]
Patch
Comment 2 Jonathan Bedard 2020-07-15 11:46:15 PDT
Comment on attachment 404258 [details]
Patch

The consensus I've heard so far is that this is the right direction.

Obviously a single class is insufficient for a library, but I think that doing this piece-by-piece will result in cleaner SCM history as well as more thorough code review.
Comment 3 dewei_zhu 2020-07-15 12:25:25 PDT
Comment on attachment 404258 [details]
Patch

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

> Tools/Scripts/webkitpy/port/win.py:-40
> -from webkitpy.common.system.executive import Executive

Do we intentionally remove this? If so, maybe we should mention it in the change log.
Comment 4 Jonathan Bedard 2020-07-15 12:37:14 PDT
Comment on attachment 404258 [details]
Patch

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

>> Tools/Scripts/webkitpy/port/win.py:-40
>> -from webkitpy.common.system.executive import Executive
> 
> Do we intentionally remove this? If so, maybe we should mention it in the change log.

This was intentional, I have an IDE configured and removed unused imports. I'll update changelogs.
Comment 5 dewei_zhu 2020-07-15 12:37:57 PDT
Comment on attachment 404258 [details]
Patch

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

>>> Tools/Scripts/webkitpy/port/win.py:-40
>>> -from webkitpy.common.system.executive import Executive
>> 
>> Do we intentionally remove this? If so, maybe we should mention it in the change log.
> 
> This was intentional, I have an IDE configured and removed unused imports. I'll update changelogs.

Got it.
Comment 6 Fujii Hironori 2020-07-15 12:57:14 PDT
pip? Do you plan to add the such modules into PyPI? And, use them by auto-installing?
Comment 7 Jonathan Bedard 2020-07-15 13:53:21 PDT
(In reply to Fujii Hironori from comment #6)
> pip? Do you plan to add the such modules into PyPI? And, use them by
> auto-installing?

We definitely are going to be adding these to a package index, not clear yet if we want to add them to the globally accessible one. (Apple has a private package index which we prefer over the global one, but other organizations developing WebKit may want to install these packages, which would likely push us to add them to the global package index)

As for auto-installing, yes, but not for WebKit development from the WebKit repository. That should remain unchanged because it's useful to pair WebKit changes with script changes. The use case for auto-installing our own packages that I had in mind is the various Python services we host (which don't share a ton of code at the moment)
Comment 8 Jonathan Bedard 2020-07-15 14:11:52 PDT
Created attachment 404392 [details]
Patch for landing
Comment 9 EWS 2020-07-15 14:39:37 PDT
Committed r264425: <https://trac.webkit.org/changeset/264425>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 404392 [details].
Comment 10 Radar WebKit Bug Importer 2020-07-15 14:40:17 PDT
<rdar://problem/65627721>