Skip to content

CPP: Support basic types + Add Dir Parameter #54

Merged
vinodreddy-g merged 10 commits intoeclipse-score:mainfrom
joshualicht:datatypes
Jul 30, 2025
Merged

CPP: Support basic types + Add Dir Parameter #54
vinodreddy-g merged 10 commits intoeclipse-score:mainfrom
joshualicht:datatypes

Conversation

@joshualicht
Copy link
Contributor

@joshualicht joshualicht commented Jul 25, 2025

This PR contains:

  • Support Basic Datatypes for CPP KvsValue (relating to Rust PR: Support basic types #46)
  • Remove process_name and replace with a DIR argument (to align with Rust)
  • Add InvalidArgument Errorcode (usecase example: directory is not a path)
  • Move Tests-Directory to src/cpp/tests/ (to align with Rust)

(Also add Copyright Header for workflows in bm_kvs.cpp)


To Do before merging:

  • Align on a common format being used for the json file. Refer this comment. Its currently implemented like in PR Support basic types #46, but IMHO it should be changed to the one presented in the comment.

--> ✅ Aligned with @vinodreddy-g (28.07.2025): Format from this comment will be used.


All Unittests were updated to the changes from this PR to stay with 100% Branches, 100% Functions and 100% Lines
(only the brackets in the kvsvalue_to_any switch case stay falsely reported as not hit)
Also the Any Stub is no longer needed for reaching the error case in any_to_kvsvalue, all stubs are removed and the dependency to the mock json parser/writer is used

Code Coverage Report: coverage.zip

Implement datatypes and add a DIR parameter to align with Rust (+Unittests)
cpp tests: move test-dir to src/cpp/tests/ and update bazel files
@github-actions
Copy link

github-actions bot commented Jul 25, 2025

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run //:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
INFO: Invocation ID: 1e46b83b-6d1a-46b7-9f41-c6c5686f9e69
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
DEBUG: Rule 'rules_boost~' indicated that a canonical reproducible form can be obtained by modifying arguments integrity = "sha256-aSViuHoOdF32Ue/Cx02/mOzyEebHMFuifjZs4GNWjsE="
DEBUG: Repository rules_boost~ instantiated at:
  <builtin>: in <toplevel>
Repository rule http_archive defined at:
  /home/runner/.bazel/external/bazel_tools/tools/build_defs/repo/http.bzl:387:31: in <toplevel>
Computing main repo mapping: 
Computing main repo mapping: 
WARNING: For repository 'googletest', the root module requires module version googletest@1.14.0, but got googletest@1.15.0 in the resolved dependency graph.
WARNING: For repository 'aspect_rules_lint', the root module requires module version aspect_rules_lint@1.0.3, but got aspect_rules_lint@1.4.2 in the resolved dependency graph.
Computing main repo mapping: 
Loading: 
Loading: 1 packages loaded
Analyzing: target //:license-check (2 packages loaded, 0 targets configured)
Analyzing: target //:license-check (2 packages loaded, 0 targets configured)

Analyzing: target //:license-check (55 packages loaded, 10 targets configured)

Analyzing: target //:license-check (106 packages loaded, 10 targets configured)

Analyzing: target //:license-check (156 packages loaded, 1548 targets configured)

Analyzing: target //:license-check (165 packages loaded, 2763 targets configured)

Analyzing: target //:license-check (165 packages loaded, 2810 targets configured)

Analyzing: target //:license-check (165 packages loaded, 2810 targets configured)

Analyzing: target //:license-check (169 packages loaded, 4940 targets configured)

Analyzing: target //:license-check (170 packages loaded, 5060 targets configured)

Analyzing: target //:license-check (170 packages loaded, 5060 targets configured)

INFO: Analyzed target //:license-check (171 packages loaded, 6979 targets configured).
[8 / 13] Creating runfiles tree bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/score_dash_license_checker~/tool/formatters/dash_format_converter.runfiles [for tool]; 0s local ... (2 actions, 1 running)
ERROR: /home/runner/work/inc_mw_per/inc_mw_per/BUILD:30:21: Generating Dash formatted dependency file ... failed: missing input file '//:cargo_lock'
ERROR: /home/runner/work/inc_mw_per/inc_mw_per/BUILD:30:21: Generating Dash formatted dependency file ... failed: 1 input file(s) do not exist
Target //:license.check.license_check failed to build
Use --verbose_failures to see the command lines of failed build steps.
ERROR: /home/runner/work/inc_mw_per/inc_mw_per/BUILD:30:21 Generating Dash formatted dependency file ... failed: 1 input file(s) do not exist
INFO: Elapsed time: 190.608s, Critical Path: 0.42s
INFO: 11 processes: 2 disk cache hit, 9 internal.
ERROR: Build did NOT complete successfully
ERROR: Build failed. Not running target

@github-actions
Copy link

The created documentation from the pull request is available at: docu-html

Add InvalidArgument errorcode, if dir argument is invalid
@joshualicht joshualicht requested a review from umaucher July 25, 2025 14:25
@joshualicht joshualicht marked this pull request as ready for review July 28, 2025 09:50
Update json datatype format + unittests + prepare json mock library usage
remove stubs and include the json lib mocking methods
remove capital letters in number datatypes enum
remove write_json_data buffer argument
score::filesystem::Path implemented and unittests updated to use score fs mock
@joshualicht joshualicht requested a review from umaucher July 29, 2025 14:30
@joshualicht joshualicht force-pushed the datatypes branch 2 times, most recently from d7a2658 to 42da45e Compare July 29, 2025 14:46
Update impl and tests BUILD Files and Workflow
remove InvalidArgument, since its no longer used
@vinodreddy-g vinodreddy-g merged commit 19b69dc into eclipse-score:main Jul 30, 2025
11 checks passed
atarekra pushed a commit to Valeo-S-CORE-Organization/persistency that referenced this pull request Nov 9, 2025
CPP: Support basic types + Add Dir Parameter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants