This change fixes tasks hanging due to rare cases of messages being lost between full Discord reconnections by placing a configurable timeout on the `ConnectionInfo` responses. This is a companion fix to [serenity#1255](https://github.com/serenity-rs/serenity/pull/1255). To make this doable, `Config`s are now used by all versions of `Songbird`/`Call`, and relevant functions are added to simplify setup with configuration. These are now non-exhaustive, correcting an earlier oversight. For future extensibility, this PR moves the return type of `join`/`join_gateway` into a custom future (no longer leaking flume's `RecvFut` type). Additionally, this fixes the Makefile's feature sets for driver/gateway-only compilation. This is a breaking change in: * the return types of `join`/`join_gateway` * moving `crate::driver::Config` -> `crate::Config`, * `Config` and `JoinError` becoming `#[non_breaking]`. This was tested via `cargo make ready`, and by testing `examples/serenity/voice_receive` with various timeout settings.
57 lines
1.5 KiB
TOML
57 lines
1.5 KiB
TOML
[tasks.format]
|
|
toolchain = "nightly"
|
|
install_crate = { crate_name = "rustfmt-nightly", rustup_component_name = "rustfmt-preview", binary = "rustfmt", test_arg = "--help" }
|
|
command = "cargo"
|
|
args = ["fmt", "--all"]
|
|
|
|
[tasks.build]
|
|
args = ["build", "--features", "full-doc"]
|
|
dependencies = ["format"]
|
|
|
|
[tasks.build-examples]
|
|
args = ["build", "--manifest-path", "./examples/Cargo.toml", "--workspace"]
|
|
command = "cargo"
|
|
dependencies = ["format"]
|
|
|
|
[tasks.build-gateway]
|
|
args = ["build", "--no-default-features", "--features", "serenity-rustls"]
|
|
command = "cargo"
|
|
dependencies = ["format"]
|
|
|
|
[tasks.build-driver]
|
|
args = ["build", "--no-default-features", "--features", "driver,rustls"]
|
|
command = "cargo"
|
|
dependencies = ["format"]
|
|
|
|
[tasks.build-old-tokio]
|
|
command = "cargo"
|
|
args = ["build", "--no-default-features", "--features", "serenity-rustls-tokio-02,driver-tokio-02"]
|
|
dependencies = ["format"]
|
|
|
|
[tasks.build-variants]
|
|
dependencies = ["build", "build-gateway", "build-driver", "build-old-tokio"]
|
|
|
|
[tasks.clippy]
|
|
args = ["clippy", "--features", "full-doc", "--", "-D", "warnings"]
|
|
dependencies = ["format"]
|
|
|
|
[tasks.test]
|
|
args = ["test", "--features", "full-doc"]
|
|
|
|
[tasks.bench]
|
|
description = "Runs performance benchmarks."
|
|
category = "Test"
|
|
command = "cargo"
|
|
args = ["bench", "--features", "internals,full-doc"]
|
|
|
|
[tasks.doc]
|
|
command = "cargo"
|
|
args = ["doc", "--features", "full-doc"]
|
|
|
|
[tasks.doc-open]
|
|
command = "cargo"
|
|
args = ["doc", "--features", "full-doc", "--open"]
|
|
|
|
[tasks.ready]
|
|
dependencies = ["format", "test", "build-variants", "build-examples", "doc", "clippy"]
|