~kennylevinsen/greetd

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH] Make sure to require codec in tokio-codec feature

Details
Message ID
<20200531165923.12978-1-r@gnzler.io>
DKIM signature
missing
Download raw message
Patch: +1 -1
---
I'm trying to package for gentoo. Using the cargo eclass I get errors
like this:

	error[E0432]: unresolved import `greetd_ipc::codec`
	  --> greetd/src/server.rs:17:5
	   |
	17 |     codec::{Error as CodecError, TokioCodec},
	   |     ^^^^^ could not find `codec` in `greetd_ipc`

	error[E0433]: failed to resolve: could not find `codec` in `greetd_ipc`
	  --> greetd/src/error.rs:42:23
	   |
	42 | impl From<greetd_ipc::codec::Error> for Error {
	   |                       ^^^^^ could not find `codec` in `greetd_ipc`

	error[E0433]: failed to resolve: could not find `codec` in `greetd_ipc`
	  --> greetd/src/error.rs:43:32
	   |
	43 |     fn from(error: greetd_ipc::codec::Error) -> Self {
	   |                                ^^^^^ could not find `codec` in `greetd_ipc`

	error[E0433]: failed to resolve: could not find `codec` in `greetd_ipc`
	  --> greetd/src/error.rs:45:25
	   |
	45 |             greetd_ipc::codec::Error::Serialization(s) => Error::ProtocolError(s),
	   |                         ^^^^^ could not find `codec` in `greetd_ipc`

	error[E0433]: failed to resolve: could not find `codec` in `greetd_ipc`
	  --> greetd/src/error.rs:46:25
	   |
	46 |             greetd_ipc::codec::Error::Io(s) => Error::Io(s),
	   |                         ^^^^^ could not find `codec` in `greetd_ipc`

	error[E0433]: failed to resolve: could not find `codec` in `greetd_ipc`
	  --> greetd/src/error.rs:47:25
	   |
	47 |             greetd_ipc::codec::Error::Eof => Error::Io("EOF".to_string()),
	   |                         ^^^^^ could not find `codec` in `greetd_ipc`

	error[E0599]: no variant or associated item named `read_from` found for type `greetd_ipc::Request` in the current scope
	  --> greetd/src/server.rs:54:34
	   |
	54 |         let req = match Request::read_from(&mut s).await {
	   |                                  ^^^^^^^^^ variant or associated item not found in `greetd_ipc::Request`

	error[E0599]: no method named `write_to` found for type `greetd_ipc::Response` in the current scope
	  --> greetd/src/server.rs:75:14
	   |
	75 |         resp.write_to(&mut s).await?;
	   |              ^^^^^^^^ method not found in `greetd_ipc::Response`

I considered just adding the "codec" feature to greetd, but I think the
"tokio-codec" feature implies it is an extension of the "codec" one, so
we should just include it automatically.

 greetd_ipc/Cargo.toml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/greetd_ipc/Cargo.toml b/greetd_ipc/Cargo.toml
index ea8dc02..e25265b 100644
--- a/greetd_ipc/Cargo.toml
+++ b/greetd_ipc/Cargo.toml
@@ -15,7 +15,7 @@ all-features = true
[features]
codec = ["thiserror"]
sync-codec = ["codec"]
tokio-codec = ["tokio", "async-trait"]
tokio-codec = ["codec", "tokio", "async-trait"]

[dependencies]
serde = { version = "1.0", features = ["derive"] }
-- 
2.26.2
Details
Message ID
<222eaf92c5fdbc20846a755abce448a0@kl.wtf>
In-Reply-To
<20200531165923.12978-1-r@gnzler.io> (view parent)
DKIM signature
pass
Download raw message
May 31, 2020 6:59 PM, "Robert Günzler" <r@gnzler.io> wrote:

> ---
> I'm trying to package for gentoo. Using the cargo eclass I get errors
> like this:
> 
> error[E0432]: unresolved import `greetd_ipc::codec`
> --> greetd/src/server.rs:17:5
> |
> 17 | codec::{Error as CodecError, TokioCodec},
> | ^^^^^ could not find `codec` in `greetd_ipc`
> 
> error[E0433]: failed to resolve: could not find `codec` in `greetd_ipc`
> --> greetd/src/error.rs:42:23
> |
> 42 | impl From<greetd_ipc::codec::Error> for Error {
> | ^^^^^ could not find `codec` in `greetd_ipc`
> 
> error[E0433]: failed to resolve: could not find `codec` in `greetd_ipc`
> --> greetd/src/error.rs:43:32
> |
> 43 | fn from(error: greetd_ipc::codec::Error) -> Self {
> | ^^^^^ could not find `codec` in `greetd_ipc`
> 
> error[E0433]: failed to resolve: could not find `codec` in `greetd_ipc`
> --> greetd/src/error.rs:45:25
> |
> 45 | greetd_ipc::codec::Error::Serialization(s) => Error::ProtocolError(s),
> | ^^^^^ could not find `codec` in `greetd_ipc`
> 
> error[E0433]: failed to resolve: could not find `codec` in `greetd_ipc`
> --> greetd/src/error.rs:46:25
> |
> 46 | greetd_ipc::codec::Error::Io(s) => Error::Io(s),
> | ^^^^^ could not find `codec` in `greetd_ipc`
> 
> error[E0433]: failed to resolve: could not find `codec` in `greetd_ipc`
> --> greetd/src/error.rs:47:25
> |
> 47 | greetd_ipc::codec::Error::Eof => Error::Io("EOF".to_string()),
> | ^^^^^ could not find `codec` in `greetd_ipc`
> 
> error[E0599]: no variant or associated item named `read_from` found for type `greetd_ipc::Request`
> in the current scope
> --> greetd/src/server.rs:54:34
> |
> 54 | let req = match Request::read_from(&mut s).await {
> | ^^^^^^^^^ variant or associated item not found in `greetd_ipc::Request`
> 
> error[E0599]: no method named `write_to` found for type `greetd_ipc::Response` in the current scope
> --> greetd/src/server.rs:75:14
> |
> 75 | resp.write_to(&mut s).await?;
> | ^^^^^^^^ method not found in `greetd_ipc::Response`
> 
> I considered just adding the "codec" feature to greetd, but I think the
> "tokio-codec" feature implies it is an extension of the "codec" one, so
> we should just include it automatically.
> 
> greetd_ipc/Cargo.toml | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/greetd_ipc/Cargo.toml b/greetd_ipc/Cargo.toml
> index ea8dc02..e25265b 100644
> --- a/greetd_ipc/Cargo.toml
> +++ b/greetd_ipc/Cargo.toml
> @@ -15,7 +15,7 @@ all-features = true
> [features]
> codec = ["thiserror"]
> sync-codec = ["codec"]
> -tokio-codec = ["tokio", "async-trait"]
> +tokio-codec = ["codec", "tokio", "async-trait"]
> 
> [dependencies]
> serde = { version = "1.0", features = ["derive"] }
> -- 
> 2.26.2


Applied, thanks!

- Kenny
Reply to thread Export thread (mbox)