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().

…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>
@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.

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.

2 participants