Repository navigation
core: include shard_id.hh instead of redeclaring shard_id - #324
Merged
travisdowns merged 1 commit intoOct 29, 2026
Merged
Conversation
reactor.hh and io_queue.hh each redeclared `using shard_id = unsigned` rather than including shard_id.hh, which already declares it. The redeclarations are legal, but they confuse include-what-you-use: it attributes a use of shard_id to whichever declaration it resolves, so code that includes reactor.hh or io_queue.hh for something else gets told that shard_id comes from there. IWYU then suggests dropping <seastar/core/shard_id.hh> in favor of the much heavier reactor.hh or io_queue.hh. Remove the redeclarations and include shard_id.hh in both headers, so shard_id.hh is the single place the alias is declared. (cherry picked from commit 187dbc2)
travisdowns
requested review from
StephanDollberg and
ballard26
and
a balanced review from Copilot
October 29, 2026 05:21
travisdowns
enabled auto-merge (rebase)
October 29, 2026 05:22
Member
Author
|
auto merge enabled |
Member
Author
|
(Needed for IWYU) |
StephanDollberg
approved these changes
Oct 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
reactor.hh and io_queue.hh each redeclared
using shard_id = unsignedrather than including shard_id.hh, which already declares it. The
redeclarations are legal, but they confuse include-what-you-use: it
attributes a use of shard_id to whichever declaration it resolves, so
code that includes reactor.hh or io_queue.hh for something else gets
told that shard_id comes from there. IWYU then suggests dropping
<seastar/core/shard_id.hh> in favor of the much heavier reactor.hh or
io_queue.hh.
Remove the redeclarations and include shard_id.hh in both headers, so
shard_id.hh is the single place the alias is declared.
(cherry picked from commit 187dbc2)
Downstream of upstream scylladb/seastar#3778. Clean cherry-pick.