Skip to content

Commit

Permalink
Tracking for Release v0.18.0 (#576)
Browse files Browse the repository at this point in the history
Release tracker for v0.18.0 of chorus, set to release on November 24th, 2024.

## Public API changes
- #570: Various entity public api changes
- 644d3be, 85e922b: Add type `OneOrMoreSnowflakes`, allow `GatewayRequestGuildMembers` to request multiple guild and user ids
- f65b9c1: Differentiate `PresenceUpdate` and `GatewayPresenceUpdate`
- 0e5fd86: Temporarily fix `PresenceUpdate` for Spacebar Client by making `user` optional
- 61ac7d1: Updated `LazyRequest` (op 14) to use the `Snowflake` type for ids instead of just `String`

## Additions
- #564: MFA implementation, by @xystrive and @kozabrada123 
- 4ed68ce: Added [Last Messages request](https://docs.discord.sex/topics/gateway-events#request-last-messages) and [response](https://docs.discord.sex/topics/gateway-events#last-messages)
- b23fb68: Add `ReadState` to `GatewayReady`
- #571: Gateway Opcode enum
- #573: Gateway Disconnect Opcode enums

## Bugfixes

- #565: Fix sqlx En-/Decoding of `PremiumType`
- 7460d3f: Fix `GatewayIdentifyConnectionProps` for Spacebar Client by deriving default on all fields, since the client does not send it
-  3d9460f: Derive Default for `MessageReferenceType`, assume default reference_type if none is provided
- 4baecf9: Fixed a deserialization error related to `presences` in `GuildMembersChunk` being an array, not a single value
- 1b20102: Fixed a deserialization error with deserializing `activities` in `PresenceUpdate` as an empty array when they are sent as `null`
- 7feb571: Fixed a deserialization error on discord.com related to experiments (they are not implemented yet, see #578)
- fb94afa: Fixed a deserialization error on discord.com related to `last_viewed` in `ReadState` being a version / counter, not a `DateTime`

## Internal changes
- 40754c5: bump sqlx-pg-uint to v0.8.0
- #575: Refactor of gateway close code handling
- 4ed68ce: Refactored the gateway to fully use the `Opcode` enum instead of constants
- #579

---------

Co-authored-by: bitfl0wer <[email protected]>
Co-authored-by: Flori <[email protected]>
Co-authored-by: xystrive <[email protected]>
  • Loading branch information
4 people authored Nov 24, 2024
1 parent edf0ede commit d9d6ea9
Show file tree
Hide file tree
Showing 61 changed files with 3,429 additions and 534 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ jobs:
npm run setup
npm run start &
working-directory: ./server
# Note: see
# https://github.com/polyphony-chat/chorus/pull/579,
# https://github.com/rustwasm/wasm-bindgen/issues/4274
# https://github.com/rustwasm/wasm-bindgen/issues/4274#issuecomment-2493497388
- name: Install rust toolchain 1.81.0
uses: dtolnay/[email protected]
- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: "true"
Expand All @@ -102,7 +108,7 @@ jobs:
run: |
rustup target add wasm32-unknown-unknown
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
cargo binstall --no-confirm wasm-bindgen-cli --version "0.2.93" --force
cargo binstall --no-confirm wasm-bindgen-cli --version "0.2.95" --force
GECKODRIVER=$(which geckodriver) cargo test --target wasm32-unknown-unknown --no-default-features --features="client, rt, voice_gateway"
wasm-chrome:
runs-on: ubuntu-latest
Expand All @@ -123,6 +129,12 @@ jobs:
npm run setup
npm run start &
working-directory: ./server
# Note: see
# https://github.com/polyphony-chat/chorus/pull/579,
# https://github.com/rustwasm/wasm-bindgen/issues/4274
# https://github.com/rustwasm/wasm-bindgen/issues/4274#issuecomment-2493497388
- name: Install rust toolchain 1.81.0
uses: dtolnay/[email protected]
- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: "true"
Expand All @@ -132,5 +144,5 @@ jobs:
run: |
rustup target add wasm32-unknown-unknown
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
cargo binstall --no-confirm wasm-bindgen-cli --version "0.2.93" --force
cargo binstall --no-confirm wasm-bindgen-cli --version "0.2.95" --force
CHROMEDRIVER=$(which chromedriver) cargo test --target wasm32-unknown-unknown --no-default-features --features="client, rt, voice_gateway"
102 changes: 74 additions & 28 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 12 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "chorus"
description = "A library for interacting with multiple Spacebar-compatible Instances at once."
version = "0.17.0"
version = "0.18.0"
license = "MPL-2.0"
edition = "2021"
repository = "https://github.com/polyphony-chat/chorus"
Expand Down Expand Up @@ -67,7 +67,7 @@ rand = "0.8.5"
flate2 = { version = "1.0.33", optional = true }
webpki-roots = "0.26.3"
pubserve = { version = "1.1.0", features = ["async", "send"] }
sqlx-pg-uint = { version = "0.7.2", features = ["serde"], optional = true }
sqlx-pg-uint = { version = "0.8.0", features = ["serde"], optional = true }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
rustls = "0.21.12"
Expand All @@ -80,14 +80,22 @@ getrandom = { version = "0.2.15" }
[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = { version = "0.2.15", features = ["js"] }
ws_stream_wasm = "0.7.4"
pharos = "*" # This is a dependency of ws_stream_wasm, we are including it to interface with that library
wasm-bindgen-futures = "0.4.43"
wasmtimer = "0.2.0"
wasmtimer = "0.4.0"

[dev-dependencies]
lazy_static = "1.5.0"
wasm-bindgen-test = "0.3.43"
wasm-bindgen = "0.2.93"
wasm-bindgen = "0.2.95"
simple_logger = { version = "5.0.0", default-features = false }

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
httptest = "0.16.1"

[lints.rust]
unexpected_cfgs = { level = "allow", check-cfg = ['cfg(tarpaulin_include)'] }

# See https://github.com/whizsid/wasmtimer-rs/issues/18#issuecomment-2420144039
[package.metadata.wasm-pack.profile.dev.wasm-bindgen]
debug-js-glue = false
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ To get started with Chorus, import it into your project by adding the following

```toml
[dependencies]
chorus = "0.17.0"
chorus = "0.18.0"
```

### Establishing a Connection
Expand Down Expand Up @@ -143,7 +143,11 @@ to run the tests for wasm.

## Versioning

This crate uses Semantic Versioning 2.0.0 as its versioning scheme. You can read the specification [here](https://semver.org/spec/v2.0.0.html).
Like other cargo crates, this crate uses Semantic Versioning 2.0.0 as its versioning scheme.
You can read the specification [here](https://semver.org/spec/v2.0.0.html).

Code gated behind the `backend` feature is not considered part of the public API and can change without
affecting semver compatibility. The `backend` feature is explicitly meant for use in [`symfonia`](https://github.com/polyphony-chat/symfonia)

## Contributing

Expand Down
Loading

0 comments on commit d9d6ea9

Please sign in to comment.