Skip to content

refactor: convert Reporter trait hierarchy from &mut self to &self - #5913

Merged
baszalmstra merged 1 commit into
prefix-dev:feature/lockfile-v7from
baszalmstra:bz/reporter-shared-ref
Apr 16, 2026
Merged

baszalmstra merged 1 commit into
prefix-dev:feature/lockfile-v7from
baszalmstra:bz/reporter-shared-ref

Conversation

@baszalmstra

Copy link
Copy Markdown
Contributor

Description

Switch the Reporter trait and all 11 sub-reporter traits from &mut self to &self. This removes the exclusive-borrow requirement so that reporters can be shared (e.g. via Arc<dyn Reporter>) across concurrent tasks, giving more flexibility in how we execute tasks in the command dispatcher.

The Reporter bound is tightened from Send to Send + Sync. Implementations that held mutable state now use interior mutability. Implementations that already locked internally only needed signature changes.

How Has This Been Tested?

cargo clippy -p pixi_command_dispatcher -p pixi_reporters -- -D warnings and cargo test -p pixi_command_dispatcher -p pixi_reporters both pass (34 unit tests + 23 integration tests).

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR.
      Tools: Claude Code (Claude Opus 4.6)

Checklist:

  • I have performed a self-review of my own code

@baszalmstra
baszalmstra force-pushed the bz/reporter-shared-ref branch from b8aac14 to 128ac95 Compare April 16, 2026 11:19
@baszalmstra
baszalmstra requested a review from hunger April 16, 2026 11:20
@baszalmstra
baszalmstra force-pushed the feature/lockfile-v7 branch from d11415d to 7cf6e7d Compare April 16, 2026 12:45
@baszalmstra
baszalmstra force-pushed the bz/reporter-shared-ref branch 2 times, most recently from cc54d88 to 9fff9d0 Compare April 16, 2026 12:53
@baszalmstra
baszalmstra force-pushed the feature/lockfile-v7 branch from 7cf6e7d to feada3d Compare April 16, 2026 12:54
@baszalmstra
baszalmstra force-pushed the feature/lockfile-v7 branch from feada3d to 6241687 Compare April 16, 2026 13:49
@baszalmstra
baszalmstra force-pushed the bz/reporter-shared-ref branch from 9fff9d0 to 4e22df2 Compare April 16, 2026 13:54
@baszalmstra
baszalmstra merged commit 54db5b6 into prefix-dev:feature/lockfile-v7 Apr 16, 2026
37 checks passed
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.

1 participant