Caio
1f8cd25fd9
Split Entry into two different enums
2020-07-31 08:39:47 -03:00
Caio
eb99452664
Remove unwrap usage in continue_walk
2020-07-28 15:04:41 -03:00
ljedrz
3b6ad52d85
chore: update remaining deps
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-07-28 13:44:45 +02:00
ljedrz
cc26f40d14
feat: update libp2p again
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-07-21 14:50:06 +02:00
ljedrz
88c7219790
feat: update some dependencies
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-07-21 10:31:55 +02:00
Joonas Koivunen
fedf176e3d
fix: full link block generation
...
this included making the compression to loop on the lower level, making
the algorithm in place modifying instead of draining (and thus moving
yet to be processed links). added comments and asserts as well.
Co-authored-by: ljedrz <ljedrz@users.noreply.github.com>
2020-07-17 18:00:35 +03:00
Joonas Koivunen
27068d1e4e
fix: Link was missing fmt::Debug
2020-07-17 15:38:54 +03:00
Joonas Koivunen
41b188d781
fix: avoid undeflow in LinkFormatter
2020-07-17 15:38:32 +03:00
Joonas Koivunen
d8a657a935
chore: ignore failing test, refer to bug
2020-07-16 10:18:07 +03:00
Joonas Koivunen
745f005cde
fix: remove magic from full_link_block
...
174 == default balanced branching_factor
2020-07-16 10:18:07 +03:00
Joonas Koivunen
af3753e25e
test: discovered new failing adder test case
2020-07-14 16:09:19 +03:00
Joonas Koivunen
2553de32de
refactor: go back to moving builder
2020-07-03 12:20:58 +03:00
Joonas Koivunen
2d31efafb2
chore: changelog
2020-07-03 12:20:58 +03:00
Joonas Koivunen
77657806d7
doc: enhance, document lore, suggestions
...
Co-authored-by: ljedrz <ljedrz@users.noreply.github.com>
2020-07-03 12:20:58 +03:00
Joonas Koivunen
13e5036126
refactor: use Default::default() struct init
2020-07-03 12:20:58 +03:00
Joonas Koivunen
28065973ad
refactor: name the 4-tuple as Link
2020-07-03 12:20:58 +03:00
Joonas Koivunen
a409095509
doc: suggestions from code review
...
Co-authored-by: ljedrz <ljedrz@users.noreply.github.com>
2020-07-03 12:20:58 +03:00
Joonas Koivunen
c47bfc1933
fix: debug intermediate levels as well
2020-07-03 12:20:58 +03:00
Joonas Koivunen
8912649d1d
chore: clippy warning
2020-07-03 12:20:58 +03:00
Joonas Koivunen
0ff594c156
refactor: complicate/simplify link debugging
2020-07-03 12:20:58 +03:00
Joonas Koivunen
e24eb1c97e
refactor: remove unused result return type
2020-07-03 12:20:58 +03:00
Joonas Koivunen
d3bd086d43
add: FileAdderBuilder and enhanced docs
2020-07-03 12:20:58 +03:00
Joonas Koivunen
eb3a0bb844
refactor: allow one less copy with prechunked input
2020-07-03 12:20:58 +03:00
Joonas Koivunen
1c4f59a3e7
fix: do less work to speed up test
2020-07-03 12:20:58 +03:00
Joonas Koivunen
c13bd36dcc
refactor: collector out of the adder
2020-07-03 12:20:58 +03:00
Joonas Koivunen
7bddf33313
refactor: simplify link flushing
2020-07-03 12:20:58 +03:00
Joonas Koivunen
bdeefb0d85
doc: adjust comments
2020-07-03 12:20:58 +03:00
Joonas Koivunen
791b0334d9
perf: reuse links and blocksizes
...
no noticeable changes in benchmarks
2020-07-03 12:20:58 +03:00
Joonas Koivunen
15073666b1
fix: the 174*256*1024 + 1 case
2020-07-03 12:20:58 +03:00
Joonas Koivunen
ae1976b3f3
add: failing test case
2020-07-03 12:20:58 +03:00
Joonas Koivunen
fec28f6422
chore: rustfmt
2020-07-03 12:20:58 +03:00
Joonas Koivunen
bf9ec07d04
fix: produce block for empty files
2020-07-03 12:20:58 +03:00
Joonas Koivunen
8310df38af
chore: remove mistakenly added ignore
2020-07-03 12:20:58 +03:00
Joonas Koivunen
89387c475e
refactor: update comments, reorder uses
2020-07-03 12:20:58 +03:00
Joonas Koivunen
f6e78c3ff7
refactor: move file adder under file
2020-07-03 12:20:58 +03:00
Joonas Koivunen
153d6e52ec
doc: file adder
2020-07-03 12:20:58 +03:00
Joonas Koivunen
8d0422ba35
fix: example cidv1 output, buffer to size hint
2020-07-03 12:20:58 +03:00
Joonas Koivunen
4444a2301d
fix: add FileAdder impl Debug
2020-07-03 12:20:58 +03:00
Joonas Koivunen
b5868ee3e8
refactor: remove indentation level
2020-07-03 12:20:58 +03:00
Joonas Koivunen
c54118f324
test: more tests to catch the chunking issue
2020-07-03 12:20:53 +03:00
Joonas Koivunen
9ece3b943f
test: add test case for three layers
2020-07-03 12:20:31 +03:00
Joonas Koivunen
587fd14461
add: examples/add.rs, still bad output
2020-07-03 12:20:31 +03:00
Joonas Koivunen
6498436ae8
chore: make sha2 and multihash !dev deps
...
they are needed in the adder to create links.
2020-07-03 12:20:31 +03:00
Joonas Koivunen
36ad14b127
feat: initial file adder
...
Should be fixable to create trees for files.
2020-07-03 12:20:31 +03:00
ljedrz
e8aa5cb72d
fix: remove ignored auto-generated attributes
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-06-29 10:18:21 +02:00
ljedrz
01f58dd541
fix: cargo fmt
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-06-26 16:13:37 +02:00
ljedrz
8a942adf3e
refactor: use a type alias for file visit results
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-06-26 15:11:05 +02:00
Joonas Koivunen
87e02703de
chore: update CHANGELOG
2020-06-24 10:38:19 +03:00
Joonas Koivunen
8ef1811f14
refactor: remove/cfg(test) unused of FileReader
2020-06-24 10:25:39 +03:00
Joonas Koivunen
79d6e8c680
fix: hide file::reader
...
Fixes #202 . Apparently this can fail compilation on 1.44. The content
method on FileReader exposes a non-public item through impl
Iterator<Item = (..., non_pub_here)> but still the error is about
lifetime capture.
2020-06-24 10:22:17 +03:00
Joonas Koivunen
e19677ae01
add(unixfs): repository, description, readme
2020-06-18 20:41:32 +03:00
Joonas Koivunen
be1d3b3891
refactor(unixfs): drop unused tar dependency
2020-06-18 20:24:57 +03:00
Joonas Koivunen
9835da8f08
add(unixfs): initial CHANGELOG.md
2020-06-18 20:24:57 +03:00
Joonas Koivunen
740c5f1cd7
chore(unixfs): README, license notes, set version to 0.0.1
2020-06-18 20:24:57 +03:00
Joonas Koivunen
a867cc8e28
chore: cargo fmt
2020-06-17 23:09:05 +03:00
Joonas Koivunen
baa78d6098
fix: forgotten unused error variant (File)
2020-06-17 22:10:42 +03:00
Joonas Koivunen
cc2239abbb
fix: warnings on ipfs_unixfs::walk
2020-06-17 22:09:52 +03:00
Joonas Koivunen
1479b5022a
fix: remove lint suppressions
2020-06-17 22:09:02 +03:00
Joonas Koivunen
0c5ad592a7
doc: add missing "for"
...
Co-authored-by: ljedrz <ljedrz@users.noreply.github.com>
2020-06-17 17:27:05 +03:00
Joonas Koivunen
a6167fc556
chore: cargo fmt
2020-06-17 17:27:05 +03:00
Joonas Koivunen
c70320dd6c
refactor: suggestions from code review
...
docs, comments and minor API changes again.
Co-authored-by: ljedrz <ljedrz@users.noreply.github.com>
2020-06-17 17:27:05 +03:00
Joonas Koivunen
b43ec1e9b2
refactor: solidify link conversion
2020-06-17 17:27:05 +03:00
Joonas Koivunen
629e3388b8
refactor: unify InnerKind, switch todos to unreachable
2020-06-17 17:27:05 +03:00
Joonas Koivunen
ee8cab71d9
fix: remove dead code on bucket -> bucket transitions
2020-06-17 17:27:05 +03:00
Joonas Koivunen
7b7ddbbe2b
fix: add back self.depth assertions in set_path
2020-06-17 17:27:05 +03:00
Joonas Koivunen
3bfa506f69
refactor: suggestions from code review
...
Including mostly comment fixes and removal of an extra &mut.
Co-authored-by: ljedrz <ljedrz@users.noreply.github.com>
2020-06-17 17:27:05 +03:00
Joonas Koivunen
0d2dd477e9
doc: refresh and check out cargo docs
2020-06-17 17:27:05 +03:00
Joonas Koivunen
ed8a2c3d66
doc: update unixfs/README.md and docs
...
added hints about users preferring to use `ipfs_unixfs::walk::Walker`.
2020-06-17 17:27:05 +03:00
Joonas Koivunen
bfd8722ae4
refactor: rename dir submodule to directory
...
also the file was forgotten.
2020-06-17 17:27:05 +03:00
Joonas Koivunen
6be2556341
chore: cargo fmt
2020-06-17 17:27:05 +03:00
Joonas Koivunen
1d50a5195c
fix: check dirs and hamtshards supported
...
this is probably being overly strict but at least there will not be any
misunderstandings.
2020-06-17 17:27:05 +03:00
Joonas Koivunen
d589e90160
refactor(unix): split test_support with FakeBlockstore
2020-06-17 17:27:05 +03:00
Joonas Koivunen
9b75c16143
fix(unixfs/ex): simplify get back to listing
2020-06-17 17:27:05 +03:00
Joonas Koivunen
9151834ba3
chore: cleanup warnings, fmt
2020-06-17 17:27:05 +03:00
Joonas Koivunen
f3f9f26c9b
refactor: remove unused code
2020-06-17 17:27:05 +03:00
Joonas Koivunen
7983fcf3b0
chore: cargo fmt
2020-06-17 17:27:05 +03:00
Joonas Koivunen
062468c108
add: test case for checking filesegments
2020-06-17 17:27:05 +03:00
Joonas Koivunen
6a96593866
refactor: make Walker easier to use
...
turns out the internal structure almost supported this already, but
`self.current` needed to be done an Option.
2020-06-17 17:27:05 +03:00
Joonas Koivunen
f71c212edd
chore: fmt and clippy warnings
2020-06-17 17:27:05 +03:00
Joonas Koivunen
948eeff48f
refactor: rename FileMetadata to ipfs_unixfs::Metadata
2020-06-17 17:27:05 +03:00
Joonas Koivunen
9b18427e16
refactor: move ipfs_unixfs::dir::walk to top level
2020-06-17 17:27:05 +03:00
Joonas Koivunen
d61b0424d8
fix: use errors instead of unwraps in /get as well
2020-06-17 17:27:05 +03:00
Joonas Koivunen
d16a2645f6
fix: errors during walking
2020-06-17 17:27:05 +03:00
Joonas Koivunen
fcdf59aac8
doc: document public members
2020-06-17 17:27:05 +03:00
Joonas Koivunen
91635181c4
refactor: remove home-grown Either
2020-06-17 17:27:05 +03:00
Joonas Koivunen
f37974a19d
doc: document Walker and friends
2020-06-17 17:27:05 +03:00
Joonas Koivunen
1e0dd4e93e
add(unixfs): sharded to non-sharded resolving test
2020-06-17 17:27:05 +03:00
Joonas Koivunen
81233dd82a
add: top level symlink support
2020-06-17 17:27:05 +03:00
Joonas Koivunen
08fa4c77f5
add: top level file support
2020-06-17 17:27:05 +03:00
Joonas Koivunen
182da8d3d6
add root level test cases
2020-06-17 17:27:05 +03:00
Joonas Koivunen
585b521606
refactor: split two scenario tests
2020-06-17 17:27:05 +03:00
Joonas Koivunen
5e369241db
refactor: prettify tests
2020-06-17 17:27:05 +03:00
Joonas Koivunen
6255f3c650
fix: root paths for dirs and sharded
2020-06-17 17:27:05 +03:00
Joonas Koivunen
c61d55d940
fix: start now returns ContinuedWalk, root name
2020-06-17 17:27:05 +03:00
Joonas Koivunen
6671e74113
feat: /get http endpoint
...
does not at all pass any tests. we need to add a root path param, which
will be a string version of the requested Cid for the http api. Also,
with this, it becomes possible to hide everything (files, symlinks)
under a single walk api.
2020-06-17 17:26:39 +03:00
Joonas Koivunen
dafbf4915e
wip: add symlinks and hamt sharded dirs
2020-06-17 17:26:39 +03:00
Joonas Koivunen
769ae5bb07
feat: keep track of file size
...
it would probably be enough to just give it out on the first iteration,
maybe?
2020-06-17 17:26:39 +03:00
Joonas Koivunen
02b5a47a31
add: metadata to filetime conversion
2020-06-17 17:26:39 +03:00
Joonas Koivunen
795a34fd46
doc: add note regarding utf8
2020-06-17 17:26:39 +03:00
Joonas Koivunen
c1a0943559
wip: sneak in most of the private parts of tar-rs
2020-06-17 17:26:39 +03:00
Joonas Koivunen
1d572be498
add Entry::metadata
2020-06-17 17:26:39 +03:00
Joonas Koivunen
d2dc47520a
add FileSegment::total_file_size
2020-06-17 17:26:39 +03:00
Joonas Koivunen
281f63fb3f
doc: Entry::path
2020-06-17 17:24:23 +03:00
Joonas Koivunen
b7b3d12036
add tar dependency
2020-06-17 17:24:23 +03:00
Joonas Koivunen
eec4598c90
doc: apply suggestions from code review
...
Co-authored-by: ljedrz <ljedrz@users.noreply.github.com>
2020-06-17 17:24:23 +03:00
Joonas Koivunen
72f68871ef
fix: bad FileSegment::is_last, reorg, comments
...
commenting on a missing test case, some magic number explanations.
2020-06-17 17:24:23 +03:00
Joonas Koivunen
306b10eb0b
refactor: simplify dir walk start
2020-06-17 17:24:23 +03:00
Joonas Koivunen
3a4e2fca5d
feat: walk empty root directories
2020-06-17 17:24:23 +03:00
Joonas Koivunen
27df6119d3
refactor: simplify copypasted parts
2020-06-17 17:24:23 +03:00
Joonas Koivunen
98007109a6
wip: update skipping story
2020-06-17 17:24:23 +03:00
Joonas Koivunen
c5e3949697
refactor: path name recycling
2020-06-17 17:24:23 +03:00
Joonas Koivunen
1367e50f59
refactor: FileSegment to struct
...
instead of destructing perhaps provide sometimes useful getters
2020-06-17 17:24:23 +03:00
Joonas Koivunen
d74a9bed0f
refactor: dry unixfs/examples/get
2020-06-17 17:24:23 +03:00
Joonas Koivunen
1c2981b73c
feat: print sha256 in examples/get.rs
2020-06-17 17:24:23 +03:00
Joonas Koivunen
7590da67f3
feat: make different file segments easier to distinguish
2020-06-17 17:24:23 +03:00
Joonas Koivunen
d62da31a62
add: unixfs/examples/get.rs
...
the example will list all files in the tree and visit them.
2020-06-17 17:24:23 +03:00
Joonas Koivunen
5ac211f844
feat: filevisit vec caching
2020-06-17 17:24:23 +03:00
Joonas Koivunen
823f207a02
feat: add prorotype of walking over all unixfs
2020-06-17 17:24:11 +03:00
Joonas Koivunen
e43008f37d
doc: fix comment
2020-06-11 19:10:46 +03:00
Joonas Koivunen
42fd182df7
refactor: use map_err
2020-06-11 19:10:46 +03:00
Joonas Koivunen
d5be60249c
Apply suggestions from code review
...
Co-authored-by: ljedrz <ljedrz@users.noreply.github.com>
2020-06-11 18:55:02 +03:00
Joonas Koivunen
b1575f228d
refactor: remove unused conversion
2020-06-11 15:44:47 +03:00
Joonas Koivunen
bcc7a0c434
chore: remove extra TODO
2020-06-11 15:37:07 +03:00
Joonas Koivunen
2766857a8f
add: more locking down tests
...
not feeling so well about these tests. while they do add coverage and
can serve as documentation I don't think they are useful.
2020-06-11 15:33:39 +03:00
Joonas Koivunen
17812a205a
add: more test cases
2020-06-11 15:25:00 +03:00
Joonas Koivunen
3f0d9acb57
add: err when resolving through unsupported type
2020-06-11 15:24:48 +03:00
Joonas Koivunen
ec9607f90e
add test cases for sharded lookup
2020-06-11 15:04:47 +03:00
Joonas Koivunen
d0070f08d9
add minor test case
2020-06-11 14:38:12 +03:00
Joonas Koivunen
6c88e96ec6
refactor: split shard stuff away from dir
2020-06-11 14:33:04 +03:00
Joonas Koivunen
808a1dad32
refactor: simplify error types, less matched cases
2020-06-11 14:17:01 +03:00
Joonas Koivunen
b1f635aa6e
chore: cargo fmt again
2020-06-11 13:49:17 +03:00
Joonas Koivunen
ba98835a7e
add: dagpb getters to ipfs-unixfs
2020-06-11 13:43:44 +03:00
Joonas Koivunen
d78a50c177
chore: update unixfs readme
2020-06-10 20:33:51 +03:00
Joonas Koivunen
392840c0ad
chore: cargo fmt
2020-06-10 20:32:58 +03:00
Joonas Koivunen
7043fe2543
fix returning outer pbnode when empty inner
2020-06-10 20:32:58 +03:00
Joonas Koivunen
0aca44906e
refactor: move test case over to ipfs-unixfs
2020-06-10 20:32:58 +03:00
Joonas Koivunen
b26332a907
add: UnexpectedNodeType for specific error messages
2020-06-10 20:32:56 +03:00
Joonas Koivunen
da23a23784
add: StdError impl for ResolveError, helpers
2020-06-10 20:32:53 +03:00
Joonas Koivunen
92b782ea94
chore: doc and fmt
2020-06-10 20:32:49 +03:00
Joonas Koivunen
74ac58072b
refactor: simplify conversions to cid and unify error type
2020-06-10 20:32:49 +03:00
Joonas Koivunen
301011db80
chore: cargo fmt
2020-06-10 20:32:49 +03:00
Joonas Koivunen
588ff5a720
refactor: inline refactored methods
2020-06-10 20:32:49 +03:00
Joonas Koivunen
2f07dd6538
refactor: align errors, cleanup
2020-06-10 20:32:49 +03:00
Joonas Koivunen
3872aae61d
refactor: simplify most the partitoning and err cases
...
big ticket item still missing is the two wonky error cases...
2020-06-10 20:32:49 +03:00
Joonas Koivunen
3097c16976
add: caching via Option parameter
...
Cache allows us to recover the inner VecDeque which should come handy
when resolving over multiple segments.
2020-06-10 20:32:20 +03:00
Joonas Koivunen
86957edb59
add: dagpb/unixfs path segment resolving
2020-06-10 20:32:17 +03:00
Joonas Koivunen
fb91f514c9
add: try_parse to recover pbnode either way
...
this is probably needed for the directory resolving.
2020-06-10 20:32:11 +03:00
Joonas Koivunen
719163c662
add: missing Error::source impl
2020-06-10 20:32:06 +03:00
Joonas Koivunen
4359e6666b
refactor: remove ipfs-unixfs::pb::UnixFsReadFailed from api
2020-06-09 14:44:34 +03:00
Joonas Koivunen
89cc5ab1d0
fix: remove --owned from pb-rs gen
2020-06-08 15:03:34 +03:00