-
Notifications
You must be signed in to change notification settings - Fork 122
[new-backend] Open questions (part 2) #4521
Comments
|
|
Modifying
|
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. |
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. |
This is a summary of #4407 with some extra questions.
Important: If you want to comment on one of the open questions, please always use the title of the question used in this description, even if there is a previous comment you're replying to. This makes it easier to track conversations. For example:
modules
vsglobal
Question
Should we merge the
KeySet * modules
andKeySet * global
withinstruct _KDB
?Summary
struct _KDB
we would have one less field and we'd need to allocate one lessstruct _KeySet
. Beyond that all plugins that load extra plugins themselves (for whatever reason) would have access to this and wouldn't need to create a separateKeySet * modules
.Result
No result yet
Replace
.dir
with.elektra
Question
Should we use
.elektra
instead of.dir
to storedir:/
keys.Summary
.dir
is very generic and could cause conflicts..elektra
is more specific and reminds of.git
Result
No result yet
elektraModulesInit
errorQuestion
Would it be better, if
elektraModulesInit
set an error directly, instead of letting the calling function define the error?libelektra/src/libs/elektra/kdb.c
Lines 364 to 383 in 5f0895b
Summary
Result
Make
elektraModulesInit
set an error directly.KeySet * global
as argument toelektraPluginOpen
Question
Should
elektraPluginOpen
take theglobal
keyset as an argument?Summary
elektraPluginOpen
call inlibelektra-kdb
we need to do aplugin->global = kdb->global
, otherwise the plugin is not initialized correctly. @atmaxinger already in encountered this oddity in a recent PR.open
function right now, because that is called inelektraPluginOpen
beforeplugin->global
is set.elektraPluginOpen
already takes two differentKeySet*
arguments, another would be even more API smell.Result
No result yet.
Plugins loading extra plugins
Question
Should plugins (any kind: backend, hook, storage, etc.) be allowed to load other plugins via e.g.
elektraPluginOpen
?Summary
elektraPluginFromMountpoint
to get thePlugin *
that was loaded bylibelektra-kdb
based on the mountpoint declaration. This could be extended to other plugins, i.e. all required plugins must be declared insystem:/elektra/mountpoints/<mp>/plugins
even those transitively needed.elektraPluginFromMountpoint
could not be used. e.g. when theKeySet * config
for the newly loaded plugin can only be known at runtime.Result
No result yet.
elektraPluginFromMountpoint
APIQuestion
Should
elektraPluginFromMountpoint
return aPlugin *
?Summary
libelektra-kdb
preloads thePlugin *
allows early error detection and takes some burden off of backend plugins.Plugin *
for another plugin is not ideal. It allows things like doingelektraPluginSetData (otherPlugin, NULL)
.PluginCallHandle *
, that only allows calling functions exported by the other plugin and nothing else.Result
No result yet.
elektraPluginFromMountpoint
InternalsQuestion
How should
elektraPluginFromMountpoint
access the plugins?Summary
global
KeySet.libelektra-kdb
setssystem:/elektra/kdb/backend/plugins
correctly, before it calls a backend plugin.libelektra/src/libs/elektra/kdb.c
Lines 1391 to 1394 in afeacc1
global
is not ideal, because it's contents should not be specific to the mountpoint.Result
No result yet.
Modifying
parentKey
value afterresolver
phaseQuestion
Should the
parentKey
value be changeable after theresolver
phase?Summary
doc/dev/kdb-operations.md
&doc/dev/backend-plugins.md
) that the value of theparentKey
can only be modified during theresolver
phase. This makes sense, because this is the phase when it should be decided what "storage unit" (e.g. file) shall be used.fcrypt
plugin wants to change the value (duringget
), even though it executes only duringprestorage
andpostorage
forget
and duringprecommit
forset
. The reason is:fcrypt
switches from the actual file, which is encrypted, to a temporary decrypted file.libelektra-kdb
currently does not lock theparentKey
value at all duringget
. This is marked with aTODO [new_backend]
andfcrypt workaround
.Result
No result yet.
The text was updated successfully, but these errors were encountered: