You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it would be great to provide an option to use native promise in place of q, similar to what is done for "request". That will allow to reduce a bit the dep tree, see #244
The text was updated successfully, but these errors were encountered:
I would love to swap over to Bluebird coroutines whilst we wait for async/await to be supported in more browsers (or in my case, Node).
However, it's unlikely to make much of an impact on the dep tree: package.json will still need to refer to some Promise implementation since we cannot assume that they are supported natively. We can clobber at runtime, but the bundle will still have Q's code inside since webpack/browserify won't be able to statically determine that it is dead code.
We have now switched the promise implementation to #490, so I'm closing this.
As @kegsay said, we can't do much to reduce the dependency tree this way because (a) we need to support platforms without a native Promise implementation, and (b) we use a bunch of features from bluebird other than the raw Promise support (eg Promise.all, and (for now at least) Promise.done for backwards compatibility with q).
It seems that the q dependency is only used in the core matrix-js-sdk/lib/ files. Modern web engines have native support for promises:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise#Browser_compatibility
I think it would be great to provide an option to use native promise in place of q, similar to what is done for "request". That will allow to reduce a bit the dep tree, see #244
The text was updated successfully, but these errors were encountered: