taoensso/tempura

Tempura advanced compilation issues

amazing-Mantse opened this issue Β· 10 comments

After including Tempura in my project I get this error when compiling with figwheel :
`Compile Warning resources/public/js/taoensso/encore.cljs line:2684 column:16

Use of undeclared Var goog.structs/Map

2679 (def ^:private coerce-xhr-params "Returns [ <?data>]"
2680 (let [url-encode
2681 (fn url-encode
2682 ([params]
2683 (when (seq params)
2684 (-> params clj->js gstructs/Map. gquery-data/createFromMap .toString)))
^---
2685
2686 ([uri params]
2687 (let [qstr (url-encode params)
2688 uri-with-query (if (str/blank? qstr) uri (str uri "?" qstr))]
2689 [uri-with-query nil])))`

This has already been fixed in encore v2.117.0 (taoensso/encore@af1dd28), but that dependency hasn't been updated in here (it's still at 2.94.0). Probably needs the same PR as this; taoensso/timbre#299.

Compile Warning resources/public/js/taoensso/encore.cljs line:2684 column:16

πŸ‘† But your warning says "encore.cljs" πŸ˜‰. As I mentioned, this library has a dependency on encore 2.94.0, while the fix is in 2.117.0 πŸ˜„

So I can actually pull the code fix and do a pull request and hope they merge it?

Yes, I think that would be best πŸ‘

Thanks @khellang!

You can also just add [com.taoensso/encore "2.117.0"] to your dependencies (above/before Tempura) in the meantime. That'll force the newer version of that library, rather than the one bundled in Tempura.

Ahh .. Ok, so now when I do an advanmced compilations I find my self with this error :

WARNING: /matter/titan/source/titan-ui/out/taoensso/tempura/impl.js:96: WARNING - unreachable code }catch (e20422){if((e20422 instanceof Error)){

Is this where I need to write an extern for this?

No need for an extern, that warning can be safely ignored πŸ‘

Isn’t there any way to fix this warning?

@bfontaine Not last time I checked, though haven't looked recently since it's not a high priority vs other tasks.