libelektra icon indicating copy to clipboard operation
libelektra copied to clipboard

document global keyset

Open markus2330 opened this issue 4 years ago • 6 comments

as discussed in #3651

markus2330 avatar Mar 05 '21 08:03 markus2330

There is already some documentation. See https://github.com/ElektraInitiative/libelektra/pull/3651#issuecomment-781539532

I already added some information about the caching of the global Keyset.

What else should we document and where?

kodebach avatar Mar 05 '21 10:03 kodebach

Places where usage and decisions of global keyset are documented:

  1. https://github.com/ElektraInitiative/libelektra/blob/master/doc/decisions/global_keyset.md
  2. https://github.com/ElektraInitiative/libelektra/blob/master/doc/tutorials/plugins.md#elektraplugingetglobalkeyset
  3. https://github.com/ElektraInitiative/libelektra/blob/a80240f20c735514d9ba4f7a98a1306f11eab12d/src/plugins/doc/doc.c#L150-L163
  4. https://github.com/ElektraInitiative/libelektra/blob/a80240f20c735514d9ba4f7a98a1306f11eab12d/src/libs/plugin/plugin.c#L152-L170

Personally I think points 3 and 4 are most important to a user of the global keyset. Maybe we could document which part of the global keyset is cached.

@markus2330 where can we improve this docu?

mpranj avatar Mar 05 '21 14:03 mpranj

I don't see much information about the structure of the global keyset. Also where/when/how plugins are supposed to write/cleanup. (I.e. convention to avoid clashes between different plugins.)

libelektra/src/plugins/doc/doc.c and the plugin tutorials would be good places. In general it is often helpful if the different places link to each other.

markus2330 avatar Mar 06 '21 07:03 markus2330

I don't see much information about the structure of the global keyset.

Not sure what is meant here, it is just a keyset.

Also where/when/how plugins are supposed to write/cleanup.

This docu could be improved, but: there are no limitations. A plugin can use it at any time and should probably clean up unused keys asap, such that the keyset remains small.

In general it is often helpful if the different places link to each other.

I agree, the docu should ideally be in one place, or at least linked together. Currently it is hard to find information (and this applies to other parts of the docu as well).

mpranj avatar Mar 07 '21 13:03 mpranj

[structure of the global keyset]

I mean the semantics of the hierarchy, e.g. if /elektra keys are reserved or similar.

there are no limitations

There should be limitations: if any plugin can change any part as they want it clearly cannot work as they might remove each others keys.

I agree, the docu should ideally be in one place, or at least linked together.

:sparkling_heart:

markus2330 avatar Mar 07 '21 16:03 markus2330

I mark this issue 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 the issue by writing a message here or create a new issue with the remainder of this issue. Thank you for your contributions :sparkling_heart:

stale[bot] avatar Jul 13 '22 23:07 stale[bot]

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 :sparkling_heart:

github-actions[bot] avatar Jul 15 '23 02:07 github-actions[bot]

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 :sparkling_heart:

github-actions[bot] avatar Jul 30 '23 01:07 github-actions[bot]