JonyEpsilon / gorilla-repl

A rich REPL for Clojure in the notebook style.
http://gorilla-repl.org
MIT License
887 stars 104 forks source link

All built-in renderers always return [object Object] #219

Closed sbelak closed 6 years ago

sbelak commented 9 years ago

Both plots and simple expressions such as (+ 1 2) produce only [object Object] as output. Stranger still, exceptions and explicit output using print work as expected.

screenshot 2015-06-18 10 22 29

Looking at the WS traffic, what's coming from the server seems correct, although potentially quoted one time too many. For instance (+ 1 2) results in:

{"id":"89fa25e5-7b0a-4c54-827b-a6c3d207224d","ns":"tranquil-galaxy","session":"1b0a16ff-5747-4d87-bb76-99f8d6226ad1","value":"{\"type\":\"html\",\"content\":\"<span class='clj-string'>&quot;3&quot;</span>\",\"value\":\"\\\"3\\\"\"}"}

There are no Javascript errors. OS X. Have tried in Chrome 44 and Safari.

JonyEpsilon commented 9 years ago

That is very strange ... what version on Gorilla are you using, and what command did you start it with?

sbelak commented 9 years ago

0.3.4 (from Clojars) lein gorilla (from a blank project)

JonyEpsilon commented 9 years ago

Huh. The only thing I can think of is if one of the dependencies "bundled" with Leiningen has changed - what version of lein are you using? I'll try and reproduce on a fresh VM.

sbelak commented 9 years ago

2.51. I've now tried with a clean profiles.clj and it works as it should, so it must have been a conflict with one of the other plugins.

swizzard commented 9 years ago

I just ran into this issue. I removed cider-nrepl from my ~/.lein/profiles.clj profile, and the problem is solved. I suspect there's simply a limit to the number of things that can mess with the (n)repl without things going awry.

JonyEpsilon commented 9 years ago

Hi Sam, thanks for the details. I think Gorilla needs to be compatible with cider, as cider is so widely used. I'll look in to this and try and figure out how to work around the problem.

benfb commented 6 years ago

I'm going to hope this is fixed with the latest version, org.clojars.benfb/gorilla-repl "0.5.1". If not, please open a new issue at benfb/gorilla-repl. Thanks!