-
Notifications
You must be signed in to change notification settings - Fork 165
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
Compliance branding (e.g. then.aplus
)
#2
Comments
I think a test suite would be crucial to such branding, and will happily volunteer to expand or augment the existing one. Then the problem reduces not to confused misunderstandings, but to maliciousness, which we shouldn't try to guard against. I'm not sure what "require So the spec would perhaps say "implementations which meet all of these requirements are encouraged to add a truthy The "thenables" concept still has value, in that you can assimilate even jQuery "promises" into well-behaved ones. In other words, there's no need to check for |
Re: expanding the existing test suite. Yes, crucial, agree. I would gladly help as well. Sorry for my confusing wording. I was getting at what you said in your last two paragraphs, and so I agree :) |
I have several framework use-cases where I need to detect whether an app-provided value is a promise or not, and having a canonical way to do this would be helpful. Additionally, this would help |
Beyond the typical Promises/A test ("is it a thenable or not"), do you feel like testing specifically for Could you expand on how it helps the semantics of I feel like |
@briancavalier In Ember, we check whether a deserialized URL segment is a promise in order to decide whether to pause application routing until the promise is resolved. (in the meantime, we move the application into a conventionally named I would like a good way to detect promises with chainable |
FWIW, I'm against I would rather the merits of spec compliance be the propagating factor for A+, and having an associated test suite goes a long way to making this more convenient for implementers. |
Aaaaand now I notice that there's a whole lot of (excellent) discussion that happened on the gist that I hadn't read. Nothing that changed my mind on |
@lsmith compliance may not be a boolean property, but "I want to be a promise" pretty much is. I'm more worried about false positives than a guarantee of spec compliance. |
After sleeping on it and reading the latest round of comments, it seems like we mostly (or perhaps completely?) agree that a test suite is much more important than an My only lingering concern is that there are already "promises" in the wild, e.g. |
This is precisely the problem. I suppose we could just maintain a blacklist (e.g. "if it has a |
How is |
If In particular, jQuery-produced promises don't support chained |
It fails the following test suite tests:
As of 1.8, their |
@wycats, not sure what you meant by "the whole endeavor", so forgive if I'm reading too much into it. Even if |
Thanks for indulging me, and yay for test suites! So they don't treat errors as triggers for Is it unlikely that they could fix the former, considering it a bug? The latter seems like a harder issue, but worth pressing on. |
I think there has been talk of making As for error propagation/handling and exception translation, I don't have as much hope. I've been told flat out by jQuery committers that they will not support that aspect of Promises/A. It's possible that could change, of course, but probably not anytime soon. |
This would be a significant breaking change for jQuery, and there are internal usages of Deferreds that rely on the synchronous behavior (especially in animations), so there has been a lot of pushback on moving to asynchronous resolution. I think this is something that can still happen though. |
Where do we all stand on this? I'm +1, but it is not crucial to me. |
@domenic I'm feeling kind of unsure on this one right now. I did notice, though, that a promises-a branch has appeared in the jQuery repo, and code appears to be trying to comply with Promises/A ... no sign of async yet, tho (as @wycats indicated, that'd be a much more invasive change). |
Is this something we can move forward without? I'm thinking if we get #6 worked out, we can announce this thing publicly. Thoughts? |
It seems reasonable to me to continue without it, but I'd rather see the spec defined without |
It sounds like there's not near a majority wanting this, so yeah, we can move on without it. I'll continue manually blacklisting I don't think we should publicly announce until we have tests, but it shouldn't take me long to port those. |
Sad. 😦 |
Discussion has been somewhat reopened in slightlyoff/Promises#40. Implementer feedback appreciated. |
From #1:
The text was updated successfully, but these errors were encountered: