Commit Graph

1103 Commits

Author SHA1 Message Date
bors[bot]
76ec8bfce7
Merge #317
317: Conformance test suite updates r=koivunej a=ljedrz

`package.json` updates:
```
"interface-ipfs-core": "0.137.0" > "0.139.0"
"ipfs-http-client":    "^44.3.0" > "46.0.0"
"ipfs":                "^0.43.0" > "0.49.0"
```

The new version of the conformance test suite requires 2 new `/version` fields (blank for now) and a patch for one of the `add` tests (as we don't expose `/files` yet). ~~It also allows us to transition the `Repo` to only keep `Multihash`es instead of `Cid`s, as `refs_local` is expected to return `Cid v1` with `Codec::Raw`, which can be produced on the fly.~~ (deferred)

Co-authored-by: ljedrz <ljedrz@gmail.com>
2020-08-18 16:35:55 +00:00
ljedrz
dcae04f6e2 feat: extended Multiaddr wrapper error handling
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-18 16:04:37 +02:00
ljedrz
10639a614a chore: move a test between modules
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-18 15:59:51 +02:00
ljedrz
4599fff709 feat: introduce a custom error for the Multiaddr wrappers
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-18 15:59:51 +02:00
ljedrz
437f66d161 fix: patch add.js
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-18 14:58:25 +02:00
ljedrz
be8ba44e58 chore: update the conformance suite dependencies
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-18 14:58:25 +02:00
ljedrz
e119d25add feat: add extra /version fields
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-18 14:58:25 +02:00
bors[bot]
31f211cf21
Merge #316
316: Clippy r=koivunej a=c410-f3r

Fixes a couple of Clippy issues and ensures on CI that these problems won't happen again in the future

Co-authored-by: Caio <c410.f3r@gmail.com>
2020-08-18 06:11:17 +00:00
Caio
ffde6a3d03 Clippy 2020-08-17 12:27:49 -03:00
ljedrz
c0389bf684 chore: move the Multiaddr wrappers to their own module
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-17 16:13:57 +02:00
ljedrz
c4435c8c94 chore: rename MultiaddrWoPeerId to MultiaddrWithoutPeerId
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-17 16:02:16 +02:00
ljedrz
6e8dff0bb7 feat: utilize the new Multiaddr wrappers 2020-08-17 15:51:26 +02:00
ljedrz
1a55f27f55 feat: introduce MultiaddrWithPeerId and MultihashWoPeerId
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-17 13:25:24 +02:00
bors[bot]
99697a2de0
Merge #314
314: Use instrument instead of in_scope in lib r=koivunej a=ljedrz

Apparently `Span::in_scope` is just:
```
pub fn in_scope<F: FnOnce() -> T, T>(&self, f: F) -> T {
    let _enter = self.enter();
    f()
}
```
and `Span::enter` is a no-no in `async` contexts.

Co-authored-by: ljedrz <ljedrz@gmail.com>
2020-08-17 10:24:26 +00:00
ljedrz
6ca12a7401 fix: use instrument instead of in_scope in lib
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-17 12:23:29 +02:00
bors[bot]
aaf72c9ed4
Merge #110
110: add: p2p suffixes to multiaddrs from identify r=koivunej a=koivunej

not verified but indirectly used by the conformance tests when dialing a peer with an expected peerid.

Not 100% sure if this should be done, at least long as #105 is done at least to accept the multiaddrs with `/p2p/`.

Co-authored-by: Joonas Koivunen <joonas@equilibrium.co>
Co-authored-by: ljedrz <ljedrz@gmail.com>
2020-08-17 09:56:40 +00:00
ljedrz
20912e50f9 fix: ensure the Multiaddr contains the P2p protocol in Ipfs::connect
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-17 10:43:00 +02:00
ljedrz
7e1047f517 docs: note about the P2p protocol suffix returned by Ipfs::identity
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-17 10:43:00 +02:00
ljedrz
a02eedf10b refactor: remove append_p2p in /id
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-17 10:36:36 +02:00
ljedrz
2c4fbe8c1b fix: remove Ipfs::peer_id, add a connection test, dont add Protocol::P2p in IpfsEvents
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-17 09:01:49 +02:00
bors[bot]
c41b564b06
Merge #313
313: Prepare unixfs release v0.1.0 r=koivunej a=koivunej

Per semver the next must be a minor bump at least. While I don't have a concrete path forward to 1.0 in mind for this crate I am sure we'll be doing smaller bits and bobs soon as we approach a rust-ipfs release as well.

Co-authored-by: Joonas Koivunen <joonas@equilibrium.co>
Co-authored-by: Joonas Koivunen <joonas.koivunen@gmail.com>
2020-08-14 15:52:44 +00:00
Joonas Koivunen
ff8824c2ea chore: update lockfile following version bump 2020-08-14 18:52:00 +03:00
ljedrz
eb88977532 perf: only finish connection subscripitons if we were the ones to dial
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-14 16:29:57 +02:00
ljedrz
993b80d2d1 fix: disallow Multiaddrs without the P2p protocol
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-14 16:19:56 +02:00
Joonas Koivunen
da316aec33
doc: suggestions from code review
Co-authored-by: ljedrz <ljedrz@users.noreply.github.com>
2020-08-14 16:29:16 +03:00
Joonas Koivunen
42e1d5309d doc: minor touchups
tried to look into how should the links be done today but I guess there
are still some nightly shenanigans so cannot really preview before
publishing.
2020-08-14 16:00:29 +03:00
Joonas Koivunen
3176976ba2 doc: revisit file.rs docs 2020-08-14 15:51:35 +03:00
Joonas Koivunen
b671a767f1 doc: unify top-level mod summaries 2020-08-14 15:49:20 +03:00
Joonas Koivunen
b495c57a1f chore: update README.md 2020-08-14 15:47:20 +03:00
Joonas Koivunen
2a68d04a81 chore: use correct PR for unixfs symlinks 2020-08-14 15:23:03 +03:00
Joonas Koivunen
1e79d9e81d chore: bump unixfs 0.1.0 2020-08-14 15:18:16 +03:00
Joonas Koivunen
472471f282 chore: update CHANGELOG 2020-08-14 15:18:16 +03:00
ljedrz
047eb84fb0 fix: remove ConnectionTarget::PeerIdWithAddr, extend Multiaddr instead
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-14 14:16:10 +02:00
bors[bot]
d977e98bc0
Merge #302
302: feat: unixfs symlink creation r=koivunej a=koivunej

The minimal API and perhaps too verbose test cases around the feature. While I did check the cids to match some go-ipfs version cids, I think there might still be corner cases around even this very minimal API.

Co-authored-by: Joonas Koivunen <joonas@equilibrium.co>
2020-08-14 11:58:55 +00:00
Joonas Koivunen
a6728b58c7 fix: use latest walker api 2020-08-14 14:54:50 +03:00
Joonas Koivunen
3dd7caf01c add: quite verbose test cases around symlinks 2020-08-14 14:40:21 +03:00
Joonas Koivunen
d505fdf284 feat: serialization of symlink blocks 2020-08-14 14:40:21 +03:00
bors[bot]
d2760bb4d5
Merge #294
294: Remove Walker indirection r=koivunej a=c410-f3r

Fixes #200.

By using mutable references instead of taking ownership, the following is now possible:

```rust
ContinuedWalk::Symlink(bytes, _, path, metadata) => {
  ...
}

// Instead of

ContinuedWalk::Symlink(bytes, item) => {
  if let Entry::Metadata(metadata_entry) = item.as_entry() {
    ...
  }
}
```

Co-authored-by: Caio <c410.f3r@gmail.com>
Co-authored-by: Joonas Koivunen <joonas@equilibrium.co>
2020-08-14 11:36:11 +00:00
Caio
38d90582de
Merge pull request #1 from koivunej/restore-unwraps
Minimize 'unwraps'
2020-08-14 07:52:49 -03:00
bors[bot]
04c4e055ab
Merge #312
312: More maintenance r=koivunej a=ljedrz

I decided to take a closer look on the features enabled in our dependencies and to the deps themselves and found a few more bits to tweak. Always nice to see some red in `Cargo.lock`.

Co-authored-by: ljedrz <ljedrz@gmail.com>
2020-08-14 09:53:26 +00:00
ljedrz
e2a2b5abcb chore: future(/feature)-proof the criterion dep
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-14 11:30:20 +02:00
ljedrz
e251a2de29 chore: remove unused async-trait dep in bitswap
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-14 11:26:36 +02:00
ljedrz
3dac76603f chore: remove unused futures features
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-14 11:14:30 +02:00
Joonas Koivunen
3f743f2774 chore: cargo fmt 2020-08-14 11:01:58 +02:00
Joonas Koivunen
0a5c730477 add: p2p suffixes to multiaddrs from identify
not verified but indirectly used by the conformance tests when dialing a
peer with an expected peerid.
2020-08-14 11:01:58 +02:00
Joonas Koivunen
d2ea05f64a doc: update comments regarding buckets 2020-08-14 10:32:10 +03:00
Joonas Koivunen
e129973e03 refactor: restore custom fmt::Debug for InnerEntry
this needs to follow Cid as we don't really need the Cid's fmt::Debug
impl.
2020-08-14 10:32:10 +03:00
Joonas Koivunen
59deeca4ae doc: remove completed FIXME 2020-08-14 10:26:33 +03:00
Joonas Koivunen
7c50ce435a doc: update comments 2020-08-14 10:23:03 +03:00
Joonas Koivunen
e300e149dc refactor: remove unnecessary lifetime 2020-08-14 10:19:56 +03:00