Skip to content

kvs: apply C++ naming rules and align C++ names with the Rust API - #564

Open
arkjedrz wants to merge 3 commits into
eclipse-score:mainfrom
qorix-group:arkjedrz_style-03-naming
Open

arkjedrz wants to merge 3 commits into
eclipse-score:mainfrom
qorix-group:arkjedrz_style-03-naming

Conversation

@arkjedrz

@arkjedrz arkjedrz commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Apply C++ naming rules:

  • 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.

Align with Rust API:

  • 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.

Merge #562 first

Relates to #556

@arkjedrz arkjedrz self-assigned this Oct 22, 2026
@arkjedrz
arkjedrz deployed to workflow-approval October 22, 2026 11:02 — with GitHub Actions Active
@arkjedrz
arkjedrz deployed to workflow-approval October 22, 2026 11:02 — 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: b4527416-0732-433e-9aaf-b282eb2859a2
Computing main repo mapping: 
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: 
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: 
Loading: 2 packages loaded
    currently loading: 
Loading: 2 packages loaded
    currently loading: 
Analyzing: target //:license-check (3 packages loaded)
Analyzing: target //:license-check (3 packages loaded, 0 targets configured)
Analyzing: target //:license-check (3 packages loaded, 0 targets configured)

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

Analyzing: target //:license-check (97 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 (149 packages loaded, 2298 targets configured)

Analyzing: target //:license-check (200 packages loaded, 5696 targets configured)

Analyzing: target //:license-check (202 packages loaded, 11364 targets configured)

Analyzing: target //:license-check (205 packages loaded, 11659 targets configured)

Analyzing: target //:license-check (205 packages loaded, 11659 targets configured)

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

INFO: Analyzed target //:license-check (213 packages loaded, 17903 targets configured).
[6 / 15] [Prepa] JavaToolchainCompileClasses external/rules_java+/toolchains/platformclasspath_classes ... (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
[13 / 16] JavaToolchainCompileClasses external/rules_java+/toolchains/platformclasspath_classes; 1s disk-cache, processwrapper-sandbox
[14 / 16] JavaToolchainCompileBootClasspath external/rules_java+/toolchains/platformclasspath.jar; 0s disk-cache, processwrapper-sandbox
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: 36.372s, Critical Path: 2.81s
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-564: https://eclipse-score.github.io/persistency/pr-564/

@arkjedrz
arkjedrz force-pushed the arkjedrz_style-03-naming branch from eedd577 to 193ce2a 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-03-naming branch from 193ce2a to c7111a3 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this file aldready exist on master , it seems repeated.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Please select a valid commit range for #566 and #571.
#564 (this one) is now rebased on upstream/main.
I intended to stack those PRs, but it's not possible when a PR originates from a fork.

Comment thread score/kvs/kvs_value.h

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

file already exist also , please rebase

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

please rebase, because this file also exist.

Comment thread score/kvs/error.h Outdated
// Each one is an alias of its k-prefixed replacement and is removed in a future release.
UnmappedError [[deprecated("Use kUnmappedError instead. The snake_case API is removed in a future release.")]] =
kUnmappedError,
FileNotFound [[deprecated("Use kFileNotFound instead. The snake_case API is removed in a future release.")]] =

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this is not snake please mention nutral wording message , like old name removed to align with rust

Comment thread score/kvs/kvs.h Outdated
constexpr std::size_t kDefaultMaxSnapshots = 3U;

/// @deprecated Use `kDefaultMaxSnapshots` instead.
[[deprecated("Use kDefaultMaxSnapshots instead. The snake_case API is removed in a future release.")]]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this deprecation message is missleading .

pelase revisit all deprecations messages.

arkjedrz and others added 3 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>
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>

This branch is waiting to be deployed

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

2 participants