museun / twitchchat

interface to the irc portion of Twitch's chat
Apache License 2.0
103 stars 23 forks source link

Error when updating to 0.13.2 #199

Closed bdashore3 closed 4 years ago

bdashore3 commented 4 years ago

Hi, I'm getting this error and just recently updated the lib to 0.13.2 in my cargo.toml

https://del.dog/bestotocke.txt

bdashore3 commented 4 years ago

Ok, so I figured out the reason, I have to include futures-lite in my cargo.toml and cargo check works. Can you include this within dependencies?

museun commented 4 years ago

It seems futures-lite feature gated those traits in a recent update.

I don't know why the tests didn't catch it. I've fixed it in 36ccccc

tAq5Z6eE commented 4 years ago

It looks like the same error has been re-introduced by https://github.com/museun/twitchchat/commit/9f33ac41149af6bfabc6bf02446d903590fa2fd1.

museun commented 4 years ago

Are you using (atleast) features = [ "async" ]?

tAq5Z6eE commented 4 years ago

Yes, I’m using

[dependencies]
twitchchat = { version = "0.14.3", features = ["async", "tokio", "tokio-util"] }

in my Cargo.toml.

museun commented 4 years ago

So, this is actually a bug in cargo. If I were to build the crate with this features it works.

This happened a while with #84

I guess I should have an external crate that uses this one in the various features configurations to ensure the breakages are caught before publication.

And its technically fixed on nightly: https://github.com/rust-lang/cargo/issues/1796#issuecomment-590385586

(The problem is that features from dev-dependencies will 'leak' out and cargo will unify both dev and normal deps when its expanding to find the 'widest' feature set among all related crates)

But until then I'll be a bit more diligent about it.

museun commented 4 years ago

and I just published a new release that fixes this. I'll make a mental note to do the external feature testing before publishing next time.