Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Fix README typo + tweaks. #17

Merged
merged 2 commits into from
May 20, 2016
Merged

Conversation

hackergrrl
Copy link
Contributor

s/interface-stream-muxer/interface-ipfs-core, and a couple of other small tweaks.

@@ -66,7 +67,7 @@ A valid (read: that follows this interface) IPFS core implementation, must expos

`callback` must follow `function (err, node) {}` signature, where `err` is an error if the operation was not successful and `node` is a MerkleDAG node of the type [DAGNode][]

If no `callback` is passed, a promise is returned.
Returns a [promise][].
Copy link
Contributor

Choose a reason for hiding this comment

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

This change is not correct. The promise is only returned if no callback is passed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alas! I thought so too, but tried this with promisify-es6 -- it returns a promise regardless.

Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting. Not sure if we want this though, I guess we have to fork it and make our own version in the long run.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dignifiedquire I think I agree about it being undesirable to always return a promise. A counterargument though might be that lots of people are already depending on promisify and us deviating from "the norm" may be detrimental to the larger community. Hm--I'm not sure. ping @diasdavid @nginnever too :)

Copy link
Contributor

Choose a reason for hiding this comment

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

I would rather for it to be one or the other. Why can't we reach out to the dev of promisify-es6 and understand the reason behind his decision? Seems like the dev might have expected that if someone passes a callback, to not grab the promise as well, there would be nothing good coming from that.

Copy link
Contributor

Choose a reason for hiding this comment

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

Nevertheless, as for the spec. Let's rephrase to:

A promise is also returned, you can skip passing the callback to the function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

+1 for reaching out to the dev first -- this is how open source works best!

@RichardLitt
Copy link
Contributor

I'm liking the aggressive linking you're doing recently. +1.

@hackergrrl
Copy link
Contributor Author

hackergrrl commented May 19, 2016

@RichardLitt man, ever since I learned about markdown footnote links they've soo become my jam ❤️

@hackergrrl
Copy link
Contributor Author

I reverted the phrasing back to how it was before for promises, but linkified them.

@daviddias daviddias merged commit cdc7467 into ipfs-inactive:master May 20, 2016
@daviddias
Copy link
Contributor

thank you @noffle :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants