Skip to content

Conversation

@mkrasnitski
Copy link
Collaborator

Follow up to #3108.

Inlines the fields and methods of ShardMessenger into Context and changes collectors to take &Context. Also, removes the ShardRunnerMessage::{Close, Message} variants, adds an UpdateVoiceState variant (songbird will want to use this) and combines the 3 presence-related variants into one. Plus some miscellaneous cleanup of the ShardRunner code.

@github-actions github-actions bot added gateway Related to the `gateway` module. examples Related to Serenity's examples. collector Related to the `collector` module. labels Feb 19, 2025
@mkrasnitski mkrasnitski added the breaking change The public API is changed, resulting in miscompilations or unexpected new behaviour for users label Feb 20, 2025
@mkrasnitski mkrasnitski force-pushed the shard-messenger branch 2 times, most recently from 09f86bd to 594fb50 Compare March 7, 2025 21:15
Inlines `ShardMessenger` fields/methods into `Context` and removes
unnecessary `ShardRunnerMessage` variants, namely `Restart`, `Close`,
and `Message`.
Since each `ShardRunner` create a `Context` specific to it, and already
holds a channel back to the manager, we can use to expose latency
information for the corresponding shard, and also facilitate shutdown
requests back to the manager.
Copy link
Member

@jamesbt365 jamesbt365 left a comment

Choose a reason for hiding this comment

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

LGTM

@arqunis arqunis added the enhancement An improvement to Serenity. label Mar 14, 2025
@arqunis arqunis merged commit e552918 into serenity-rs:next Mar 14, 2025
24 checks passed
@mkrasnitski mkrasnitski deleted the shard-messenger branch March 15, 2025 00:19
GnomedDev pushed a commit to GnomedDev/serenity that referenced this pull request Mar 26, 2025
Follow up to serenity-rs#3108.

Inlines the fields and methods of `ShardMessenger` into `Context` and changes
collectors to take `&Context`. Also, removes the `ShardRunnerMessage::{Close,
Message}` variants, adds an `UpdateVoiceState` variant (Songbird will want to
use this) and combines the 3 presence-related variants into one. Plus some
miscellaneous cleanup of the `ShardRunner` code.
GnomedDev pushed a commit to GnomedDev/serenity that referenced this pull request Mar 26, 2025
Follow up to serenity-rs#3108.

Inlines the fields and methods of `ShardMessenger` into `Context` and changes
collectors to take `&Context`. Also, removes the `ShardRunnerMessage::{Close,
Message}` variants, adds an `UpdateVoiceState` variant (Songbird will want to
use this) and combines the 3 presence-related variants into one. Plus some
miscellaneous cleanup of the `ShardRunner` code.
arqunis pushed a commit that referenced this pull request Apr 5, 2025
The changes in #3120 now let us remove the clause due to changes in
ownership requirements.
GnomedDev pushed a commit that referenced this pull request Apr 28, 2025
Follow up to #3108.

Inlines the fields and methods of `ShardMessenger` into `Context` and changes
collectors to take `&Context`. Also, removes the `ShardRunnerMessage::{Close,
Message}` variants, adds an `UpdateVoiceState` variant (Songbird will want to
use this) and combines the 3 presence-related variants into one. Plus some
miscellaneous cleanup of the `ShardRunner` code.
GnomedDev pushed a commit that referenced this pull request Apr 28, 2025
The changes in #3120 now let us remove the clause due to changes in
ownership requirements.
GnomedDev pushed a commit that referenced this pull request May 19, 2025
Follow up to #3108.

Inlines the fields and methods of `ShardMessenger` into `Context` and changes
collectors to take `&Context`. Also, removes the `ShardRunnerMessage::{Close,
Message}` variants, adds an `UpdateVoiceState` variant (Songbird will want to
use this) and combines the 3 presence-related variants into one. Plus some
miscellaneous cleanup of the `ShardRunner` code.
GnomedDev pushed a commit that referenced this pull request May 19, 2025
The changes in #3120 now let us remove the clause due to changes in
ownership requirements.
mkrasnitski added a commit to mkrasnitski/serenity that referenced this pull request Jun 30, 2025
Follow up to serenity-rs#3108.

Inlines the fields and methods of `ShardMessenger` into `Context` and changes
collectors to take `&Context`. Also, removes the `ShardRunnerMessage::{Close,
Message}` variants, adds an `UpdateVoiceState` variant (Songbird will want to
use this) and combines the 3 presence-related variants into one. Plus some
miscellaneous cleanup of the `ShardRunner` code.
mkrasnitski added a commit to mkrasnitski/serenity that referenced this pull request Jun 30, 2025
The changes in serenity-rs#3120 now let us remove the clause due to changes in
ownership requirements.
mkrasnitski added a commit to mkrasnitski/serenity that referenced this pull request Jun 30, 2025
Follow up to serenity-rs#3108.

Inlines the fields and methods of `ShardMessenger` into `Context` and changes
collectors to take `&Context`. Also, removes the `ShardRunnerMessage::{Close,
Message}` variants, adds an `UpdateVoiceState` variant (Songbird will want to
use this) and combines the 3 presence-related variants into one. Plus some
miscellaneous cleanup of the `ShardRunner` code.
mkrasnitski added a commit to mkrasnitski/serenity that referenced this pull request Jun 30, 2025
The changes in serenity-rs#3120 now let us remove the clause due to changes in
ownership requirements.
mkrasnitski added a commit to mkrasnitski/serenity that referenced this pull request Jun 30, 2025
Follow up to serenity-rs#3108.

Inlines the fields and methods of `ShardMessenger` into `Context` and changes
collectors to take `&Context`. Also, removes the `ShardRunnerMessage::{Close,
Message}` variants, adds an `UpdateVoiceState` variant (Songbird will want to
use this) and combines the 3 presence-related variants into one. Plus some
miscellaneous cleanup of the `ShardRunner` code.
mkrasnitski added a commit to mkrasnitski/serenity that referenced this pull request Jun 30, 2025
The changes in serenity-rs#3120 now let us remove the clause due to changes in
ownership requirements.
mkrasnitski added a commit to mkrasnitski/serenity that referenced this pull request Jul 28, 2025
Follow up to serenity-rs#3108.

Inlines the fields and methods of `ShardMessenger` into `Context` and changes
collectors to take `&Context`. Also, removes the `ShardRunnerMessage::{Close,
Message}` variants, adds an `UpdateVoiceState` variant (Songbird will want to
use this) and combines the 3 presence-related variants into one. Plus some
miscellaneous cleanup of the `ShardRunner` code.
mkrasnitski added a commit to mkrasnitski/serenity that referenced this pull request Jul 28, 2025
The changes in serenity-rs#3120 now let us remove the clause due to changes in
ownership requirements.
mkrasnitski added a commit to mkrasnitski/serenity that referenced this pull request Jul 28, 2025
Follow up to serenity-rs#3108.

Inlines the fields and methods of `ShardMessenger` into `Context` and changes
collectors to take `&Context`. Also, removes the `ShardRunnerMessage::{Close,
Message}` variants, adds an `UpdateVoiceState` variant (Songbird will want to
use this) and combines the 3 presence-related variants into one. Plus some
miscellaneous cleanup of the `ShardRunner` code.
mkrasnitski added a commit to mkrasnitski/serenity that referenced this pull request Jul 28, 2025
The changes in serenity-rs#3120 now let us remove the clause due to changes in
ownership requirements.
mkrasnitski added a commit to mkrasnitski/serenity that referenced this pull request Oct 7, 2025
Follow up to serenity-rs#3108.

Inlines the fields and methods of `ShardMessenger` into `Context` and changes
collectors to take `&Context`. Also, removes the `ShardRunnerMessage::{Close,
Message}` variants, adds an `UpdateVoiceState` variant (Songbird will want to
use this) and combines the 3 presence-related variants into one. Plus some
miscellaneous cleanup of the `ShardRunner` code.
mkrasnitski added a commit to mkrasnitski/serenity that referenced this pull request Oct 7, 2025
The changes in serenity-rs#3120 now let us remove the clause due to changes in
ownership requirements.
mkrasnitski added a commit to mkrasnitski/serenity that referenced this pull request Oct 7, 2025
Follow up to serenity-rs#3108.

Inlines the fields and methods of `ShardMessenger` into `Context` and changes
collectors to take `&Context`. Also, removes the `ShardRunnerMessage::{Close,
Message}` variants, adds an `UpdateVoiceState` variant (Songbird will want to
use this) and combines the 3 presence-related variants into one. Plus some
miscellaneous cleanup of the `ShardRunner` code.
mkrasnitski added a commit to mkrasnitski/serenity that referenced this pull request Oct 7, 2025
The changes in serenity-rs#3120 now let us remove the clause due to changes in
ownership requirements.
mkrasnitski added a commit to mkrasnitski/serenity that referenced this pull request Oct 7, 2025
Follow up to serenity-rs#3108.

Inlines the fields and methods of `ShardMessenger` into `Context` and changes
collectors to take `&Context`. Also, removes the `ShardRunnerMessage::{Close,
Message}` variants, adds an `UpdateVoiceState` variant (Songbird will want to
use this) and combines the 3 presence-related variants into one. Plus some
miscellaneous cleanup of the `ShardRunner` code.
mkrasnitski added a commit to mkrasnitski/serenity that referenced this pull request Oct 7, 2025
The changes in serenity-rs#3120 now let us remove the clause due to changes in
ownership requirements.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change The public API is changed, resulting in miscompilations or unexpected new behaviour for users collector Related to the `collector` module. enhancement An improvement to Serenity. examples Related to Serenity's examples. gateway Related to the `gateway` module.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants