libelektra
libelektra copied to clipboard
Let plugins know about placement
We recently added the global KeySet that every plugin has access to. We could use this to pass additional information to plugins from kdGet and kdbSet. For example we could add system/elektra/placement to let plugins now, in which placement they are currently being called. This improves plugins that are mounted in multiple get/set placements (such as list), because they would know whether the current call is e.g. pregetstorage or postgetstorage.
This would also make it possible for a plugin to be a resolver and storage plugin simultaneously, which would e.g. be helpful for specload.
Thank you for adding this proposal! @mpranj and I already discussed it (even how to do it efficiently by simply copying metadata instead of creating new keys for every plugin).
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:
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:
As it is only for global plugins, I moved it to 2.0.0.
I actually kept the issue open, because it is implemented as part of #3693. Specifically, the current version of the PR has this function that is used by backend plugins. This is solves the problems the original issue describes.
https://github.com/ElektraInitiative/libelektra/blob/898990819649541dafeca1b74717e4e1ba24e1e1/src/libs/plugin/plugin.c#L175-L179
Ahh, ok, then you can link the pull request. I wouldn't see this issue as must-have requirement for #3693, though. If we manage to do it with acceptable performance, however, it would be fine.
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:
This issue is still open, because it is unclear whether the current API of elektraPluginGetPhase is the best solution. Maybe this would be better
typedef enum {
// ...
} ElektraPluginPhase;
ElektraPluginPhase elektraPluginGetPhase (Plugin * plugin);
Then plugins could use a switch instead of repeated if(strcmp(...)).
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:
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: