Page MenuHomePhabricator

Document history & capability of externals
Closed, DeclinedPublic

Description

Need to document better as it had many pros and cons

Code: https://phabricator.wikimedia.org/diffusion/PWBO/browse/master/externals/__init__.py

Pros:

  • can install from os package management
  • can install from URL
  • can apply patches
  • can compile code on need
  • multi-platform linux (debian/ubuntu - apt-get, fedora/centos - yum, win, osx)
  • ask user for permission before executing code (patch.exe)
  • shows to user the size of download before starting

Cons:

  • no md5 checksum check

References:

Event Timeline

jayvdb created this task.Jun 18 2016, 1:38 PM
DrTrigon added a comment.EditedJun 20 2016, 5:44 AM

Agree, actually was an amazing piece of code I was proud of. However I never saw too many cons, since it was opt-in: no pywikibot developper had to use it...

What do you need? A describtion of how it worked? More references?

Mostly what I needed was any history which isnt in the git repo.

I had assumed from what you had said earlier that the design of externals/ had been modeled on VisTrails, but it now seems that the inspiration from VisTrails was only the concept of "vendored" dependencies. Surprisingly this concept doesnt have a English Wikipedia article, but it is a common pattern, especially in Ruby and Javascript Node and recently PHP with Composer, but hasnt yet made its way into Python in a formalised manner afaik (and in fact is not easy to do right in Python as it requires fiddling with PYTHONPATH (e.g. pwb.py) or relative imports in the vendored package; see here and there).

If externals/ didnt borrow any design or code from elsewhere, then the git history is sufficient to explain the history of it.

Anything you can add about its functionality would be very helpful.

That said, I am pretty familiar with externals/, and I can wax lyrical about the cons as I was maintaining the httplib2 forked into externals (and fixing it), and I was responsible for killing it in core. vendoring is hard to do right in Python, especially if Pywikibot is a library used by a program that also wants to use one of the vendored dependencies - the result is typically two copies of the library, or the program is forced to used the vendored version, which may be chronically out of date, and may even have unpatched security vulnerabilities.

jayvdb renamed this task from Document history of externals to Document history & capability of externals.Jun 21 2016, 8:54 AM
DrTrigon updated the task description. (Show Details)Jun 26 2016, 7:26 PM
Restricted Application added a subscriber: pywikibot-bugs-list. · View Herald TranscriptMar 23 2019, 10:15 PM
Xqt removed jayvdb as the assignee of this task.Tue, Sep 24, 3:52 PM
Xqt closed this task as Declined.Tue, Sep 24, 7:04 PM
Xqt added a subscriber: Xqt.

Old compat stuff