Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

Efficient management of options w/o duplication #611

Closed
rakhimov opened this issue Apr 3, 2017 · 1 comment
Closed

Efficient management of options w/o duplication #611

rakhimov opened this issue Apr 3, 2017 · 1 comment

Comments

@rakhimov
Copy link
Contributor

rakhimov commented Apr 3, 2017

There's potential duplication of kovri options in:

  1. Boost program options
  2. kovri.conf
  3. Bash completion script
  4. man page

The manual management is error-prone as discussed in #610 .
We need to choose only one to manage
and generate the others with automation.
Keep it DRY and on SPOT :)

Boost program options or kovri --help seems to be the best candidate for being one true source.
However, it currently lacks important information like argument types and option descriptions.
With this information complete, it should be possible to cover the other formats,
for example, with help2man or bash scripts.

Helpful info:


By submitting this issue, I confirm the following:

  • I have read and understood the contributor guide.
  • I have checked that the issue I am reporting can be replicated or that the feature I am suggesting is not present.
  • I have checked opened or recently closed pull requests for existing solutions/implementations to my issue/suggestion.

rakhimov added a commit to rakhimov/kovri that referenced this issue Apr 6, 2017
This additional information is helpful for deducing the hints.
Only bool and path arguments are added.
Adding type information with Boost program options
is verbose and repetitive due to lack of reflection.
Macros can help, but it is still ugly.

Issue monero-project#611
rakhimov added a commit to rakhimov/kovri that referenced this issue Apr 6, 2017
The refactoring removes
most hard-coded options in the completion script.
The suggestions are deduced from argument types (path, bool).

Issue monero-project#611.
@anonimal
Copy link
Collaborator

anonimal commented Sep 7, 2018

NOTICE: THIS ISSUE HAS BEEN MOVED TO GitLab. Please continue the discussion there. See #1013 for details.

@anonimal anonimal closed this as completed Sep 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants