piggieback icon indicating copy to clipboard operation
piggieback copied to clipboard

piggieback only captures a distinct set of bindings when it starts up

Open bhauman opened this issue 7 years ago • 3 comments

It would be great to capture and restore all the bindings but that would cause a nightmare for all the nREPL and other middleware bindings that are present. This now makes me think that all nREPL middleware bindings should be scoped to a single binding holding a map and/or an atom so that they are distinct from the real bindings when you launch something like piggieback. Then piggieback could simply capture all the bindings on cljs-repl start and restore when a message comes in.

Another simpler solution would be a way of explicitly add bindings to the environment when we start the cljs-repl. We could do this with a binding piggiback/*extra-bindings* {'figwheel.main/*config* {}}

bhauman avatar Aug 17 '18 13:08 bhauman

Hi Bruce, do you mean trying to find all the bindings in cider-nrepl and group them, a bit of a grunt work but I might have time for that.

arichiardi avatar Sep 17 '18 00:09 arichiardi

At any rate - I see most issues are for some missing bindings so we definitely need some way to get a handle of them.

bbatsov avatar Oct 15 '18 07:10 bbatsov

If my client reconnects to the server and reuses the piggieback session I end up losing stdout. I've also found that the "out" messages I get from evals such as (println "foo") don't have the correct message ID associated with them. The return value and all other messages do though.

Maybe it's related to this issue? This behaviour could be a clue that points towards the root cause?

Olical avatar Apr 01 '20 16:04 Olical