-
Notifications
You must be signed in to change notification settings - Fork 48
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
Lost result and exceptions with cider #31
Comments
I replied @ clojure-emacs/cider#830 (comment), as the particular UX of "eval-expr-at-point" seems to be the real driver. Thank you for your efforts. The patch @ #32 isn't bad; I just think it's furthering a hack that, in hindsight, I shouldn't have suggested in the first place. If someone would like to work on getting piggieback's |
I mentioned this on the PR and I'll mention it here as well - isn't supporting |
The work on the |
Recently Emacs Cider changed behavior of eval expression. It internally
uses nrepl load-file instead of eval. This works fine for Clojure, but
it breaks ClojureScript evaluation. User cannot see result of his
expression and even exceptions are lost.
The reason for the bug is difference between CLJ and CLJS load function.
While CLJ load returns last expression, ClojureScript returns nil.
It would be dangerous to change CLJS load function itself. CLJS does not
have variables and last file expression (def x (complex-value)) would
result in performance penalty due to printing of complex value.
I propose workaround to modify piggieback to return value of last expression in load-file. This would fix the issue and give us more time solve in better way: find why cider needs load-file instead of eval and update eval to meet cider needs.
For more details see clojure-emacs/cider#830
The text was updated successfully, but these errors were encountered: