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

Change set_field() behaviour to not create intermediate structures. #309

Open
blackwinter opened this issue Jun 6, 2023 · 1 comment
Open
Assignees
Labels

Comments

@blackwinter
Copy link
Member

blackwinter commented Jun 6, 2023

add_field() and set_field() are going to be equivalent with #308, but according to Catmandu's documentation set_field() "will not create the intermediate structures if they are missing".

Functional review: @TobiasNx
Code review: @blackwinter / @fsteeg

@TobiasNx
Copy link
Collaborator

TobiasNx commented Oct 2, 2024

The aspect of the intermediate structure seems to be true for all fixes of the set_-family so not just for set_field but also for set_array and set_hash. I think that the adjustment for all these fixes makes sense since we want to adjust to the behaviour of Catmandu BUT on the side of lobid and oersi we rely on a fixes that create empty hashes and empty arrays WITH the intermediate structure. So If we move on with this, we should also introduce two new fix functions add_array and add_hash as counterpart to set_hash and set_array.

PS: The new functions add_hash and add_array could reuse the current implementation of set_array and set_hash while the version without creating intermediate structure would replace the the current one.

TobiasNx added a commit that referenced this issue Oct 16, 2024
The are a copy of the current implementation of set_array and set_hash. This is a preparation for #309
TobiasNx added a commit that referenced this issue Oct 16, 2024
As a preliminary work for #309 since set_array will change its behaviour but add_array will keep the functionality.
TobiasNx added a commit that referenced this issue Oct 16, 2024
As a preliminary work for #309 since set_array will change its behaviour but add_array will keep the functionality.
TobiasNx added a commit that referenced this issue Oct 16, 2024
…374

Additional preliminary work for #309 when the set-fixes change their functionality.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Backlog
Development

No branches or pull requests

3 participants