lemunozm / message-io

Fast and easy-to-use event-driven network library.
Apache License 2.0
1.12k stars 75 forks source link

Packages contain code that will be rejected by a future version of Rust #131

Closed lexika979 closed 1 year ago

lexika979 commented 2 years ago

Hello, after adding message-io to new project and compiling, i got the following message:


warning: the following packages contain code that will be rejected by a future version of Rust: ntapi v0.3.7 note: To solve this problem, you can try the following approaches:

ntapi v0.3.7 has the following newer versions available: 0.4.0

note: this report can be shown with cargo report future-incompatibilities --id 4


It seems that just updating the dependency would fix this issue, in case it does not i would make a issue in their repo :)

lemunozm commented 2 years ago

Hi! I'm not able to check the error because I'm not in windows, and ntapi is only compiled there. I do not use this dependency directly in message-io, so it seems that there is any other dependency that includes that. I've updated all dependencies in this branch: dependencies-updated.

Could you please check if importing the updated version into your project still generates the issue? To address to this specific change in Cargo.toml:

message-io = { git = "https://github.com/lemunozm/message-io", branch = "dependencies-updated" }

Thanks!!

lexika979 commented 2 years ago

Unfortunately that didnt fix it :( I cant seem to track down the dependency in message-io that causes this, because of the limited output i am getting from cargo. Perhaps we could use a [patch] like in message-io to get rid of this like cargo suggested? That would (rather forcefully) get rid of the outdated dependency.

lexika979 commented 2 years ago

If thats a valid option i'd make a PR :)

lemunozm commented 2 years ago

To be honest I've never dealt with this problem, but if that patch works, I'm fine with the PR 😃

lexika979 commented 2 years ago

After trying to fix this i just noticed that i cannot [patch] the version of a dependency's dependency :( The only way to fix this is to actually track down what dependency includes ntapi and then file a PR/Issue there

lexika979 commented 2 years ago

I will try to track down the dependency if i have some free time, but at the moment i have lots of work to do so no idea when i will get around to doing it - I'll keep you updated

lemunozm commented 2 years ago

Thanks for the info 😃. One question, a cargo tree in Windows does not show the ntapi dependency somewhere?

sigmaSd commented 2 years ago

You can use cargo tree --target x86_64-pc-windows-gnu on linux, the dep is coming from mio image

Mio already have replaced those deps with windows-sys in latest version https://github.com/tokio-rs/mio/pull/1556

lemunozm commented 2 years ago

Thanks, @sigmaSd, for the advice! Seems like it's time to update mio to version 0.8. I'll try to get some time to do it.

garin1000 commented 1 year ago

Hi @lemunozm,

I just wanted to ask when you could release a message-io version with the updated dependency :-)

All that's really needed is changing the Cargo.toml to use mio 0.8, which I did locally. All message-io tests run fine, so does my application.

Thanks!

lemunozm commented 1 year ago

Done! Published version 0.14.7 with mio version 0.8

garin1000 commented 1 year ago

Thank you!! That was quick!