1018 Commits

Author SHA1 Message Date
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
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
Joonas Koivunen
a94536b882 refactor: revert unneeded change 2020-08-14 10:19:56 +03:00
Joonas Koivunen
9f979effcb refactor: revert unnecessary match changes 2020-08-14 10:19:53 +03:00
Joonas Koivunen
a5e3bbbb98 refactor: reorder InnerEntry, Kind 2020-08-14 10:19:53 +03:00
Joonas Koivunen
4ba9a74b7a refactor: revert unnecessary visibility 2020-08-14 10:19:49 +03:00
Joonas Koivunen
e5e43e4322 refactor: reorder back link conversions 2020-08-14 09:40:08 +03:00
Joonas Koivunen
9f3ab40dcd refactor: reorder back ContinuedWalk, FileSegment, Error 2020-08-14 09:39:18 +03:00
bors[bot]
42e4b530cd
Merge #311
311: Remove unneccesary Jekyll file r=koivunej a=aphelionz

This PR removes the _config.yml file, which is not needed since the website content lives in other repos.

Co-authored-by: Mark Robert Henderson <henderson.mark@gmail.com>
2020-08-14 06:19:32 +00:00
Mark Robert Henderson
f77e9ca0ce
Remove unneccesary Jekyll file
This PR removes the _config.yml file, which is not needed since the website content lives in other repos.
2020-08-13 14:30:09 -04:00
bors[bot]
c085dae091
Merge #310
310: doc: update contributing, minimal patches r=ljedrz a=koivunej

I think the build time should become apparent right away for anyone trying to develop, at least when GHA tries it.

Co-authored-by: Joonas Koivunen <joonas@equilibrium.co>
2020-08-13 17:13:37 +00:00
Joonas Koivunen
811bc61838 doc: add example on two PRs 2020-08-13 19:50:44 +03:00
Joonas Koivunen
d1d8bc0df1 doc: update contributing, minimal patches 2020-08-13 19:47:09 +03:00
bors[bot]
b3e5650e6a
Merge #305 #309
305: Add a subscription stress test r=koivunej a=ljedrz

`#[ignore]`d by default; it currently works pretty well for a reasonable amount of time.

309: make the retrying loop in wantlist_cancellation less busy r=koivunej a=ljedrz

This might help the rare errors thrown by the `bounded_retry` test function that might be a bit too busy at times.

Also, reduce the delay for `timeout(duration, pending::<()>())` calls and increase the one for `bounded_retry` ones.

Co-authored-by: ljedrz <ljedrz@gmail.com>
2020-08-13 16:36:40 +00:00
bors[bot]
11ac130c3b
Merge #308
308: cargo update; remove unused rand feature r=koivunej a=ljedrz

Just a maintenance update to `Cargo.lock` via `cargo update` so that actual later dependency additions or deletions don't cause unrelated changes to it.

Co-authored-by: ljedrz <ljedrz@gmail.com>
2020-08-13 16:14:15 +00:00
ljedrz
4154980dbe chore: remove a stray old libipld dep
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-13 18:08:48 +02:00
ljedrz
a070ca13d0 fix: make the retrying loop in wantlist_cancellation less busy
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-13 18:00:28 +02:00
ljedrz
42da57f419 fix: change async_std to tokio
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-13 17:50:06 +02:00
ljedrz
b08c78d587 test: tweak the subscription stress test
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-13 17:31:37 +02:00
ljedrz
c8b885acd2 docs: document the subscription stress test
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-13 17:31:37 +02:00
ljedrz
10bfeac0bf feat: add a subscription stress test
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-13 17:31:37 +02:00
ljedrz
0c100175bd chore: cargo update, remove unused rand feature
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-13 17:24:19 +02:00
bors[bot]
143c3dad93
Merge #307
307: Use tokio instead of async_std r=koivunej a=ljedrz

We already use it in `ipfs-http`, our dependencies either already use it or are compatible with it and it has some nice features that we'd like to use.

Note: the `async` tests now specify `max_threads = 1` in order to make sure the multi-threaded executor is not being lenient about any hidden bugs.

fixes https://github.com/rs-ipfs/rust-ipfs/issues/275

Co-authored-by: ljedrz <ljedrz@gmail.com>
2020-08-13 15:04:45 +00:00
ljedrz
7ff0a3ccfb fix: ignore resolve tests due to Windows errors
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-13 16:47:10 +02:00
ljedrz
c930f651fd test: make async tests use only 1 thread
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-13 16:16:20 +02:00
ljedrz
4001e01a44 refactor: remove unused tokio features
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-13 16:15:47 +02:00
ljedrz
9e26bffbba chore: cargo clippy
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-13 16:15:47 +02:00
ljedrz
398aa58877 chore: import reordering with cargo fmt
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-13 16:15:45 +02:00
ljedrz
8be75f7a4a feat: change the async executor to tokio
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-13 16:15:14 +02:00
bors[bot]
4c90dd15a9
Merge #306
306: Cleanup old unixfs api r=koivunej a=koivunej

This removes the previous API of:

* ipfs::Ipfs::add
* ipfs::ipfs::get
* ipfs::unixfs::File

Rationale for the removal is that ipfs-unixfs (under `unixfs/`, re-exported as `ipfs::unixfs::ll`) provides ability to do the similar use cases more or less. It does not however, provide means to have a nice api and persist stuff in an async way which is something we are lacking at the moment. I will probably file an issue for this API deficiency once I am through this.

Co-authored-by: Joonas Koivunen <joonas@equilibrium.co>
2020-08-13 13:54:51 +00:00
Joonas Koivunen
7dd466953e refactor: clippy 2020-08-13 16:48:54 +03:00
Joonas Koivunen
ac149f4813 fix: update test case
there was a discrepency with the old and new way which took some time to
realize. if this destroys anyones workflow I hope we can find a way to
accomondiate you :)
2020-08-13 16:26:32 +03:00
Caio
457cd428fa Remove inconsistent variants 2020-08-13 10:24:35 -03:00
Joonas Koivunen
b5e79da0a6 fix: remove old single block unixfs api 2020-08-13 14:24:56 +03:00
bors[bot]
fbf4d55100
Merge #300
300: use noise authentication with the XX handshake r=koivunej a=ljedrz

The new `0.23` release of `libp2p` seems to have fixed the `noise` incompatibility issues with `go-ipfs`, so update it, drop `SECIO` and use `noise-xx` instead.

While I've successfully tested this both ways against a `go-ipfs-0.6` node, an extra manual test won't hurt 😉.

fixes https://github.com/rs-ipfs/rust-ipfs/issues/75
fixes https://github.com/rs-ipfs/rust-ipfs/issues/175

Co-authored-by: ljedrz <ljedrz@gmail.com>
2020-08-12 13:46:16 +00:00
bors[bot]
b17aae2c06
Merge #304
304: Work around the rare zero wakers CI failure r=koivunej a=ljedrz

As far as I can tell this only happens to Kademlia queries and thus might be a `libp2p` bug; disable the sanity debug check for them to verify it.

Also, remove an outdated comment as a drive-by.

Co-authored-by: ljedrz <ljedrz@gmail.com>
2020-08-12 13:26:09 +00:00
ljedrz
8eab625653 fix: exclude KadQueries from the debug_assert in subscription
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-08-12 13:58:38 +02:00