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

Change the type signature on Q.resolve, and add Promise.prototype.delay #35

Merged
merged 2 commits into from
Mar 26, 2014

Conversation

nicks
Copy link
Contributor

@nicks nicks commented Mar 26, 2014

Hello @X-ma,

Please review the following commits I made in branch 'nick-compiler'.

e929ad6 (2014-03-26 11:00:52 -0400)
Change the type signature on Q.resolve, and add Promise.prototype.delay

R=@X-ma

*/
function delay(delayMs, returnVal) {
function delay(delayMsOrVal, opt_delayMs) {

Choose a reason for hiding this comment

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

This is a pretty major change to the behavior of delay(). Should that be documented somewhere in case it breaks something for someone?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is for consistency with Q. We added delay pretty recently, and none of the existing callers were using the second arg.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(though i generally agree that when we bump the version, we should do a
minor version change instead of a micro version change)

On Wed, Mar 26, 2014 at 11:24 AM, Sho Kuwamoto [email protected]:

In kew.js:

*/
-function delay(delayMs, returnVal) {
+function delay(delayMsOrVal, opt_delayMs) {

This is a pretty major change to the behavior of delay(). Should that be
documented somewhere in case it breaks something for someone?

Reply to this email directly or view it on GitHubhttps://github.com//pull/35/files#r10981131
.

Choose a reason for hiding this comment

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

I was specifically concerned about folks we may not know about who may be relying on existing behavior (probably a very small number at this point, but still...). If something breaks, how does someone find out about changes in function signatures? Read the PRs I guess?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep, 'git diff' can generate a changelist for you between 2 versions

On Wed, Mar 26, 2014 at 11:37 AM, Sho Kuwamoto [email protected]:

In kew.js:

*/
-function delay(delayMs, returnVal) {
+function delay(delayMsOrVal, opt_delayMs) {

I was specifically concerned about folks we may not know about who may be
relying on existing behavior (probably a very small number at this point,
but still...). If something breaks, how does someone find out about changes
in function signatures? Read the PRs I guess?

Reply to this email directly or view it on GitHubhttps://github.com//pull/35/files#r10982039
.

Choose a reason for hiding this comment

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

at some point we might want to add a changelog.

@skuwamoto
Copy link

LGTM!

@@ -64,7 +64,7 @@ Promise.prototype.getContext = function () {
/**
* Resolve this promise with a specified value
*
* @param {*} data
* @param {*=} data
Copy link
Contributor

Choose a reason for hiding this comment

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

I just fixed some warnings in zcache because of this :)

@xiao
Copy link
Contributor

xiao commented Mar 26, 2014

LGTM

@nicks
Copy link
Contributor Author

nicks commented Mar 26, 2014

updated the docs, and bumped the minor version

nicks added a commit that referenced this pull request Mar 26, 2014
Change the type signature on Q.resolve, and add Promise.prototype.delay
@nicks nicks merged commit 2533f02 into master Mar 26, 2014
@nicks nicks deleted the nick-compiler branch March 26, 2014 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants