Page MenuHomePhabricator

Use lib/ve/build/modules.json to build extension.json
Open, LowPublic

Description

Now that both core and ve-mw define manifests as json files, we should be able to remove the duplication of having core files listed in both modules.json and extension.json. This will probably require some upstream changes to modules.json as extension.json fragments some features further, e.g. image files are grouped together.

Event Timeline

Esanders raised the priority of this task from to Needs Triage.
Esanders updated the task description. (Show Details)
Esanders subscribed.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Jdforrester-WMF set Security to None.
Esanders added a subscriber: Jdforrester-WMF.

There are also core-specific modules, like the bulid and mobile groups, and libraries we already have in mw (jquery etc)

I'd suggest creating a extension-ve-mw.json with ve-mw specific modules, then creating a grunt task to stitch together that file with bits of modules.json. We could specify which core modules to merge in with a "@coreModules" list on extension-ve-mw.json.

Unfortunately we can't add json comments to flag modules.json as a generated file :( (we can add a "@comment" property at the top though)

Merged three versions of this ticket :)

Found T75964 after merging the last one here, so this one is becoming canonical, despite James being the first to report it

To further the goals of T202154 (reducing ResourceLoader module count) we could also whitelist modules which we actually need to be a public API, and flatten the others so they are never exposed to ResourceLoader.

VE currently creates 62 modules but probably needs about 10-20 of those to be independently loadable.