ipfs / go-graphsync

Initial Implementation Of GraphSync Wire Protocol
Other
100 stars 38 forks source link

replace uses of go-merkledag and go-ipld-format to create unixfs files with go-unixfsnode #293

Open mvdan opened 2 years ago

mvdan commented 2 years ago

For example, in the code below, we use go-merkledag and go-ipld-format to create a UnixFS file for a benchmark:

https://github.com/ipfs/go-graphsync/blob/a8d880238c2679e6191d67d26dd859896c32237f/benchmarks/benchmark_test.go#L273-L276

@willscott says we can use data/builder.BuildUnixFSFile for this purpose:

https://github.com/ipfs/go-unixfsnode/blob/b9b6e9dc571e3fd0a3e4ee53987f07e0ff8008da/data/builder/file.go#L30

Hopefully this would mean that the root module no longer needs to pull those two dependencies, which are relatively large and getting phased out with time.

welcome[bot] commented 2 years ago

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review. In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment. Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

Finally, remember to use https://discuss.ipfs.io if you just need general support.

hannahhoward commented 2 years ago

ooh if go-unixfs node has gotten this far we should for SURE do this.