Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toml/tablearray problem #3474

Closed
markus2330 opened this issue Sep 2, 2020 · 3 comments
Closed

Toml/tablearray problem #3474

markus2330 opened this issue Sep 2, 2020 · 3 comments
Assignees
Milestone

Comments

@markus2330
Copy link
Contributor

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

@bauhaus93
Copy link
Contributor

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.

@mpranj mpranj closed this as completed in ee9b9cd Sep 3, 2020
@markus2330
Copy link
Contributor Author

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

@markus2330 markus2330 reopened this Sep 3, 2020
@bauhaus93
Copy link
Contributor

Yes, I will write a test case for it

bauhaus93 added a commit to bauhaus93/libelektra that referenced this issue Sep 3, 2020
Added testcase for checking if the element root key of a table array is
handled properly, when present in a write keyset (see ElektraInitiative#3474).
bauhaus93 added a commit to bauhaus93/libelektra that referenced this issue Sep 3, 2020
Added testcase for checking if the element root key of a table array is
handled properly, when present in a write keyset (see ElektraInitiative#3474).
bauhaus93 added a commit to bauhaus93/libelektra that referenced this issue Sep 11, 2020
Added testcase for checking if the element root key of a table array is
handled properly, when present in a write keyset (see ElektraInitiative#3474).
@mpranj mpranj added this to the 0.9.3 milestone Oct 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants