-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Deriving NetworkBehaviour seems to be broken in 0.40.0 #2328
Comments
I was running into a similar issue. Solution for me was to group all ignored member fields.. |
You mean putting them into a separate struct so that only one field is marked with That didn't work for me. Of course it's possible I misunderstood your approach. |
With issue #2190 / the associated PR #2214 the
You can find more info on that in the docs: https://docs.rs/libp2p/0.40.0/libp2p/swarm/trait.NetworkBehaviour.html#deriving-networkbehaviour. Does this help? |
Thank you very much, this indeed explains the situation well. I wasn't aware that the Will try with |
@hamamo just to quickly correct myself: if you'd like to keep the old logic, you have to set it to |
Looks like one last thing was confusing me - rust-analyzer has some checks beyond what |
This applies the fix described in libp2p/rust-libp2p#2328 (comment)
When switching to libp2p 0.40.0, I get the following kind of error for every NetworkBehaviour that I compose using #[derive(NetworkBehaviour]:
Is this a known issue with 0.40.0? There are a number of changes documented in the various CHANGELOGs related to NetworkBehaviour, but I haven't been able to pinpoint where exactly I could find out what I need to change to make my code working again.
The text was updated successfully, but these errors were encountered: