Closed reubenmiller closed 1 year ago
Mostly a matter to upgrade to clap ="4.10"
with some issues with deprecated methods:
error[E0599]: no method named `parse` found for struct `Arg` in the current scope
--> crates/core/tedge/src/cli/mqtt/cli.rs:37:29
|
37 | #[clap(short, long, parse(try_from_str = parse_qos), default_value = "0")]
| ^^^^^ method not found in `Arg`
``
As a side effect of bumping clap version, --help
no longer show the version, and this for all the tedge-xxx
executables.
QA has thoroughly checked the feature and here are the results:
Checked for:
Is your refactoring request related to a problem? Please describe.
When printing the help text of a command (e.g.
c8y-firmware-plugin --help
), the binary name and version is displayed on the first line of the help text.Having the information within the help text makes parsing the output more complicated for automation purposes (e.g. generating automatic do documents from the command output as the version changes more frequently than the help contents).
Below shows an example of the version information which is printed on the first line.
Here is the full example:
Command
Output
Describe the solution you'd like
In comparison with other tooling, it is more common to just display the version via
--version
(or something similar), rather than printing it out when using--help
.curl --help
docker --help
grep --help
All of those commands have a dedicated version flag should the user want to know the version of the command they are using.
Note
Describe alternatives you've considered
Additional context