WIP: upgrade urfave/cli to v2 #404

Draft
p4u1 wants to merge 7 commits from p4u1/abra:upgrade-cli into main
Member

THIS IS VERY WIP!!!!

This is an attempt to fix a regression found by running the integration test suite.

The problem is with running the following:

  run $ABRA app cmd --local "$TEST_APP_DOMAIN" test_cmd_arg -- bing

This does not work properly with the old cli library

The main breaking change is a change in the order of flag and argument parsing (see here for details in the migration guide). This change is also what fixes the problem above.

THIS IS VERY WIP!!!! This is an attempt to fix [a regression](https://git.coopcloud.tech/coop-cloud/abra/pulls/403#issuecomment-19723) found by running the integration test suite. The problem is with running the following: ``` run $ABRA app cmd --local "$TEST_APP_DOMAIN" test_cmd_arg -- bing ``` This does not work properly with the old cli library The main breaking change is a change in the order of flag and argument parsing ([see here](https://cli.urfave.org/migrate-v1-to-v2/#flags-before-args) for details in the migration guide). This change is also what fixes the problem above.
p4u1 added 4 commits 2024-02-23 14:00:06 +00:00
Owner

@p4u1 Trying to dig into this now. abra users at large requested that we stay on v1 of urfave for the arg handling that it provides and I did the revert migration in 0e688f1407. Maybe handy if you DM me on matrix to figure this out together. Thanks for looking into it!

@p4u1 Trying to dig into this now. `abra` users at large requested that we stay on v1 of `urfave` for the arg handling that it provides and I did the revert migration in 0e688f1407a1f17333ea6cf4c4f64ba9b9d800fa. Maybe handy if you DM me on matrix to figure this out together. Thanks for looking into it!
Owner

coop-cloud/organising#336 seems relevant? Which involved dropping back to a point release of urfave? We could possibly attempt to pin there... am using git log -p --follow go.mod to check the updates/commits...

https://git.coopcloud.tech/coop-cloud/organising/issues/336 seems relevant? Which involved dropping back to a point release of `urfave`? We could possibly attempt to pin there... am using `git log -p --follow go.mod` to check the updates/commits...
Author
Member

Thanks for the feedback! I open an issue to discuss this further coop-cloud/organising#581

Thanks for the feedback! I open an issue to discuss this further https://git.coopcloud.tech/coop-cloud/organising/issues/581
p4u1 added 2 commits 2024-03-11 15:09:02 +00:00
p4u1 added 1 commit 2024-03-11 15:14:39 +00:00
continuous-integration/drone/pr Build is passing Details
b81f5651d3
fmt
Owner

@p4u1 given coop-cloud/docs.coopcloud.tech#256 (comment) I think it might be worth a look into how feasible it is to upgrade further into the alpha v3 which provides https://github.com/urfave/cli/pull/1568. this would allow us to specify some flags ("--chaos", "--debug", etc.) as global and can be passed in any "style"? This is a bit of a long shot but might be nicer than "patch to re-order flags" and we could also help upstream fix stuff as we go... whatcha reckon?

@p4u1 given https://git.coopcloud.tech/coop-cloud/docs.coopcloud.tech/pulls/256#issuecomment-20322 I think it might be worth a look into how feasible it is to upgrade further into the alpha v3 which provides https://github.com/urfave/cli/pull/1568. this would allow us to specify some flags ("--chaos", "--debug", etc.) as global and can be passed in any "style"? This is a bit of a long shot but might be nicer than "patch to re-order flags" and we could also help upstream fix stuff as we go... whatcha reckon?
All checks were successful
continuous-integration/drone/pr Build is passing
This pull request is marked as a work in progress.
This branch is out-of-date with the base branch
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b p4u1-upgrade-cli main
git pull upgrade-cli

Step 2:

Merge the changes and update on Gitea.
git checkout main
git merge --no-ff p4u1-upgrade-cli
git push origin main
Sign in to join this conversation.
No description provided.