libelektra
libelektra copied to clipboard
ni: metadata: namespace
Is it on purpose that ni files now contain meta: in front of every metakey?
E.g.
kdb meta-set /sw/app/current/#0/server/port type short
cat `kdb file spec:/sw/app/current/#0`
now yields:
server/port =
[server/port]
meta:/type = short
In earlier versions of Elektra it was simply type = short.
Btw. in the slides I use := to make more clear that it is metadata, maybe we should also adapt the ni plugin to do so?
The ni uses a 3rd party ini library. I'm not sure how easy it would be to change the key value separator from = to :=.
Regarding the meta:/ prefix. We could easily strip it since it everything already works fine, if you write the file manually without the prefix. In future this may require adding the prefix back when reading files. For 1.0 the keyGetMeta function should only accept valid meta key names including the namespace to avoid some edge cases in the current implementation.
For ni we should also define, one way of doing it. Either with or without the namespace.
I'm not sure how easy it would be to change the key value separator from = to :=.
The state machine in nickel-1.1.0/src/io.c looks okish but fixing the escaping mechanism and all the tests is probably quite some effort. So better we leave it as is.
For ni we should also define, one way of doing it. Either with or without the namespace.
I fully agree. I would prefer it without a namespace, for ni and also UIs like #3696. It is enough to write the namespace when both namespaces could be meant.
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:
@markus I think this could be a good FLOSS issue. Stripping the meta:/ prefix when writing and adding it when reading should be pretty simple.
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: