~kennylevinsen/greetd

Make sure to require codec in tokio-codec feature v1 APPLIED

Robert Günzler: 1
 Make sure to require codec in tokio-codec feature

 1 files changed, 1 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~kennylevinsen/greetd/patches/10860/mbox | git am -3
Learn more about email & git
View this thread in the archives

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

---
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




May 31, 2020 6:59 PM, "Robert Günzler" <r@gnzler.io> wrote: