-
Notifications
You must be signed in to change notification settings - Fork 163
Conversation
Signed-off-by: Matthias Beyer <[email protected]>
Signed-off-by: Matthias Beyer <[email protected]>
Thanks for looking into this! I'll try to find time to fix the build, and I'll continue approving this. Please log if you are hitting any difficult spots, that'd be good to know for me at least. |
Signed-off-by: Matthias Beyer <[email protected]>
So I fail to understand the issue here. The failures are missing implementations of I would like to learn, though, so maybe you can explain or guide me on my journey? |
I haven't yet looked what has been going on. From your mention of |
Yes, and the complexity of the API is so high that I completely fail to understand how everything works, especially given that I'm new to the whole topic. As said: I'd like to learn everything, though... so if you're okay with guiding me and effectively delaying this whole process (because I am learning the whole thing vs someone doing this who already knows what to do), I'd love to get this done and become more proficient during the process! 😆 |
I did try to look and the error message does look confusing nor did I see quickly anything from the changelogs. I need to jump on a call and such but I did notice you started the upgrade from the main/root/ipfs library crate. It might be easier (or it has been easier in the past) to first handle |
Ok having now tried upgrading just
After fixing up Sadly most of the libp2p upgrades are quite a lot of work if one hasn't been following every notification from the repository, which I've long since stopped, since it was quite overwhelming. However, we did try to add test coverage for the features we got working at one or another point, so once the rustc is satisfied you should be able to discover through the tests if any of our behavioural expectations have changed. This time around the road to that point just seems longer than usual. Please continue logging your progress and I'll try to find some time during the holidays to also look into this and helping you. |
👋 rust-libp2p maintainer here. Feel free to tag me with concrete questions related to rust-libp2p and the recent breaking changes. |
So I tried to update the The current error I get is:
Which I do not understand... the Maybe someone can educate me!? 😄 |
The type parameters of events: VecDeque<NetworkBehaviourAction<Message, BitswapEvent>>, should be events: VecDeque<NetworkBehaviourAction<BitswapEvent, OneShotHandler<BitswapConfig, Message, MessageWrapper>>>, -> Poll<NetworkBehaviourAction<<<Self::ProtocolsHandler as IntoProtocolsHandler>::Handler as ProtocolsHandler>::InEvent, Self::OutEvent>> should be -> Poll<NetworkBehaviourAction<Self::OutEvent, Self::ProtocolsHandler>> Does that help @matthiasbeyer? |
It did! Can you please tell me in a few short sentences what I am implementing here, maybe I understand what to do myself (no hurry though)! My current code:
We can also switch to email or another communication channel if you want, so we do not spam this issue here! 😆 |
For now you can just call
A handler implements the
I prefer this issue as (a) others can follow along and help and (b) it might be helpful for others. |
Ah, saw your comment too late and figured out a way to construct a new The remaining bits is just some issue in the error type I will take care of myself. |
Hello, I've recently started work on updating the crate to use libp2p v0.43.0 due to a build error when I try error[E0282]: type annotations needed
--> /home/xxx/.cargo/registry/src/github.com-1ecc6299db9ec823/libp2p-noise-0.32.0/src/protocol/x25519.rs:221:45
|
221 | curve25519_sk.copy_from_slice(&hash.as_ref()[..32]);
| -----^^^^^^--
| | |
| | cannot infer type for type parameter `T` declared on the trait `AsRef`
| this method call resolves to `&T`
|
= note: type must be known at this point
For more information about this error, try `rustc --explain E0282`. I got through all the type renames and then hit this error like I assume you have: error[E0277]: the trait bound `Void: ConnectionHandler` is not satisfied
--> src/p2p/pubsub.rs:305:15
|
305 | ) -> Poll<PubsubNetworkBehaviourAction> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `ConnectionHandler` is not implemented for `Void`
|
= note: required because of the requirements on the impl of `IntoConnectionHandler` for `Void` I scrubbed through the documentation and found that Sorry if this is unnecessary, @mxinden any thoughts? EDIT: |
|
Thanks for your efforts @matthiasbeyer. Closing this now that #499 has been merged. |
Update libp2p to 0.40.0 and then to 0.41.0
This is my take on #483 - as I am still learning how everything works (and this seems like a non-trivial change), I'd love to get some guidance on this PR!
Checklist (can be deleted from PR description once items are checked)