Skip to content

kvs: fix small C++ issues - #571

Open
arkjedrz wants to merge 5 commits into
eclipse-score:mainfrom
qorix-group:arkjedrz_style-05-fixes
Open

arkjedrz wants to merge 5 commits into
eclipse-score:mainfrom
qorix-group:arkjedrz_style-05-fixes

Conversation

@arkjedrz

@arkjedrz arkjedrz commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor
  • Replace false == x and Yoda comparisons in kvs.cpp.
  • Drop stray this-> in the KvsBuilder setters.
  • Stop copy-assigning KvsBuilder to itself in the test scenarios.
  • Replace the C-style cast in BrokenKvsValue with a plain assignment.
  • Replace the C++20 designated initializer in KvsParameters.
  • Move using namespace out of kvs_general_test.h.
  • Drop redundant static in anonymous namespaces.
  • Remove a debug directory listing from kvs_test.cpp.
  • Rename shadowing locals in kvs_test.cpp and multiple_kvs.cpp.

Merge #566 first.

Closes #556

@arkjedrz arkjedrz self-assigned this Oct 22, 2026
@arkjedrz
arkjedrz deployed to workflow-approval October 22, 2026 13:27 — with GitHub Actions Active
@arkjedrz
arkjedrz deployed to workflow-approval October 22, 2026 13:27 — with GitHub Actions Active
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run --lockfile_mode=error //:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Starting local Bazel server (8.7.0) and connecting to it...
INFO: Invocation ID: 990ce256-d52a-4b43-88e3-a13c0cbe0ccd
Computing main repo mapping: 
Computing main repo mapping: 
WARNING: For repository 'score_docs_as_code', the root module requires module version score_docs_as_code@8.5.1, but got score_docs_as_code@8.6.0 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
Computing main repo mapping: 
Computing main repo mapping: 
Loading: 
Loading: 2 packages loaded
Loading: 2 packages loaded
    currently loading: 
Loading: 2 packages loaded
    currently loading: 
Loading: 2 packages loaded
    currently loading: 
Loading: 2 packages loaded
    currently loading: 
Analyzing: target //:license-check (3 packages loaded, 0 targets configured)
Analyzing: target //:license-check (3 packages loaded, 0 targets configured)

Analyzing: target //:license-check (67 packages loaded, 14 targets configured)

Analyzing: target //:license-check (99 packages loaded, 14 targets configured)

Analyzing: target //:license-check (100 packages loaded, 14 targets configured)

Analyzing: target //:license-check (100 packages loaded, 14 targets configured)

Analyzing: target //:license-check (188 packages loaded, 3894 targets configured)

Analyzing: target //:license-check (207 packages loaded, 11661 targets configured)

Analyzing: target //:license-check (207 packages loaded, 11661 targets configured)

Analyzing: target //:license-check (208 packages loaded, 11785 targets configured)

INFO: Analyzed target //:license-check (213 packages loaded, 17903 targets configured).
[10 / 16] Creating runfiles tree bazel-out/k8-opt-exec-ST-db392155ee03/bin/external/score_tooling+/dash/tool/formatters/dash_format_converter.runfiles [for tool]; 0s local ... (2 actions, 1 running)
INFO: From Generating Dash formatted dependency file ...:
INFO: Successfully converted 50 packages from Cargo.lock to bazel-out/k8-fastbuild/bin/tools/formatted.txt
[15 / 16] [Prepa] Building tools/license.check.license_check.jar ()
INFO: Found 1 target...
Target //tools:license.check.license_check up-to-date:
  bazel-bin/tools/license.check.license_check
  bazel-bin/tools/license.check.license_check.jar
INFO: Elapsed time: 52.651s, Critical Path: 2.01s
INFO: 16 processes: 12 internal, 3 processwrapper-sandbox, 1 worker.
INFO: Build completed successfully, 16 total actions
INFO: Running command line: bazel-bin/tools/license.check.license_check tools/formatted.txt <args omitted>
[main] INFO Querying Eclipse Foundation for license data for 42 items.
[main] INFO Found 32 items.
[main] INFO Querying ClearlyDefined for license data for 10 items.
[main] INFO Found 10 items.
[main] INFO License information could not be automatically verified for the following content:
[main] INFO 
[main] INFO crate/cratesio/-/lazy_static/1.5.1
[main] INFO 
[main] INFO This content is either not correctly mapped by the system, or requires review.

@github-actions

Copy link
Copy Markdown
Contributor

Documentation preview for this pull request is available at:
pr-571: https://eclipse-score.github.io/persistency/pr-571/

@arkjedrz
arkjedrz force-pushed the arkjedrz_style-05-fixes branch from 5a69b3b to 8323335 Compare October 23, 2026 06:58
@arkjedrz
arkjedrz deployed to workflow-approval October 23, 2026 06:58 — with GitHub Actions Active
@arkjedrz
arkjedrz deployed to workflow-approval October 23, 2026 06:58 — with GitHub Actions Active
@arkjedrz
arkjedrz force-pushed the arkjedrz_style-05-fixes branch from 8323335 to 5b8037a Compare October 27, 2026 11:27
@arkjedrz
arkjedrz deployed to workflow-approval October 27, 2026 11:27 — with GitHub Actions Active
@arkjedrz
arkjedrz deployed to workflow-approval October 27, 2026 11:27 — with GitHub Actions Active
arkjedrz and others added 2 commits October 28, 2026 07:29
- Rename public Kvs, KvsBuilder and KvsValue methods to PascalCase.
  Keep the snake_case names as [[deprecated]] wrappers.
- Rename public constants to k-prefixed names and keep the old ones
  as [[deprecated]] constants.
- Prefix the enumerators of OpenNeedDefaults, OpenNeedKvs,
  OpenJsonNeedFile, KvsValue::Type and ErrorCode with k. Keep the old
  enumerators as [[deprecated]] aliases with the same values.
- Rename private methods, internal helpers and file-local constants.
- Rename unit-test and test-scenario helpers, constants and
  camelCase locals.
- Add kvs_deprecated_api tests for the deprecated names.
- Update examples/README.md to the new API.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Rename OpenNeedDefaults and OpenNeedKvs to KvsDefaults and KvsLoad.
  Keep the old names as [[deprecated]] type aliases.
- Rename KvsBuilder::NeedDefaultsFlag, NeedKvsFlag and Dir to
  Defaults, KvsLoad and WorkingDir.
- Rename Kvs::GetKvsFilename and GetHashFilename to KvsFilePath and
  HashFilePath.
- Forward the deprecated snake_case wrappers to the new names.
- Rename the C++ test-scenario helpers that have a Rust counterpart.
- Rust: rename KVS_MAX_KEY_LENGTH_BYTES to MAX_KEY_LENGTH_BYTES and
  keep the old name as a #[deprecated] constant.
- Update the compat test, docs and examples/README.md.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
arkjedrz and others added 3 commits October 28, 2026 08:17
The deprecated names cover methods, constants, enumerators and type
aliases, and only the methods were snake_case.
Replace "The snake_case API is removed in a future release." with
"This name is removed in a future release." in every message.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Brace-initialize declarations. Count/value constructors and
  initializer_list types keep parentheses.
- Declare one variable per declaration.
- Order class sections and members as the style guide requires.
  Move the KvsValue::ValueVariant alias next to Array and Object.
- Initialize InstanceId, SnapshotId and KvsValue members in the
  initializer list.
- Define members in .cpp files in declaration order and group
  file-local helpers at the top.
- Name repeated file suffixes and the hash size.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Replace false == x and Yoda comparisons in kvs.cpp.
- Drop stray this-> in the KvsBuilder setters.
- Stop copy-assigning KvsBuilder to itself in the test scenarios.
- Replace the C++20 designated initializer in KvsParameters.
- Move using namespace out of kvs_general_test.h.
- Drop redundant static in anonymous namespaces.
- Remove a debug directory listing from kvs_test.cpp.
- Rename shadowing locals in kvs_test.cpp and multiple_kvs.cpp.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@arkjedrz
arkjedrz force-pushed the arkjedrz_style-05-fixes branch from 5b8037a to c2fda3a Compare October 28, 2026 07:28

This branch is waiting to be deployed

1 waiting deployment
workflow-approval — c2fda3a7 Waiting Oct 28, 2026 by arkjedrz via qnx-build (score-qnx-aarch64) / approval #1510
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.

Adapt C++ impl to baselibs style guide

1 participant