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

Set parent pointers for values inserted via update() (fixes #3007). #3008

Merged
merged 8 commits into from
Sep 12, 2021

Conversation

AnthonyVH
Copy link
Contributor

@AnthonyVH AnthonyVH commented Sep 9, 2021

Fixes parent pointers not being set when using update() (#3007).

I've added a test which successfully failed before my changes and passed afterwards.

Pull request checklist

  • Changes are described in the pull request, or an existing issue is referenced.
  • The test suite compiles and runs without error.
  • Code coverage is 100%. Test cases can be added by editing the test suite.
  • The source code is amalgamated; that is, after making changes to the sources in the include/nlohmann directory, run make amalgamate to create the single-header file single_include/nlohmann/json.hpp. The whole process is described here.

@AnthonyVH
Copy link
Contributor Author

AnthonyVH commented Sep 9, 2021

Ah, my new test won't compile/work unless JSON_DIAGNOSTICS is enabled. Hence the regression failures. What should I do to fix this? Simply surround the code in question with #if JSON_DIAGNOSTICS? Does the regression suite compile the tests both with and without diagnostics enabled?

Edit: Never mind, figured it out. Also moved my test to the proper location.

@coveralls
Copy link

coveralls commented Sep 9, 2021

Coverage Status

Coverage remained the same at 100.0% when pulling 8a14bad on AnthonyVH:update_parent_pointers into bbdb29c on nlohmann:develop.

test/src/unit-diagnostics.cpp Outdated Show resolved Hide resolved
Copy link
Owner

@nlohmann nlohmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@nlohmann nlohmann self-assigned this Sep 12, 2021
@nlohmann nlohmann added this to the Release 3.10.3 milestone Sep 12, 2021
@nlohmann nlohmann linked an issue Sep 12, 2021 that may be closed by this pull request
3 tasks
@nlohmann
Copy link
Owner

Thanks a lot! I will merge this once AppVeyor completes.

@AnthonyVH
Copy link
Contributor Author

Great! Thanks for the quick merge!

@nlohmann nlohmann merged commit 58b83b7 into nlohmann:develop Sep 12, 2021
@AnthonyVH AnthonyVH deleted the update_parent_pointers branch September 13, 2021 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parent pointer not properly set when using update()
3 participants