coffee-tools / coffee

Reference implementation for a flexible core lightning plugin manager
https://docs.page/coffee-tools/coffee
9 stars 13 forks source link

Enhancements for the Upgrade Command #187

Open tareknaser opened 1 year ago

tareknaser commented 1 year ago

Currently, the upgrade command provides a way to upgrade an entire repository. However, there are several improvements that can be made to enhance the functionality and flexibility of the command. This is a tracking issue of the proposed enhancements:

tareknaser commented 1 year ago

I am now thinking that coffee upgrade <repo_name> --branch <branch_name> will be a bit confusing for the user because all other upgrade functions expect the user to pass the name of the plugin not the name of the repository.

But it also doesn't make sense to have coffee upgrade <plugin_name> --branch <branch_name> because the branch is specific to the repository not the plugin. One repository can and probably has multiple plugins.

vincenzopalazzo commented 1 year ago

This is a good point we should think about it

vincenzopalazzo commented 11 months ago

Ok there are two case here;

We should start with a simple solution and then iterate over it

tareknaser commented 11 months ago

We should start with a simple solution and then iterate over it

agreed. I will start with coffee upgrade <repo_name> --branch <branch_name> Could you take a look at the updated issue description and confirm that this is what we want on the long term?

vincenzopalazzo commented 11 months ago

YEah looks good, the last points looks a little bit strange to me, but I think when we start to solve the problem it will be more clear, so all good for now

tareknaser commented 7 months ago

I think it makes sense for coffee upgrade to only work on repositories, not plugins. Adding a command like coffee upgrade --plugin <plugin_name> would complicate the code because it would create discrepancies between the remote git HEAD and the plugin's git HEAD.

it's best to stick with supporting repositories containing only one plugin. cc @vincenzopalazzo

vincenzopalazzo commented 7 months ago

I think it makes sense for coffee upgrade to only work on repositories, not plugins.

A repository can be a plugin, e.g: folgore

command like coffee upgrade --plugin would complicate the code because it would create discrepancies between the remote git HEAD and the plugin's git HEAD.

Nothing is impossible with code and with a good tool like git, e.g:

There is no discrepancy, it is just a matter of git checkout <hash>

cc @tareknaser

tareknaser commented 7 months ago

We can also change coffee upgrade <repository_name> to coffee upgrade --repo <repository_name> to avoid confusion when we add coffee upgrade --plugin <plugin_name>.

what do you think?

vincenzopalazzo commented 7 months ago

idk I am still confusing about the upgrade command I should think more about it, maybe while using it

daywalker90 commented 7 months ago

i think upgrade currently does not re-parse the manifest file. I think it should!

vincenzopalazzo commented 7 months ago

i think upgrade currently does not re-parse the manifest file. I think it should!

It should I agree good catch, opening an issue now