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

Not working with bluebird v3 #8

Closed
overlookmotel opened this issue Jun 17, 2016 · 8 comments
Closed

Not working with bluebird v3 #8

overlookmotel opened this issue Jun 17, 2016 · 8 comments

Comments

@overlookmotel
Copy link
Collaborator

Raising this issue more to warn others than anything else at this point.

cls-bluebird does not currently work with bluebird v3.

There are at least a couple of problems:

  1. The progress argument has been removed from _addHandlers() in bluebird v3
  2. When calling .then() on promise which is already resolved, _addHandlers() is not called in bluebird v3

I'm working on fixing this, but at present best to avoid using this module with bluebird versions later than 2.x.x

@Jeff-Lewis
Copy link

@overlookmotel Thanks for picking up cls-bluebird. In order to bring it up to speed with Bluebird v3, will it be similar to what Sequelize does?

@overlookmotel
Copy link
Collaborator Author

overlookmotel commented Jun 22, 2016

@Jeff-Lewis I'm looking to patch a couple of internal Bluebird functions which are called by all public methods, rather than patch every Bluebird method individually as Sequelize does.

Actually, the aim is to move Sequelize over to cls-bluebird once this work is complete.

I'm not 100% sure that Sequelize's shim works completely in all cases. I've had occasional CLS context loss in some weird edge cases with Sequelize's shim (though there were other moving parts involved, so can't conclusively say that it's a problem with Sequelize).

The main thing actually is to write a comprehensive test suite to make sure it's 100% bullet-proof, and I'm on the case with that now.

@ravivaxonite
Copy link

hey ,
when do you think it will be published ?
it will help my very much

@overlookmotel
Copy link
Collaborator Author

@ravivaxonite Can't really give a prediction I'm afraid. It's complicated stuff and I have other work going on which is unpredictable.

@ravivaxonite
Copy link

dont looking for a commit :)
some assumption ?

@overlookmotel
Copy link
Collaborator Author

Maybe a month. But I make no promises! (no pun intended)

@overlookmotel
Copy link
Collaborator Author

@Jeff-Lewis I've changed my mind! I am now proposing to adopt a patch similar to Sequelize's. See #13.

@overlookmotel
Copy link
Collaborator Author

Fixed in v2.0.0

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

No branches or pull requests

3 participants