Page MenuHomePhabricator

Remove unused VueJS Components
Closed, ResolvedPublic

Description

I noticed these VueJS components were not used:

  • resources/ext.wikilambda.edit/components/ZFunctionSignature.vue
  • resources/ext.wikilambda.edit/components/ZObjectKeyInput.vue
  • resources/ext.wikilambda.edit/components/base/SelectMenu.vue
  • resources/ext.wikilambda.edit/components/editor/FnEditorInputListItem.vue

I used these commands using bash to detect the above files:

$ find resources/ -name "*.vue" | xargs -I% basename % > /tmp/to_check
$ for i in $(cat /tmp/to_check); do fgrep -Rq $i resources/ || echo $i; done

Note: What I propose solves the issue for now, but a CI job for detecting unused components would be much more helpful. I read that it is not possible for now. T279108 might be helpful for such thing (with tree-shaking, we would also probably be able to detect dead code either directly or via a plugin like this one for webpack).

Event Timeline

Change 829006 had a related patch set uploaded (by Teleosteen; author: Teleosteen):

[mediawiki/extensions/WikiLambda@master] Remove unused VueJS Components

https://gerrit.wikimedia.org/r/829006

Change 829006 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Remove unused VueJS Components

https://gerrit.wikimedia.org/r/829006