* Bump sqlx to 0.8.0
* Update sqlx syntax to 0.8.0, change MySql for sqlx:: Any
* Update sqlx syntax to 0.8.0, change MySql for sqlx:: Any
* Modify chorus_macros::SqlxBitflagDerive to use sqlx::Any over sqlx::MySql (broken!)
* Fix: `cannot infer type for type parameter `DB` declared on the trait...`
* Change remaining impls of sqlx traits for MySql to sqlx::Any
* Alter chorus_macros to correctly derive SqlxBitFlag for sqlx::Any
* rustc/clippy>=v1.80.0: Do not warn when encountering cfg(tarpaulin_include)
* Port compare_* methods to sqlx v0.8.0
Fixes the compile errors in the `voice_simple` example, updates the docs
in the `gateway_observers` example and adds a public reexport of
`Subscriber` as `Observer`, to make development easier and introduce
less breaking changes to our public api
to reduce the external dependencies needed for development with
`chorus`, we could also add some other reexports, potentially
`async_trait::async_trait`
This PR switches the `linux` job from `cargo test` to `cargo nextest
run` for > 50% time reduction in the test execution step of the CI
pipeline. Also, the "check common non default feature configurations"
step has been moved from the `linux` job to it's own job, to parallelize
the CI pipeline further and reduce the time that CI needs to run to
completion.
Adds about one billion (+- a few hundred million) missing derives for
all sorts of types.
The biggest change in this PR is, how structs holding a property
`Shared<T>` types implement `PartialEq`. In previous versions of this
crate, if a `Shared<T>` was part of a struct, this or these properties
would be ignored in == comparisons. This is because `Shared<T>` is
defined as `Arc<RwLock<T>>` - meaning you'd have to lock the `RwLock` to
make a comparison. From now on, instead of ignoring these properties or
locking the inner `RwLock`, the pointer values of the `Arc<T>`'s get
compared. This is a cheap and exact way of ensuring `Eq` for types,
which have an inner `Shared<T>`.
This PR replaces our internal `Observer` trait with a more generic
version, as offered by our `pubserve` crate.
This also has the added benefit of removing the... creative logic used
in `Observer::unsubscribe()` which did not check the memory the internal
`Arc` points to, but rather some weird
```rs
self.observers
.retain(|obs| format!("{:?}", obs) != to_remove);
```
which was written ages ago by a version of me that was still at the very
beginning of learning Rust
- fix `PATCH /users/@me` - It incorrectly returned a required password error, even if the current password was set
- fix `GET /users/@me/guilds` - It incorrectly sent body parameters instead of query ones
- don't log debug! for every successful ratelimited request - use trace! so it's less spamy
- update the max expected compression ratio (several times) from 20 to 200. let's hope that will be enough
- fix deserialization errors relating to guild folders in user settings
- fix a panic in `SqlxBitFlags` if there are extra flags. It now truncates them
- update `chorus_macros` to 0.4.1 (due to the above fix)
- log (trace!) event data if we fail to parse it or it's unrecognised, for debugging purposes
- fix a deserialization error in the `MessageACK` event
- fix `public_flags` in user objects not being `PublicFlags` bitflags
* Fix SQL encode/decode for GuildFeatures
* Use distinct PermissionFlags type
* Add Emoji schema types, modify GuildBan with feature lock
* Add Schemas for pruning guild members
* Add schemas for interfacing with stickers backend routes
* Add schemas for interfacing with vanity-url backend routes
* Add schema for interfacing with guilds/id/welcome-screen route
* Make all Option<Vec> types Vec types with #[serde(default)]
* Add various types to support guilds/* api routes
* Add missing enums and structs for searching messages
* Use proper distinct types
* Add EmbedType enum
* Use distinct PermissionFlags type
* Changes supporting backend for VoiceState
* Changes supporting backend for AuditLog's
* feat: add GatewayOptions
* feat: implement zlib-stream compression
This also changes how gateway messages work.
Now each gateway backend converts its message into an
intermediary RawGatewayMessage, from which we inflate
and parse GatewayMessages.
Thanks to ByteAlex and their zlib-stream-rs crate, which
helped me understand how to parse a compressed websocket stream