Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Clarify when/if to use elektraGetOpts #4443

Closed
markus2330 opened this issue Aug 24, 2022 · 4 comments
Closed

Clarify when/if to use elektraGetOpts #4443

markus2330 opened this issue Aug 24, 2022 · 4 comments
Labels

Comments

@markus2330
Copy link
Contributor

How would using gopts help with making it work properly?

There is already one reason above (externally accessible spec). Other reasons are:

  • IIRC elektraGetOpts does not consider meta:/default at all.
  • elektraGetOpts definitely doesn't handle any other spec like e.g. meta:/type
  • AFAIK kdb's profile feature can be used to set default arguments within the KDB. That would automatically be handled correctly with gopts, since it would load the proc:/ keys at the right moment for all spec validation to work correctly (at least on new-backend it will) and a cascading lookup would return the correct key for everything.

Originally posted by @kodebach in #4438 (comment)

I think this should be clearly stated in the docu of elektraGetOpts. Otherwise people might use elektraGetOpts "by accident" as they might not know about gopts.

@kodebach can you take this issue?

@kodebach
Copy link
Member

The tutorial for command line options already recommends gopts and only briefly explains how to use elektraGetOpts. It also explains the downsides of doing so. The doxygen comment of elektraGetOpts does not directly mention gopts, but it refers to the tutorial.

What exactly should we improve here? IMO this is again more of a discoverability issue not an issue with actual docs content.

@markus2330
Copy link
Contributor Author

The doxygen comment of elektraGetOpts does not directly mention gopts

This should be changed. It should recommend to use gopts, with the reasons you outlined.

IMO this is again more of a discoverability issue not an issue with actual docs content.

Yes, it is a discoverability issue, thus it should be mentioned in elektraGetOpts. We should also mention it in the dev guide for application developers #4436.

@github-actions
Copy link

I mark this stale as it did not have any activity for one year. I'll close it in two weeks if no further activity occurs. If you want it to be alive again, ping by writing a message here or create a new issue with the remainder of this issue.
Thank you for your contributions 💖

@github-actions github-actions bot added the stale label Aug 25, 2023
@github-actions
Copy link

github-actions bot commented Sep 8, 2023

I closed this now because it has been inactive for more than one year. If I closed it by mistake, please do not hesitate to reopen it or create a new issue with the remainder of this issue.
Thank you for your contributions 💖

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants