Skip to content
This repository was archived by the owner on Oct 23, 2022. It is now read-only.
This repository was archived by the owner on Oct 23, 2022. It is now read-only.

can not run example fetch_and_cat #513

Open
@conanchen

Description

@conanchen

Describe the bug

  1. When I tried to run the example as below:
    ❯ cargo run --example fetch_and_cat -- --default-bootstrappers bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi

To Reproduce
2. console log:
Blocking waiting for file lock on package cache
Blocking waiting for file lock on package cache
Blocking waiting for file lock on package cache
Compiling ipfs v0.2.1 (/Users/CC/github/rs-ipfs/rust-ipfs)
Finished dev [unoptimized + debuginfo] target(s) in 8.47s
Running target/debug/examples/fetch_and_cat --default-bootstrappers bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi
... restore_bootstrappers

Expected behavior
the example can fetch the file ( bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi ) from ipfs network:

Environment (please complete the following information)

  • macos
  • Rust version: rustc 1.66.0-nightly (a37499ae6 2022-09-18)

Additional context

  1. update the cargo.toml with latest dependencies e.g. libp2p with 0.48.0
  2. cargo run the example , there are compile errors
❯ cargo run --example fetch_and_cat -- --default-bootstrappers  bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi
   Compiling ipfs v0.2.1 (/Users/CC/github/rs-ipfs/rust-ipfs)
error[E0432]: unresolved import `libp2p::swarm::NetworkBehaviourEventProcess`
  --> src/p2p/behaviour.rs:19:39
   |
19 | use libp2p::swarm::{NetworkBehaviour, NetworkBehaviourEventProcess};
   |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `NetworkBehaviourEventProcess` in the root

error[E0432]: unresolved import `libp2p::core::connection::ListenerId`
  --> src/p2p/pubsub.rs:11:48
   |
11 |     connection::{ConnectedPoint, ConnectionId, ListenerId},
   |                                                ^^^^^^^^^^ no `ListenerId` in `connection`

error[E0432]: unresolved import `libp2p::tcp::TokioTcpConfig`
 --> src/p2p/transport.rs:9:5
  |
9 | use libp2p::tcp::TokioTcpConfig;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `TokioTcpConfig` in the root

error[E0432]: unresolved import `libp2p::core::connection::ListenerId`
  --> src/lib.rs:93:9
   |
93 |         connection::ListenerId, multiaddr::multiaddr, multiaddr::Protocol, Multiaddr, PeerId,
   |         ^^^^^^^^^^^^^^^^^^^^^^ no `ListenerId` in `connection`

For more information about this error, try `rustc --explain E0432`.
error: could not compile `ipfs` due to 4 previous errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions