kaocha-cucumber icon indicating copy to clipboard operation
kaocha-cucumber copied to clipboard

Reloading glue from the REPL?

Open WhittlesJr opened this issue 2 years ago • 2 comments

I've been trying to work with cucumber from the REPL, using kaocha.repl/run. I find that merely reloading the glue namespaces is not enough to refresh the glue code from cucumber-jvm-clojure's perspective.

What would a REPL-based workflow look like for working on and reloading glue code? Running from the CLI is not a great option for development for us, because our code takes a long time to init.

WhittlesJr avatar May 13 '22 14:05 WhittlesJr

It looks like all you need to do is (reset! lambdaisland.cucumber.jvm/glue-cache nil).

I'm not sure if this implies that there should be any changes to your code or not, but for anyone else who finds this issue, this is what you have to do after refreshing your code.

WhittlesJr avatar May 16 '22 18:05 WhittlesJr

Good catch, it's been a while since I've looked at this code, but yeah compiling the "glue" was somewhat expensive if I remember correctly, so we cache it. A hint about this in the README would be more than welcome!

plexus avatar May 23 '22 14:05 plexus

solve with https://github.com/lambdaisland/kaocha-cucumber/pull/16

humorless avatar Mar 31 '23 03:03 humorless