Libelektra: Toml/tablearray problem

Created on 2 Sep 2020  ·  3Comments  ·  Source: ElektraInitiative/libelektra

I played a bit around with the new Toml plugin and I am looking forward to get it merged soon. I noticed a problem but I think it can also be fixed later:

Steps to Reproduce the Problem

key = 1

[[tablearray]]
a = 1
b = 2

and then changing the key:

kdb set 'user/tests/storage/key' '2'

Expected Result

key = 2

[[tablearray]]
a = 1
b = 2

Actual Result

a = 1
b = 2
key = 2
[[tablearray]]

System Information

  • Elektra Version: #3292

Most helpful comment

Thanks for pointing out the error! I think i solved the issue.
The problem was caused by the comment in front of the table array declaration (the empty line). It caused the emission of the element root key (tablearray/#0) to the keyset, which was not appropriately handled before.

All 3 comments

Thanks for pointing out the error! I think i solved the issue.
The problem was caused by the comment in front of the table array declaration (the empty line). It caused the emission of the element root key (tablearray/#0) to the keyset, which was not appropriately handled before.

Thank you for fixing! Can you also add a test case for that?

Yes, I will write a test case for it

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mpranj picture mpranj  ·  3Comments

markus2330 picture markus2330  ·  3Comments

mpranj picture mpranj  ·  3Comments

mpranj picture mpranj  ·  3Comments

sanssecours picture sanssecours  ·  3Comments