funcool

peterdee 2023-03-16T19:03:06.472549Z

Running in shadow-cljs I'm getting an error with promesa (10.0.594) `Use of undeclared Var promesa.core/extract`

peterdee 2023-04-29T22:51:06.580569Z

Sorry for the really late reply! I'm using shadow-cljs. A small example demonstrating the problem would be to create a project: npx create-cljs-project promesa-test cd promesa-test npm install Replace the existing shadow-cljs.edn with just this: {:dependencies [[funcool/promesa "10.0.594"]]} and run: npx shadow-cljs browser-repl cljs.user=> (require '[promesa.core :as p]) nil cljs.user=> promesa.core ; See what is exported <<a bunch of stuff but not extract>> cljs.user=> (-> (p/resolved 111) (p/then #(println %))) 111 #<Promise[~]> cljs.user=> (-> (p/resolved 111) (p/extract)) ------ WARNING - :undeclared-var ----------------------------------------------- Resource: <eval>123 Use of undeclared Var promesa.core/extract --------------------------------------------------------------------------------

peterdee 2023-04-29T22:54:27.742059Z

Maybe it is a problem with shadow-cljs?

niwinz 2023-03-17T09:44:20.110929Z

strange, we are using it ourselves and didnt see this warning

niwinz 2023-03-17T09:45:06.562009Z

are you using something concrete from promesa that caused this?

peterdee 2023-05-03T21:08:58.348369Z

In the jar in ~/.m2/repository/funcool/promesa/10.0.594/core.cljs the function extract is wrapped in #? :clj. But that isn't what is on github.