Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tap support #220

Open
Olical opened this issue Jun 24, 2021 · 1 comment
Open

Add tap support #220

Olical opened this issue Jun 24, 2021 · 1 comment
Labels
client-clojure enhancement New feature or request

Comments

@Olical
Copy link
Owner

Olical commented Jun 24, 2021

Like the title, I would like tap support like I had in the days of prepl. I remember it being tricky to implement with nREPL and I can't remember what stopped me from doing it before. I'll have another look!

@Olical Olical added enhancement New feature or request client-clojure labels Jun 24, 2021
@Olical
Copy link
Owner Author

Olical commented May 2, 2022

Worked out how I'm going to do this! After reading through clojure-emacs/cider#3055 I think I'll end up with something similar. I'm going to set up a tap once upon connection which will do the same as that issue, store each tapped value into a queue.

Then I'll pop off the stack and display them inside the Conjure log buffer in different ways, I think by default after each eval I'll send off a "get me stuff from the queue" command after it happens... possibly periodically? Or maybe I'll add a mapping that prints the current top of the stack (or all values) when invoked, not sure yet.

But that's the crux of it, I'll have to collect tapped values and pull them out later. It'd be nice to find a way to have taps just flow out automatically but I'm not sure if that's possible and may lead to issues if it's printing too much and people can't turn it off.

So maybe a user initiated pull of tapped values might be good... OH. Especially if:

  • The way you get the tapped values out is through an easy mapping
  • That mapping actually performs a transparent eval, like a user initiated one, that you can see in the log
  • You can take that eval, modify it and transform what's currently in the "tap ring"
  • So you can map/filter/reduce what's stored from the tap, or just print it all
  • Users can store references in vars to keep a snapshot of tapped values at a point in time

So, yes, I think use initiated lookup and have it work very transparently so people can see the var the values are stored in, or atleast the function that returns them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client-clojure enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant