Skip to content

Rename option arguments to indicate expected type#1650

Merged
mosteo merged 1 commit into
alire-project:masterfrom
rocher:feature/Rename-arguments-to-improve-type-description
Mar 18, 2024
Merged

Rename option arguments to indicate expected type#1650
mosteo merged 1 commit into
alire-project:masterfrom
rocher:feature/Rename-arguments-to-improve-type-description

Conversation

@rocher

@rocher rocher commented Mar 15, 2024

Copy link
Copy Markdown
Contributor

In commands with options that admit arguments, like --prefix in alr install, is useful to provide an argument name in the command help that gives a hint of the expected type.

For example, alr install -h shows the message:

OPTIONS
   --prefix=ARG   Override installation prefix (default is ...)

When changed to:

OPTIONS
   --prefix=DIR   Override installation prefix (default is ...)

the DIR name of the argument immediately says what is expected in this option. In cases where this is not so obvious, it helps even more.

For example, in alr build -h:

OPTIONS
   --profiles=LIST     Comma-separated list of <crate>=<profile> values (see description)
   --stop-after=STAGE  Build stage after which to stop (see description)

is a quick remainder of what is expected in that options.

In commands with options that admit arguments, like '--prefix' in
'alr install', is useful to provide an argument name in the command
help that gives a hint of the expected type.

For example, 'alr install -h' shows the message:
====
OPTIONS
   --prefix=ARG   Override installation prefix (default is ...)
====

When changed to:
====
OPTIONS
   --prefix=DIR   Override installation prefix (default is ...)
====

the 'DIR' name of the argument immediately says what is expected in this
option. In cases where this is not so obvious, it helps even more.
For example, in 'alr build -h':
====
OPTIONS
   --profiles=LIST     Comma-separated list of <crate>=<profile> values (see description)
   --stop-after=STAGE  Build stage after which to stop (see description)
====

is a quick remainder of what is expected in that options.
@rocher

rocher commented Mar 16, 2024

Copy link
Copy Markdown
Contributor Author

Don't understand why it failed in Ubuntu-latest gcc^10 with:

446   Link
447      [link]         alr-main.adb
448   gcc: fatal error: '-fuse-linker-plugin', but liblto_plugin.so not found
449   compilation terminated.
450   gprbuild: link of alr-main.adb failed

Any idea?

@mosteo mosteo merged commit 8aaefab into alire-project:master Mar 18, 2024
mosteo pushed a commit that referenced this pull request Mar 18, 2024
In commands with options that admit arguments, like '--prefix' in
'alr install', is useful to provide an argument name in the command
help that gives a hint of the expected type.

For example, 'alr install -h' shows the message:
====
OPTIONS
   --prefix=ARG   Override installation prefix (default is ...)
====

When changed to:
====
OPTIONS
   --prefix=DIR   Override installation prefix (default is ...)
====

the 'DIR' name of the argument immediately says what is expected in this
option. In cases where this is not so obvious, it helps even more.
For example, in 'alr build -h':
====
OPTIONS
   --profiles=LIST     Comma-separated list of <crate>=<profile> values (see description)
   --stop-after=STAGE  Build stage after which to stop (see description)
====

is a quick remainder of what is expected in that options.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants