Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhancement!(gateway): rename zlib features #829

Merged
merged 1 commit into from
May 22, 2021
Merged

enhancement!(gateway): rename zlib features #829

merged 1 commit into from
May 22, 2021

Conversation

zeylahellyer
Copy link
Member

Rename the two zlib features - stock-zlib and simd-zlib - for consistency with other feature flags. These have been renamed to zlib-stock and zlib-simd to properly namespace the feature flags.

Closes #717.

Rename the two zlib features - `stock-zlib` and `simd-zlib` - for
consistency with other feature flags. These have been renamed to
`zlib-stock` and `zlib-simd` to properly namespace the feature flags.

Closes #717.

BREAKING CHANGES: The gateway's `stock-zlib` and `simd-zlib` feature
flags have been renamed to `zlib-stock` and `zlib-simd`, respectively.

Signed-off-by: Vivian Hellyer <[email protected]>
@zeylahellyer zeylahellyer added t-docs A change to the documentation c-gateway Affects the gateway crate m-breaking change Breaks the public API. enhancement labels May 22, 2021
@zeylahellyer zeylahellyer merged commit fc3c8ec into twilight-rs:next May 22, 2021
@zeylahellyer zeylahellyer deleted the enhancement/gateway/rename-zlib-features branch May 22, 2021 13:35
7596ff pushed a commit to 7596ff/twilight that referenced this pull request Jun 7, 2021
Rename the two zlib features - `stock-zlib` and `simd-zlib` - for
consistency with other feature flags. These have been renamed to
`zlib-stock` and `zlib-simd` to properly namespace the feature flags.

Closes twilight-rs#717.

BREAKING CHANGES: The gateway's `stock-zlib` and `simd-zlib` feature
flags have been renamed to `zlib-stock` and `zlib-simd`, respectively.
7596ff pushed a commit to 7596ff/twilight that referenced this pull request Jun 13, 2021
Rename the two zlib features - `stock-zlib` and `simd-zlib` - for
consistency with other feature flags. These have been renamed to
`zlib-stock` and `zlib-simd` to properly namespace the feature flags.

Closes twilight-rs#717.

BREAKING CHANGES: The gateway's `stock-zlib` and `simd-zlib` feature
flags have been renamed to `zlib-stock` and `zlib-simd`, respectively.
7596ff pushed a commit to 7596ff/twilight that referenced this pull request Jun 13, 2021
Rename the two zlib features - `stock-zlib` and `simd-zlib` - for
consistency with other feature flags. These have been renamed to
`zlib-stock` and `zlib-simd` to properly namespace the feature flags.

Closes twilight-rs#717.

BREAKING CHANGES: The gateway's `stock-zlib` and `simd-zlib` feature
flags have been renamed to `zlib-stock` and `zlib-simd`, respectively.
7596ff pushed a commit to 7596ff/twilight that referenced this pull request Jun 13, 2021
Rename the two zlib features - `stock-zlib` and `simd-zlib` - for
consistency with other feature flags. These have been renamed to
`zlib-stock` and `zlib-simd` to properly namespace the feature flags.

Closes twilight-rs#717.

BREAKING CHANGES: The gateway's `stock-zlib` and `simd-zlib` feature
flags have been renamed to `zlib-stock` and `zlib-simd`, respectively.
7596ff added a commit that referenced this pull request Jun 13, 2021
Upgrade Path

Replace `zlib` features with their new names.

Create a `Cluster` or `Shard` like this:

```diff
-let cluster = Cluster::new(token, intents).await?;
-let mut events = cluster.events();
+let (cluster, mut events) = Cluster::new(token, intents).await?;
```

Replace references to `UpdateStatus` and `UpdateStatusInfo` with
`UpdatePresence` and `UpdatePresencePayload` respectively.

Ensure at least one `Activity` is present in `UpdatePresence`.

Changes

The `zlib` feature choices have been renamed from `'stock-zlib` and
`simd-zlib` to `zlib-stock` and `zlib-simd` respectively ([#829] -
[@vivian]).

`Cluster::new`, `ClusterBuilder::build`, `Shard::new`, and
`ShardBuilder::build` now return a tuple with two elements: the cluster
or shard itself and a stream of events. See the PR for more details
([#832] - [@vivian]).

`UpdateStatus` and `UpdateStatusInfo` have been renamed to
`UpdatePresence` and `UpdatePresencePayload` respectively ([#902] -
[@7596ff]).

At least one `Activity` is required when building an `UpdatePresence`
payload.  `UpdatePresenceError` and `UpdatePresenceErrorType` have been
created to validate this ([#891] - [@7596ff]).

[#829]: #829
[#832]: #832
[#891]: #891
[#902]: #902

[@7596ff]: https://github.com/7596ff
[@vivian]: https://github.com/vivian
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-gateway Affects the gateway crate m-breaking change Breaks the public API. t-docs A change to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants