Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor UnixFS CoreAPI #5501

Merged
merged 24 commits into from
Oct 5, 2018
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
795d1ea
coreapi unixfs: use fileAdder directly
magik6k Sep 20, 2018
c68ab56
coreapi unixfs: cid prefix options
magik6k Sep 20, 2018
06a4218
coreapi unixfs: better add tests
magik6k Sep 20, 2018
041e55d
coreapi unixfs: options for RawLeaves / Inline
magik6k Sep 20, 2018
6337e69
coreapi unixfs: layout/chunker options
magik6k Sep 20, 2018
c056e5a
coreapi unixfs: Simpler output handling
magik6k Sep 20, 2018
49946c6
coreapi unixfs: pin/local/hash-only options
magik6k Sep 20, 2018
679d609
coreapi unixfs: cleanup options
magik6k Sep 20, 2018
9887a05
coreapi unixfs: docs on options
magik6k Sep 20, 2018
374fb00
coreapi unixfs: separate option to enable inlining
magik6k Oct 2, 2018
675106d
coreapi unixfs: rebase fixes for fileAdder.AddAllAndPin
magik6k Oct 3, 2018
e6bc923
coreapi unixfs: multi file support in unixfs coreapi
magik6k Oct 3, 2018
8dda695
coreapi unixfs: unixfs.Get
magik6k Oct 3, 2018
c6f8e7e
coreapi unixfs: test recursive adding
magik6k Oct 3, 2018
18fec6e
coreapi unixfs: wrap option
magik6k Oct 3, 2018
3e754d6
coreapi unixfs: hidden opiton
magik6k Oct 3, 2018
f9cf849
coreapi unixfs: stdin-name option
magik6k Oct 3, 2018
a81ec29
coreapi unixfs: progress events
magik6k Oct 3, 2018
d51ce96
coreapi unixfs: filestore opts
magik6k Oct 3, 2018
69eb015
ipfs add uses CoreAPI
magik6k Oct 3, 2018
051c330
coreapi unixfile: simplify RawNode case
magik6k Oct 4, 2018
4b1f733
coreapi unixfs: fix inline doc
magik6k Oct 4, 2018
35e8d6f
update unixfs inline option comment to give us room to change things
Stebalien Oct 5, 2018
676403b
Merge remote-tracking branch 'origin/master' into feat/coreapi/unixfs
magik6k Oct 5, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions core/coreapi/interface/options/unixfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,10 @@ func (unixfsOpts) Inline(enable bool) UnixfsAddOption {
// Specifying this option won't enable block inlining. For that use `Inline`
// option. Default: 32 bytes
//
// Note that while there is no hard limit on the number of bytes, it should
// be kept at a reasonably low value, like 64 bytes if you intend to display
// these hashes. Larger values like 256 bytes will work fine, but may affect
// de-duplication of smaller blocks.
//
// Setting this value too high may cause various problems, such as render some
// blocks unfetchable
// Note that while there is no hard limit on the number of bytes, it should be
// kept at a reasonably low value, such as 64 and no more than 1k. Setting this
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Stebalien should we say 1k here or use a lower value?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about "it should be kept at a reasonably low value, such as 64; implementations may choose to reject anything larger". We can always increase this if someone complains.

(Note: I never really intend to reject anything less than 1k but users tend to ignore all but strongly worded warnings).

Copy link
Contributor

@kevina kevina Oct 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay. I was actually trying to avoid creating too strong a suggestion. But I am okay with.

// Note that while there is no hard limit on the number of bytes, it should be
// kept at a reasonably low value, such as 64; implementations may choose to
// reject anything larger.

And just leave it at that.

// value too high may cause various problems, such as render some
// blocks unfetchable.
func (unixfsOpts) InlineLimit(limit int) UnixfsAddOption {
return func(settings *UnixfsAddSettings) error {
settings.InlineLimit = limit
Expand Down