Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename option arguments to indicate expected type #1650

Conversation

rocher
Copy link
Contributor

@rocher rocher commented Mar 15, 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.

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
Copy link
Contributor Author

rocher commented Mar 16, 2024

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
21 of 22 checks passed
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