funcool / promesa

A promise library & concurrency toolkit for Clojure and ClojureScript.
https://funcool.github.io/promesa/latest/
Mozilla Public License 2.0
498 stars 58 forks source link

Breaking change between V10 & V11, incompatibility with google API (gapi) Promises #149

Open milelo opened 10 months ago

milelo commented 10 months ago

I'm trying to upgrade from [funcool/promesa "10.0.594"] to [funcool/promesa "11.0.678"]

The latter isn't compatible with google api promises, they are no longer recognised by promesa as promises:

https://google.github.io/closure-library/api/goog.Thenable.html https://github.com/google/google-api-javascript-client

As a work around I'm using an adaptor that resolves the issue:

(defn $promise [gapi-promise]
  (p/create (fn [resolve reject]
              (-> gapi-promise
                  (.then resolve)
                  (.catch reject)))))