mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 14:35:36 +01:00
Revert "Revert "Merge pull request #771 from Turbo87/fix-feature-gate""
This reverts commit 815a0a4d73
.
This commit is contained in:
parent
815a0a4d73
commit
6cc4b662ec
6 changed files with 17 additions and 174 deletions
|
@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## unreleased
|
||||
|
||||
## Removed
|
||||
|
||||
- `rocksdb-storage` feature and associated items (See [PR #761](https://github.com/teloxide/teloxide/pull/761) for reasoning) [**BC**]
|
||||
|
||||
## 0.11.2 - 2022-11-18
|
||||
|
||||
### Fixed
|
||||
|
|
174
Cargo.toml
174
Cargo.toml
|
@ -1,172 +1,2 @@
|
|||
[package]
|
||||
name = "teloxide"
|
||||
version = "0.11.1"
|
||||
edition = "2021"
|
||||
description = "An elegant Telegram bots framework for Rust"
|
||||
repository = "https://github.com/teloxide/teloxide"
|
||||
documentation = "https://docs.rs/teloxide/"
|
||||
readme = "README.md"
|
||||
keywords = ["teloxide", "telegram", "telegram-bot", "telegram-bot-api"]
|
||||
categories = ["web-programming", "api-bindings", "asynchronous"]
|
||||
license = "MIT"
|
||||
exclude = ["media"]
|
||||
|
||||
[features]
|
||||
default = ["native-tls", "ctrlc_handler", "teloxide-core/default", "auto-send"]
|
||||
|
||||
webhooks = ["rand"]
|
||||
webhooks-axum = ["webhooks", "axum", "tower", "tower-http"]
|
||||
|
||||
sqlite-storage = ["sqlx"]
|
||||
redis-storage = ["redis"]
|
||||
rocksdb-storage = ["rocksdb"]
|
||||
cbor-serializer = ["serde_cbor"]
|
||||
bincode-serializer = ["bincode"]
|
||||
|
||||
macros = ["teloxide-macros"]
|
||||
|
||||
ctrlc_handler = ["tokio/signal"]
|
||||
|
||||
native-tls = ["teloxide-core/native-tls"]
|
||||
rustls = ["teloxide-core/rustls"]
|
||||
auto-send = ["teloxide-core/auto_send"]
|
||||
throttle = ["teloxide-core/throttle"]
|
||||
cache-me = ["teloxide-core/cache_me"]
|
||||
trace-adaptor = ["teloxide-core/trace_adaptor"]
|
||||
erased = ["teloxide-core/erased"]
|
||||
|
||||
# currently used for `README.md` tests, building docs for `docsrs` to add `This is supported on feature="..." only.`,
|
||||
# and for teloxide-core.
|
||||
nightly = ["teloxide-core/nightly"]
|
||||
|
||||
full = [
|
||||
"webhooks-axum",
|
||||
"sqlite-storage",
|
||||
"redis-storage",
|
||||
"rocksdb-storage",
|
||||
"cbor-serializer",
|
||||
"bincode-serializer",
|
||||
"macros",
|
||||
"ctrlc_handler",
|
||||
"teloxide-core/full",
|
||||
"native-tls",
|
||||
"rustls",
|
||||
"auto-send",
|
||||
"throttle",
|
||||
"cache-me",
|
||||
"trace-adaptor",
|
||||
"erased",
|
||||
]
|
||||
|
||||
[dependencies]
|
||||
teloxide-core = { version = "0.8.0", default-features = false }
|
||||
teloxide-macros = { version = "0.7.0", optional = true }
|
||||
|
||||
serde_json = "1.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
|
||||
dptree = "0.3.0"
|
||||
|
||||
# These lines are used only for development.
|
||||
# teloxide-core = { git = "https://github.com/teloxide/teloxide-core", rev = "00165e6", default-features = false }
|
||||
# teloxide-macros = { git = "https://github.com/teloxide/teloxide-macros", rev = "e715105", optional = true }
|
||||
# dptree = { git = "https://github.com/teloxide/dptree", rev = "df578e4" }
|
||||
|
||||
tokio = { version = "1.8", features = ["fs"] }
|
||||
tokio-util = "0.7"
|
||||
tokio-stream = "0.1.8"
|
||||
|
||||
url = "2.2.2"
|
||||
log = "0.4"
|
||||
bytes = "1.0"
|
||||
mime = "0.3"
|
||||
|
||||
derive_more = "0.99"
|
||||
thiserror = "1.0"
|
||||
futures = "0.3.15"
|
||||
pin-project = "1.0"
|
||||
serde_with_macros = "1.4"
|
||||
aquamarine = "0.1.11"
|
||||
|
||||
sqlx = { version = "0.6", optional = true, default-features = false, features = [
|
||||
"runtime-tokio-native-tls",
|
||||
"macros",
|
||||
"sqlite",
|
||||
] }
|
||||
redis = { version = "0.21", features = ["tokio-comp"], optional = true }
|
||||
rocksdb = { version = "0.19", optional = true, default-features = false, features = [
|
||||
"lz4",
|
||||
] }
|
||||
serde_cbor = { version = "0.11", optional = true }
|
||||
bincode = { version = "1.3", optional = true }
|
||||
axum = { version = "0.5.13", optional = true }
|
||||
tower = { version = "0.4.12", optional = true }
|
||||
tower-http = { version = "0.3.4", features = ["trace"], optional = true }
|
||||
rand = { version = "0.8.5", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
rand = "0.8.3"
|
||||
pretty_env_logger = "0.4.0"
|
||||
serde = "1"
|
||||
serde_json = "1"
|
||||
tokio = { version = "1.8", features = ["fs", "rt-multi-thread", "macros"] }
|
||||
reqwest = "0.11.11"
|
||||
chrono = "0.4"
|
||||
tokio-stream = "0.1"
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
# FIXME: Add back "-Znormalize-docs" when https://github.com/rust-lang/rust/issues/93703 is fixed
|
||||
rustdoc-args = ["--cfg", "docsrs"]
|
||||
rustc-args = ["--cfg", "dep_docsrs"]
|
||||
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples=examples"]
|
||||
|
||||
[[test]]
|
||||
name = "redis"
|
||||
path = "tests/redis.rs"
|
||||
required-features = ["redis-storage", "cbor-serializer", "bincode-serializer"]
|
||||
|
||||
[[test]]
|
||||
name = "sqlite"
|
||||
path = "tests/sqlite.rs"
|
||||
required-features = ["sqlite-storage", "cbor-serializer", "bincode-serializer"]
|
||||
|
||||
[[example]]
|
||||
name = "dialogue"
|
||||
required-features = ["macros"]
|
||||
|
||||
[[example]]
|
||||
name = "command"
|
||||
required-features = ["macros"]
|
||||
|
||||
[[example]]
|
||||
name = "db_remember"
|
||||
required-features = ["sqlite-storage", "redis-storage", "bincode-serializer", "macros"]
|
||||
|
||||
[[example]]
|
||||
name = "inline"
|
||||
required-features = ["macros"]
|
||||
|
||||
[[example]]
|
||||
name = "buttons"
|
||||
required-features = ["macros"]
|
||||
|
||||
[[example]]
|
||||
name = "admin"
|
||||
required-features = ["macros"]
|
||||
|
||||
[[example]]
|
||||
name = "dispatching_features"
|
||||
required-features = ["macros"]
|
||||
|
||||
[[example]]
|
||||
name = "ngrok_ping_pong"
|
||||
required-features = ["webhooks-axum"]
|
||||
|
||||
[[example]]
|
||||
name = "heroku_ping_pong"
|
||||
required-features = ["webhooks-axum"]
|
||||
|
||||
[[example]]
|
||||
name = "purchase"
|
||||
required-features = ["macros"]
|
||||
[workspace]
|
||||
members = ["crates/*"]
|
||||
|
|
|
@ -1,6 +1,14 @@
|
|||
This document describes breaking changes of `teloxide` crate, as well as the ways to update code.
|
||||
Note that the list of required changes is not fully exhaustive and it may lack something in rare cases.
|
||||
|
||||
## 0.11 -> 0.??
|
||||
|
||||
### teloxide
|
||||
|
||||
`rocksdb-storage` feature and associated items were removed.
|
||||
If you are using rocksdb storage, you'll need to either write `Storage` impl yourself, or use a third party crate.
|
||||
<!-- FIXME: add a link once there *is* a third party crate -->
|
||||
|
||||
## 0.11 -> 0.11.2
|
||||
|
||||
### teloxide
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
> [v0.11 -> v0.11.1 migration guide >>](MIGRATION_GUIDE.md#011---0111)
|
||||
> [v0.11 -> v0.11.2 migration guide >>](MIGRATION_GUIDE.md#011---0112)
|
||||
|
||||
<div align="center">
|
||||
<img src="./media/teloxide-logo.png" width="250"/>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
//! An update dispatching model based on [`dptree`].
|
||||
//!
|
||||
//! In teloxide, update dispatching is declarative: it takes the form of a
|
||||
//! In `teloxide`, update dispatching is declarative: it takes the form of a
|
||||
//! [chain of responsibility] pattern enriched with a number of combinator
|
||||
//! functions, which together form an instance of the [`dptree::Handler`] type.
|
||||
//!
|
||||
|
|
|
@ -60,6 +60,7 @@
|
|||
#[cfg(feature = "ctrlc_handler")]
|
||||
pub use dispatching::repls::{repl, repl_with_listener};
|
||||
|
||||
#[cfg(feature = "ctrlc_handler")]
|
||||
#[allow(deprecated)]
|
||||
pub use dispatching::repls::{commands_repl, commands_repl_with_listener};
|
||||
|
||||
|
|
Loading…
Reference in a new issue