Skip to content

fix(concurrency): replace score::cpp::expected with score::Result - #577

Open
shegazyy wants to merge 2 commits into
eclipse-score:mainfrom
Valeo-S-CORE-Organization:fix/use-score-result-in-concurrency-338
Open

fix(concurrency): replace score::cpp::expected with score::Result#577
shegazyy wants to merge 2 commits into
eclipse-score:mainfrom
Valeo-S-CORE-Organization:fix/use-score-result-in-concurrency-338

Conversation

@shegazyy

@shegazyy shegazyy commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Migrate launch_manager concurrency types to score::Result / score::ResultBlank as tracked in issue #338.

Changes:

  • concurrency_error_domain.hpp: change ConcurrencyErrc underlying type from std::uint8_t to score::result::ErrorCode; add ConcurrencyErrorDomain class, kConcurrencyErrorDomain singleton, and ADL MakeError() function; add ostream operator<< and optional log stream operator<<
  • mpmc_concurrent_queue.hpp: replace all score::cpp::expected_blank
    with score::ResultBlank; replace score::cpp::expected<T, ConcurrencyErrc> with score::Result; replace score::cpp::make_unexpected() with score::MakeUnexpected()
  • mpsc_bounded_queue.hpp: same score::ResultBlank / score::MakeUnexpected substitutions as mpmc; remove now-unused #include <score/expected.hpp>
  • BUILD: add @score_baselibs//score/result dep to mpmc_concurrent_queue and mpsc_bounded_queue targets

Callers (thread_pool.hpp, graph.cpp, component_event_queue.hpp) use .error() == ConcurrencyErrc::kX comparisons which still work because score::result::Error has an implicit constructor from any registered error enum via ADL MakeError().

@github-actions

github-actions Bot commented Sep 1, 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]
Extracting Bazel installation...
Starting local Bazel server (8.7.0) and connecting to it...
INFO: Invocation ID: dd98978a-e1da-40fc-a256-e3651ded18c9
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Loading: 
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)

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

Analyzing: target //:license-check (128 packages loaded, 124 targets configured)

Analyzing: target //:license-check (150 packages loaded, 3149 targets configured)

Analyzing: target //:license-check (157 packages loaded, 7775 targets configured)

Analyzing: target //:license-check (167 packages loaded, 9394 targets configured)

Analyzing: target //:license-check (168 packages loaded, 9417 targets configured)

Analyzing: target //:license-check (168 packages loaded, 9417 targets configured)

Analyzing: target //:license-check (171 packages loaded, 11410 targets configured)

INFO: Analyzed target //:license-check (173 packages loaded, 11555 targets configured).
INFO: Found 1 target...
Target //:license.check.license_check up-to-date:
  bazel-bin/license.check.license_check
  bazel-bin/license.check.license_check.jar
INFO: Elapsed time: 23.759s, Critical Path: 0.32s
INFO: 16 processes: 4 disk cache hit, 12 internal.
INFO: Build completed successfully, 16 total actions
INFO: Running command line: bazel-bin/license.check.license_check ./formatted.txt <args omitted>
usage: org.eclipse.dash.licenses.cli.Main [-batch <int>] [-cd <url>]
       [-confidence <int>] [-ef <url>] [-excludeSources <sources>] [-help] [-lic
       <url>] [-project <shortname>] [-repo <url>] [-review] [-summary <file>]
       [-timeout <seconds>] [-token <token>]

@danth danth left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

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

shegazyy added a commit to Valeo-S-CORE-Organization/lifecycle that referenced this pull request Sep 7, 2026
…ResultBlank

score::ResultBlank is deprecated in score_baselibs in favor of the equivalent
score::Result<void>. Replace all usages across the concurrency queue headers
and their unit test.

Addresses review comment from @danth on PR eclipse-score#577.
@shegazyy
shegazyy force-pushed the fix/use-score-result-in-concurrency-338 branch from c71ea6b to 9b81490 Compare September 7, 2026 11:25
shegazyy and others added 2 commits September 7, 2026 14:36
…lipse-score#338)

Migrate launch_manager concurrency types to score::Result / score::ResultBlank
as tracked in issue eclipse-score#338.

Changes:
- concurrency_error_domain.hpp: change ConcurrencyErrc underlying type from
  std::uint8_t to score::result::ErrorCode; add ConcurrencyErrorDomain class,
  kConcurrencyErrorDomain singleton, and ADL MakeError() function; add
  ostream operator<< and optional log stream operator<<
- mpmc_concurrent_queue.hpp: replace all score::cpp::expected_blank<ConcurrencyErrc>
  with score::ResultBlank; replace score::cpp::expected<T, ConcurrencyErrc> with
  score::Result<T>; replace score::cpp::make_unexpected() with score::MakeUnexpected()
- mpsc_bounded_queue.hpp: same score::ResultBlank / score::MakeUnexpected
  substitutions as mpmc; remove now-unused #include <score/expected.hpp>
- BUILD: add @score_baselibs//score/result dep to mpmc_concurrent_queue and
  mpsc_bounded_queue targets

Callers (thread_pool.hpp, graph.cpp, component_event_queue.hpp) use
.error() == ConcurrencyErrc::kX comparisons which still work because
score::result::Error has an implicit constructor from any registered error
enum via ADL MakeError().

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
score::ResultBlank is deprecated in score_baselibs in favor of the equivalent
score::Result<void>. Replace all usages across the concurrency queue headers
and their unit test.

Addresses review comment from @danth on PR eclipse-score#577.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@shegazyy
shegazyy force-pushed the fix/use-score-result-in-concurrency-338 branch from 9b81490 to 9769cb2 Compare September 7, 2026 11:57
@shegazyy
shegazyy deployed to workflow-approval September 7, 2026 11:57 — with GitHub Actions Active
@shegazyy
shegazyy deployed to workflow-approval September 7, 2026 11:57 — with GitHub Actions Active
@shegazyy

shegazyy commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

Hello @danth changes applied and merged with latest main. Ready for review whenever you have the time.

@danth danth left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me 😄

@cameron-craig-etas cameron-craig-etas left a comment

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.

Nice 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

4 participants