-
Notifications
You must be signed in to change notification settings - Fork 20
Conversation
Thank you @noffle :):) I'm not sure about the fs
abstract-blob-store https://github.com/maxogden/abstract-blob-store/blob/master/tests/read-write.js#L52-L65 |
It's true: we could check This raises the question of how to handle partial failure in |
I poked at some folks on Now to decide how |
Can we config the coveralls bot to not post on the issue thread? It's noisy and the coverage notes are already included in the merge results box at the bottom. |
agreed. its super noisy. |
Agreed. Removed the coveralls comments (if you happen to see another one in another repo, I might have missed). @noffle in relation to getBlocks, what we can do is to return an array of objects with {multihash:<>, block: <>} and in the ones that it was not possible to retrieve, we set it to undefined, so that in a IPFS core get several blocks call, they can be first retrieved by the repo and those who are missing can be populated by bitswap or other mechanism. |
@diasdavid it seems strange if |
Ok, let's put the {multihash: <>, err: <>} for the ones that fail to fetch from the repo |
Updated impl, tests, and docs. This is a breaking API change, so please bump the major after PRing. :) |
@coveralls your presence is unwelcome here |
@coveralls unsubscribe |
Disabled coveralls commenting (missed this one, sorry). On bumping up major version. AFAIK and what I've been considering best practice is that until 1.0.0, the module should be handled as alpha/beta, so what I would do in this scenario is bumping minor. If we were already at major versions (after having declared that we had something stable) I would bump the major. Sounds good? Thoughts? @dignifiedquire you might have a opinion on this too. |
@@ -149,12 +149,27 @@ Asynchronously adds an array of block instances to the underlying repo. | |||
#### bs.getBlock(multihash, callback(err, block)) | |||
|
|||
Asynchronously returns the block whose content multihash matches `multihash`. | |||
Returns an error (`err.code === 'ENOENT'`) if the block does not exist. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice :)
:D :D I never have opinions ;)
|
thank you @dignifiedquire :) @noffle would you agree with that approach? :) |
Whoops, I didn't realize we were pre-1.0.0. Yeah -- bump whatever freely. 😀 |
awesome! :D |
Woohoo! This PR contains both important bugfixes and also test cases that prove their newfound correctness!
Important: this also changes the
getBlock()
callback semantics to NOT populateerr
when a block cannot be found. It is this hacker's belief that "not found" is not an error case. The README is also updated to reflect this!This gets us to 100% line coverage. There are a few tiny branches still not covered, but they are both a) trivial, and b) would require test case bloat / noise to cover them.
Addresses ipfs/js-ipfs#115.