greglook / whidbey

nREPL middleware to pretty-print colored values
The Unlicense
158 stars 10 forks source link

Removing `pr-values` from `interruptible-eval` is brittle #13

Closed gfredericks closed 9 years ago

gfredericks commented 9 years ago

Whidbey relies on the builtin pr-values middleware not being present, and this code tries to accomplish this by removing interruptible-eval's reference to it. Unfortunately this doesn't prevent any other middleware from referencing pr-values and thereby re-enabling it, and as far as I understand nrepl middleware this is a totally reasonable thing to do. In particular cider-nrepl does it.

greglook commented 9 years ago

I created NREPL-55 a while back to try to find a better way to do this, but haven't really worked on it since I hadn't signed the Clojure CA at the time.

gfredericks commented 9 years ago

My temporary workaround is to do an alter-var-root on pr-values to turn it into a noop: https://github.com/gfredericks/dotfiles/blob/master/.lein/profiles.clj.symlink#L26-28

gfredericks commented 9 years ago

I'm not sure the approach in my previous comment is any worse than what whidbey already does.

greglook commented 9 years ago

No worse, and could prevent some more issues. I've adopted it in the linked PR.

greglook commented 9 years ago

Released 0.4.0 on Clojars, which helps address this issue. Closing in favor of NREPL-55; maybe I can get some time to work on the other side of the problem.

gfredericks commented 9 years ago

The code that alters the interruptible-eval metadata isn't necessary anymore, is it?

I don't think it's hurting anything, I just like deleting code when possible.

greglook commented 9 years ago

Hmm, possibly not. I'll experiment with it.