-
Notifications
You must be signed in to change notification settings - Fork 29
issue: 4634244 migrate json-c from 0.13 to 0.17 #443
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
base: vNext
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR migrates the json-c library from version 0.13.1 to 0.17.0, incorporating numerous bug fixes and improvements from the newer version. The main challenge addressed is converting the Meson build system in json-c 0.17.0 to Autotools to maintain compatibility with the existing libxlio project infrastructure.
Key changes include:
- Converting Meson build system to Autotools with comprehensive configure.ac and Makefile.am
- Adding doca_third_party_ prefix to all exported functions to avoid symbol conflicts
- Creating backward compatibility layer through json_compat.h
Reviewed Changes
Copilot reviewed 82 out of 171 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| json_types.h | Newly added core type definitions for json-c 0.17 |
| json_tokener.h/.c | Updated tokenizer with enhanced UTF-8 validation and improved error handling |
| json_object.h/.c | Major overhaul with support for uint64 types and improved memory management |
| json_pointer.h/.c | Enhanced JSON pointer functionality with better error handling |
| json_patch.h/.c | Newly added JSON patch implementation (RFC 6902) |
| json_object_iterator.h/.c | Updated iterator interface with doca_third_party_ prefixes |
| json_config.h | Expanded configuration with comprehensive feature detection |
| json_c_version.h/.c | Version information updated to 0.17.0 with prefix updates |
| json.h | Main header reorganized with conflict detection and compatibility layer |
| Build files | pkg-config and symbol export files for proper library integration |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| /* clang-format on */ | ||
|
|
||
| /** | ||
| * validete the utf-8 string in strict model. |
Copilot
AI
Sep 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in comment: 'validete' should be 'validate' and 'model' should be 'mode'.
| * validete the utf-8 string in strict model. | |
| * validate the utf-8 string in strict mode. |
| return doca_third_party_json_object_object_add(parent, path, value); | ||
|
|
||
| /* Getting here means that we tried to "dereference" a primitive JSON type | ||
| * (like string, int, bool).i.e. add a sub-object to it |
Copilot
AI
Sep 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space in comment: 'bool).i.e.' should be 'bool). i.e.' with proper spacing around the abbreviation.
| * (like string, int, bool).i.e. add a sub-object to it | |
| * (like string, int, bool). i.e. add a sub-object to it |
|
bot:retest |
3166e66 to
18e0170
Compare
|
bot:retest |
|
Hi @NirWolfer, again the CI is stuck and we have many PRs like that. CC: @DanielLibenson , @dpressle |
63aab7a to
9816197
Compare
|
@AlexanderGrissik , can you review? |
9816197 to
5a08c29
Compare
|
Skipped: This PR changes more files than the configured file change limit: ( |
Migrate the json-c library from version 0.13.1 to 0.17.0 to gain access to newer features and bug fixes. The new version uses Meson build system which is incompatible with the existing Autotools-based libxlio project. To maintain compatibility, convert the Meson build system to Autotools: * Create configure.ac with comprehensive feature detection for threads, atomic operations, and system headers * Add Makefile.am with proper source file management and libtool support * Generate pkg-config files (json-c.pc, json-c-uninstalled.pc) for proper library linking * Add json_compat.h for backward compatibility with renamed functions The new json-c 0.17.0 uses doca_third_party_ prefix for all exported functions to avoid symbol conflicts. Update all callers: * src/core/config/descriptor_providers/json_descriptor_provider.cpp * src/core/config/descriptor_providers/schema_analyzer.cpp * src/core/config/json_object_handle.cpp * src/core/config/json_utils.cpp * src/core/config/loaders/json_loader.cpp * tests/unit_tests/config/schema_analyzer.cpp Configuration changes: * Update configure.ac to build json-c subdirectory * Modify config/m4/json.m4 to point to new library paths * Update third_party/Makefile.am with proper subdirectory handling All 94 unit tests pass. Main project builds successfully with full backward compatibility maintained. Signed-off-by: Tomer Cabouly <[email protected]>
5a08c29 to
88dd316
Compare
Description
Migrate the json-c library from version 0.13.1 to 0.17.0 to gain access to newer features and bug fixes. The new version uses Meson build system which is incompatible with the existing Autotools-based libxlio project.
To maintain compatibility, convert the Meson build system to Autotools:
The new json-c 0.17.0 uses doca_third_party_ prefix for all exported functions to avoid symbol conflicts. Update all callers:
Configuration changes:
All 94 unit tests pass. Main project builds successfully with full backward compatibility maintained.
What
json-c: migrate from 0.13.1 to 0.17.0 with Autotools build system
Why ?
Fixes 4634244. fixes many bugs in the parser.
How ?
It is optional but for complex PRs please provide information about the design,
architecture, approach, etc.
Change type
What kind of change does this PR introduce?
Check list