hythm7 / Pakku

Package Manager for the Raku Programming Language
Artistic License 2.0
26 stars 3 forks source link

pakku verbose debug options not supported? #26

Closed melezhik closed 1 year ago

melezhik commented 1 year ago

Hi! I tried to use debug/verbose option in various fashions and every time get an error:

  1. pakku add notest verbose debug Foo - https://ci.sparrowhub.io/report/2665 - FAIL
  2. pakku add notest debug Foo - https://ci.sparrowhub.io/report/2666 - FAIL

without debug/verbose options the same command succeeds - https://ci.sparrowhub.io/report/2667 - PASS

HTH

Alexey

hythm7 commented 1 year ago

Pakku has commands like (add remove upgrade list search download) and has options. there are two types of options:

1- per command specific options These are the options that control Pakku commands like (add, remove ...). And when specifying these options, they must be placed after the command.

2- general options These are the options that control the general behavior of Pakku (they are valid for all commands). And the general options must be placed after "pakku" and before the command (add, remove ...).

The "verbose" option is a general option that control the verbosity level, so it needs to be placed before the command.

Placing a general option after the command like pakku add notest verbose debug Foo will make Pakku thing you trying to install 3 distributions named (Foo, debug, verbose), the correct way is to use:

pakku verbose debug add notest Foo

Here "verbose debug" is a general option so its placed after pakku and before add, "notest" is a "add" command option, so its placed after add.

Pakku full command is similar to: pakku < general options > < command > < specific command options > < distributions to install >

It can be confusing at first but once get used to it becomes simple.

The README file lists all options specific to each command, and the general options are in the section called "Pakku options". I think thats poorly named, i will update README with clearer description.

Thanks for reporting the issue.

melezhik commented 1 year ago

Makes a sense ! Thanks. Maybe worth to clarify this in the docs ? Maybe it’s already there , I just did not notice it … ))

On Wed, Jan 18, 2023 at 6:44 PM hythm @.***> wrote:

Pakku has commands like (add remove upgrade list search download) and has options. there are two types of options:

1- per command specific options These are the options that control Pakku commands like (add, remove ...). And when specifying these options, they must be placed after the command.

2- general options These are the options that control the general behavior of Pakku (they are valid for all commands). And the general options must be placed after "pakku" and before the command (add, remove ...).

The "verbose" option is a general option that control the verbosity level, so it needs to be placed before the command.

Placing a general option after the command like pakku add notest verbose debug Foo will make Pakku thing you trying to install 3 distributions named (Foo, debug, verbose), the correct way is to use:

pakku verbose debug add notest Foo

Here "verbose debug" is a general option so its placed after pakku and before add, "notest" is a "add" command option, so its placed after add.

Pakku full command is similar to: pakku

It can be confusing at first bjr once get used to it it become simple.

— Reply to this email directly, view it on GitHub https://github.com/hythm7/Pakku/issues/26#issuecomment-1396295082, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHRHSJ5YXCBOWL6WWO6E2TWTCE6TANCNFSM6AAAAAAT7LATRU . You are receiving this because you authored the thread.Message ID: @.***>

hythm7 commented 1 year ago

You are definately right, it needs clarification in README i just updated my previous comment.