-
Notifications
You must be signed in to change notification settings - Fork 123
Fix handling of array parents in spec
plugin
#4061
Comments
This effectively means that the spec changes when an initially empty array is later non-empty. The token will then not match anymore. |
Interestingly, making the array empty again via Therefore:
is not idempotent. |
kodebach wrote:
You're on the right track here, but
I assume this is related to the long standing bug that |
@kodebach Thanks for your helpful input! @markus2330 I tried to fix this all day, but I can't come up with a working solution.
What do you think? |
Yes, better do some final touches on the HL API and the other issues you already work on. spec needs a reimplementation, the problem you found is unlikely to be the only one. Thank you for the long bug description, let us leave this issue open for insights of how to redesign the spec 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. |
@atmaxinger maybe you can have a quick look at this (don't waste too much time) in #4495 |
@tmakar please write a test case to verify that this problem is gone. |
@markus2330 PR exists in #4918 |
The
spec
plugin changes which keys of an array it gets/sets, when a previously empty array becomes non-empty.Expected behavior
cd
into.../libelektra/examples/codegen/econf/
kdb mount `pwd`/spec.ini "spec:/sw/example/econf/#0/current" ni
kdb spec-mount "/sw/example/econf/#0/current"
kdb ls "spec:/sw/example/econf/#0"
yields:kdb meta-set "user:/sw/example/econf/#0/current/format" array "#2"
kdb ls "spec:/sw/example/econf/#0"
yields:Actual behavior:
Steps 1. to 5. like expected
6. Yields
In the actual behavior,
spec:/sw/example/econf/#0/current/format/#
is missing!Fix ideas
1 == 1
, thespec:/sw/example/econf/#0/current/format/#
is not missing anymore.libelektra/src/plugins/spec/spec.c
Lines 1021 to 1024 in 90fb5be
spec
will also add each array child to the spec namespace:The text was updated successfully, but these errors were encountered: