Statement:29: Difference between revisions
(CSV import) |
No edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
|firstname=Leszek | |firstname=Leszek | ||
|lastname=Manicki | |lastname=Manicki | ||
|tags=JavaScript | |||
|primarysession=Session:3 | |||
|secondarysessions=Session:16 | |||
|statement=Dependency management for JavaScript packages | |statement=Dependency management for JavaScript packages | ||
Latest revision as of 10:57, 14 December 2017
Tags | JavaScript |
---|---|
Primary Session | Growing the MediaWiki Technical Community |
Secondary Sessions | Supporting Third-Party Use of MediaWiki |
Dependency management for JavaScript packages
I believe we should be using a dependency management tool for JavaScript libraries in MediaWiki.
Currently there is no convenient way to manage JavaScript packages in MediaWiki, even though MediaWiki itself, as well as many extensions widely use them (both "own" JavaScript libraries and third-party libraries). Lack of such a solution in our infrastructure leads to numerous issues. Libraries are duplicated in our code bases, and there is a little control of what version of the package is used by different components. Updating dependencies becomes a complex and error-prone manual process. As each of our components include their dependencies separately, our users might be loading the same package multiple times.
Having a dependency management system for JavaScript packages would be beneficial in multiple areas. Developers would be able to easily control and maintain packages their software depends on. Deploying MediaWiki and extensions would become easier and more transparent with regard to JavaScript packages, both for WMF infrastructure and for non-WMF users of our software. With de-duplication of dependencies, users will be served smaller amount of bytes. Finally, once we have a convenient and standardized way of managing JavaScript packages, our software would be more interesting and welcoming for new developers coming from the dynamically growing JavaScript community.
We have addressed the similar problem for PHP libraries a while ago when we started to use Composer for PHP dependency management. We have been discussing solutions for JavaScript packages for a couple of years. Possible tools like npm, yarn, or even Composer, have been discussed, but we haven't come up with a plausible solution yet.
I hope the summit will be able to collect our requirements, re-evaluate the previous investigations we have made, collect new ideas, and will come up with a solution for JavaScript dependency management. I believe once we have it we will be walking into the future with confidence.