Skip to content

refactor: remove legacy Select surface - #49

Merged
conr2d merged 7 commits into
mainfrom
refactor/remove-legacy-select
Sep 15, 2026
Merged

conr2d merged 7 commits into
mainfrom
refactor/remove-legacy-select

Conversation

@4lmighty

Copy link
Copy Markdown
Collaborator

Summary

  • migrate remaining Select conformance coverage to try_index() / recv<N>()
  • remove the legacy CaseDefault and process<N>() APIs
  • remove obsolete default-position coverage because default is no longer represented as a Select operation
  • update the README Select example to the canonical switch-init form

Motivation

#45 froze the canonical Select translation shape, #47 introduced the runtime surface, and #48 migrated runtime/example call sites. This PR completes that migration so the repository has one translation-facing Select form before large-scale porting begins.

With default represented by try_index() and ordinary C++ default:, communication indices now correspond only to source communication clauses and the old position-dependent default representation is no longer part of the API.

Scope

This removes legacy translation surface only. Nil channels, recv2, and stronger exactly-one blocking arbitration remain separate follow-up work.

@4lmighty 4lmighty left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The legacy-surface cleanup looks consistent with the canonical Select direction, but the current head does not build. randomized_indices() now uses std::iota, which is declared in <numeric>, and select.h does not include that header. CI fails during compilation in every TU that includes select.h, so this is blocking until the direct include is added.

Comment thread src/eo/select.h
auto randomized_indices() -> std::vector<size_t> {
auto indices = communication_indices(std::make_index_sequence<sizeof...(Ts) + 1>());
std::vector<size_t> indices(sizeof...(Ts) + 1);
std::iota(indices.begin(), indices.end(), 0);

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

std::iota requires <numeric>, but this header currently only includes eo/go.h and <tuple>. The Build workflow is failing with error: 'iota' is not a member of 'std' from this line. Please add #include <numeric> directly in select.h rather than relying on a transitive include.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed by including directly in select.h so std::iota no longer relies on transitive includes.

@4lmighty 4lmighty left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Re-reviewed the latest head (2de90c7). The previous blocker is fixed by including <numeric> directly in select.h, and I don't see any new code-level blockers in the legacy Select surface removal. Style is green; Build is still running on this head at the time of review, so from the code review side this is LGTM pending CI.

@conr2d
conr2d merged commit f893016 into main Sep 15, 2026
3 checks passed
@conr2d
conr2d deleted the refactor/remove-legacy-select branch September 15, 2026 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants