-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
tokio-codec
does not contain length_delimited
#680
Comments
I think the deprecation warnings need to be updated to say "tokio::codec" rather than "tokio-codec". As for
@carllerche and @kpp suggested that |
The deprecation in |
Until tokio-rs/tokio#680 is resolved, we should allow using deprecated APIs in the codec module.
Until tokio-rs/tokio#680 is resolved, we should allow using deprecated APIs in the codec module.
While using Please consider adding |
That's a good reason. |
Thanks, that should be good! I wonder though, why exactly this approach was taken instead of separate crates. Is it documented somewhere? |
@Kixunil took me almost 90 minutes to publish the last round of crates... |
I'm going to close this as Tokio w/ feature flags has been pushed. You can depend on the |
That's reasonable, thanks a lot for everything! |
@carllerche: I think the current state of feature resolution in cargo prevents this from working properly in practice, e.g. when compiling for different targets. See for example: rust-lang/cargo#1796, rust-lang/cargo#4866. |
@twittner could you explain the exact problem scenario? |
A [package]
name = "foo"
version = "0.1.0"
[target.'cfg(target_arch = "wasm32")'.dependencies]
tokio = { version = "0.1.14", default-features = false, features = ["io"] }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
tokio = { version = "0.1.14", default-features = false, features = ["io", "tcp"] } which selects different |
A workaround could be for Tokio to never pull in features that don’t work on the platform... so on wa even if you ask for tcp you wouldn’t get it. Or cargo could fix the issue. |
Actually I don't want tokio-uds or tokio-fs while I include tokio in my project. |
@kpp this is possible today by using feature flags. |
Ah thanks |
Version
tokio-codec 0.1.1
tokio-io 0.1.9
Platform
Linux 4.18.10-arch1-1-ARCH #1 SMP PREEMPT x86_64
Subcrates
tokioc-codec
tokio-io
Description
PR #568 deprecated
tokio_io::codec::length_delimited
. The deprecation warnings, e.g.claim the module has been moved to
tokio-codec
, however this is not the case.tokio
now contains acodec::length_delimited
module, but thetokio-codec
crate does not. Users who do not use thetokio
crate have therefore no upgrade path.The text was updated successfully, but these errors were encountered: