cgrand / xforms

Extra transducers and reducing fns for Clojure(script)
575 stars 32 forks source link

Add a Troubleshooting section to README.md because of a bug I encountered #22

Closed jgrodziski closed 6 years ago

jgrodziski commented 6 years ago

I stumbled upon a strange interaction and bug when using xforms in a [clojurescript + figwheel + emacs / cider nrepl] dev environment. Adding xforms triggers a bug with the REPL evaluation result, adding the nrepl-middleware to figwheel solved the issue (dev env was correctly working before). I submit this to keep track of the issue if other people stumble upon it in the future.

cgrand commented 6 years ago

Thanks @jgrodziski, do you have any idea why this happens?

jgrodziski commented 6 years ago

Hi Christophe, I was just reading the cider middleware code and still wonder why such a behavior was triggered because xforms's functions shoud be waterproof with the outside. Of course, I suspect the dispatching stuff occuring on dynamic var like out and err here: https://github.com/clojure-emacs/cider-nrepl/blob/master/src/cider/nrepl/middleware/out.clj Do you have any clues?

cgrand commented 6 years ago

You get this strange behavior before even invoking a single xform function? Just by loading xforms? Could this be a side-effect of Macrovich?

jgrodziski commented 6 years ago

yes, just loading xforms as a dependency through leiningen triggers the behavior, no interaction with xforms was required to trigger it. I also thought about macrovich because it occurs only in the cljs repl and not the clj one (over which the figwheel is started). Also, I use re-frame and it has a dep toward macrovich in 0.2.0 version... Also the bad behavior doesn't show up in a lein figwheel repl in a terminal.