chore(deps): update json to v3.12.0#16198
Conversation
|
/gcbrun |
There was a problem hiding this comment.
Code Review
This pull request updates the nlohmann_json dependency version from 3.11.3 (and 3.12.0.bcr.1 in Bazel) to 3.12.0 across Bazel configuration files, Dockerfiles, and documentation. The reviewer feedback suggests defining the duplicated version string using a Docker ARG instruction in the Dockerfiles to improve maintainability.
| # ```bash | ||
| WORKDIR /var/tmp/build/json | ||
| RUN curl -fsSL https://github.com/nlohmann/json/archive/v3.11.3.tar.gz | \ | ||
| RUN curl -fsSL https://github.com/nlohmann/json/archive/v3.12.0.tar.gz | \ |
There was a problem hiding this comment.
To improve maintainability and adhere to the repository's best practices, use an ARG instruction to define version strings that are duplicated across multiple Dockerfiles.
ARG JSON_VERSION=3.12.0
RUN curl -fsSL https://github.com/nlohmann/json/archive/v${JSON_VERSION}.tar.gz | \\
References
- In Dockerfiles, use ARG to define version strings that are duplicated across multiple files to improve maintainability.
| # ```bash | ||
| WORKDIR /var/tmp/build/json | ||
| RUN curl -fsSL https://github.com/nlohmann/json/archive/v3.11.3.tar.gz | \ | ||
| RUN curl -fsSL https://github.com/nlohmann/json/archive/v3.12.0.tar.gz | \ |
There was a problem hiding this comment.
To improve maintainability and adhere to the repository's best practices, use an ARG instruction to define version strings that are duplicated across multiple Dockerfiles.
ARG JSON_VERSION=3.12.0
RUN curl -fsSL https://github.com/nlohmann/json/archive/v${JSON_VERSION}.tar.gz | \\
References
- In Dockerfiles, use ARG to define version strings that are duplicated across multiple files to improve maintainability.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #16198 +/- ##
==========================================
- Coverage 92.24% 92.24% -0.01%
==========================================
Files 2265 2265
Lines 210211 210211
==========================================
- Hits 193910 193902 -8
- Misses 16301 16309 +8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
56ec302 to
971bde9
Compare
|
/gcbrun |
This PR contains the following updates:
v3.11.3→v3.12.03.12.0.bcr.1→3.12.0v3.11.3→v3.12.0Release Notes
nlohmann/json (nlohmann/json)
v3.12.0: JSON for Modern C++ version 3.12.0Compare Source
Release date: 2025-04-11
SHA-256: aaf127c04cb31c406e5b04a63f1ae89369fccde6d8fa7cdda1ed4f32dfc5de63 (json.hpp), b8cb0ef2dd7f57f18933997c9934bb1fa962594f701cd5a8d3c2c80541559372 (include.zip), 42f6e95cad6ec532fd372391373363b62a14af6d771056dbfc86160e6dfff7aa (json.tar.xz)
Summary
This release fixes some bugs found in the 3.11.3 release and adds some new features.
All changes are backward-compatible.
💰 Note you can support this project via GitHub sponsors or PayPal.
Key updates and enhancements
JSON_DIAGNOSTIC_POSITIONS, introduces member functions to query the byte positions of values in the input they were parsed from. When enabled, this information is also included in exceptions to help pinpoint errors. #4517 #4455 #4570 #4569 #4572 #4571 #4579 #4585 #4561json,ordered_json, and any otherbasic_jsonspecialization. #4597 #2528 #4377 #2532 #2843 #3810 #4608NLOHMANN_DEFINE_DERIVED_TYPE_*macros. #4033 #2199 #4562std::optional: The library now supports conversions from/tostd::optionaltypes when compiled with C++17. #1749 #4036patch,diff, andflattennow work with arbitrary string types. #4536 #4134 #4613 #4019get_numberfunction used in the binary format implementations has been optimized to read multiple bytes at once. #4391std::filesystem::pathare now encoded to UTF-8 strings by default on all operating systems. #4271 #4631Changes and fixes
iteration_proxyis now astd::forward_iteratorinstead of just anstd::input_iterator. This allows more use cases whenitems()is fed into C++20std::views. The iterator always satisfied all requirements for a forward iterator, but was exposed as only an input iterator by the used iterator tag. #4371 #4372m_dataadded. #4343 #4309basic_json. #4451 #4438 #4438nullptrtoparsefunction expectingFILE*. Instead, now an exception is thrown. #4485 #4487EINTRset inerrno. #4506number_floatto be locale-independent. #4505 #4084get_ptrfor unsigned integers. #4525 #4475EOFwithchar_traits. #4532NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULTthrow an exception with an empty json #4507 #4508[]instead ofnull. #4594 #4530Warnings
The quality assurance page gives an overview of the warning flags used during the tests.
Compiler warnings
weak-vtableswarning for exceptions. #4500 #4087Clang-Tidy
modernize-use-std-numbers,readability-redundant-member-init, andbugprone-unused-local-non-trivial-variable. #4276modernize-type-traitsandmodernize-avoid-c-arraysinNLOHMANN_JSON_SERIALIZE_ENUM. #4497 #3924boost-use-rangesas we do not want to rely on Boost. #4489modernize-use-designated-initializersas designated initializers are a C++20 feature. #4489modernize-use-rangesas ranges are a C++20 feature. #4489clang-analyzer-webkit.NoUncountedMemberCheckeras we are using pointers internally. #4701modernize-use-integer-sign-comparison. #4558Build
CMake
NLOHMANN_JSON_TARGET_NAME. #4483Package Managers
alwayslink=TrueBazel flag. #4396Package.swiftdefinition file. #4611CI
Tests
JSON_DisableEnumSerialization=ON. #4504 #4384Infrastructure
macos-11image; the following Xcode versions are no longer tested in the CI: '11.7', '12.4', '12.5.1', '13.0'. #4489macos-13image to test Xcode versions '14.2', '14.3', '14.3.1', '15.0.1', '15.1', '15.2'. #4489macos-14image to test Xcode versions '15.3', '15.4'. #4489macos-15image to test Xcode versions '16.0', '16.1'. #4489json-ciimage as these versions are no longer work on the respectivegccimages (checkout fails). #4489ubuntu-latestimage to run Valgrind. #4575requirements.txtfiles for cppcheck, cpplint, and reuse to central location. #4553.lgtm.ymlfile. #4560ubuntu-latestmore often and reduce dependencies to more exotic containers. #4560.pre-commit-config.ymlfile. #4560tests/thirdparty/imapdl/filterbr.py. #4560Indentation and amalgamation
Documentation
The documentation website contains all project documentation.
Fixed documentation
ci_test_api_documentationCI step. #4516Added documentation
FILES.md. #4560start_posandend_pos. #4560valuefunction. #4628 #4626JSON_DIAGNOSTIC_POSITIONSto macro feature page. #4636Improved documentation
parseandacceptwith respect to #4485 #4487 #4516Package Manager documentation
Documentation implementation
Configuration
📅 Schedule: (UTC)
* * * * 1-5)🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.