dxw/whippet

Add ability to remove a plugin, without updating other plugins

Stretch96 opened this issue · 1 comments

The process of removing a plugin involves removing the reference from whippet.json and then running whippet deps update, which will then update other plugins.

snim2 commented

This is copied over from #1 which is now closed, but is related to this:

Moving this here, so it's not in my email.

On 24/06/2014 20:18, Lee Maguire wrote:

Removing a plugin from app/plugins, running “whippet plugins upgrade” seems to remove the plugin - but it persists on the server.

e.g. I removed jw-player nhs-hee/app - but it’s still there. When I look at /app/wp-content/plugins I see that jw-player sticks around - and just gets deployed along with the rest of them.

This is bad, unexpected, one of the issues we had with the previous deployment scheme.

Workaround is to manually delete the plugin in both locations

On 25/06/2014, Harry Metcalfe wrote:

I think that might be expected behaviour. Whenever you make a change to plugins you need to run plugins install so that the change is applied in plugins.lock.

I haven't thought through what happens if you remove a plugin, don't install, and then run update. But If the plugin you removed from plugins is still in plugins.lock, then I think it is correct behaviour for whippet to continue deploying it.

Does the deploy process need a tweak here, or does running whippet plugins install after you remove the plugin from plugins solve the problem?

On 26/06/2014 20:18, Lee Maguire wrote:

I ran plugins install. The plugin was removed from plugins.lock but persisted on the server.

The current behaviour is that deleting a plugin from whippet.json and running whippet deps update still removes the plugin from the lockfile but leaves the relevant files on disk. Our current deployment and hosting scheme means that this is no longer an issue "on the server", but it is unexpected behaviour for the user, and not ideal for local development.

Ideally we would:

  • add two new commands to add / remove individual dependencies (for all dependency types)
  • have whippet deps update and whippet deps remove... remove files on disk, and print a warning for the user to let them know this has happened (and that .gitignore has been updated)