LightTable / Clojure

Light Table Clojure language plugin

Repository from Github https://github.comLightTable/ClojureRepository from Github https://github.comLightTable/Clojure

Instarepl keeps stacking evaluation results for defns

berendbaas opened this issue · comments

My apologies if I'm describing this somewhat unclearly, but I'll try to assist this with screenshots to make it clearer.

Whenever using the instarepl and defining a function, every edit in the instarepl causes the function to be reevaluated and the inline-eval results to be displayed after the previous evaluation. This eventually crashes LightTable for me. The problem seems to have started after updating the Clojure plugin to 0.0.14
Specs:
Macbook Pro 2012, Mac OS X 10.10 Yosemite
Light Table 0.6.7, Binary version 0.8.4

Steps to reproduce

  1. Start LightTable and open up an instarepl.
  2. define the following example function
(defn x [a b] (+ a b))
  1. call the function once (x 2 3)
  2. Edit the instarepl above or below the defined function (in the screenshot i added (+ 2 2)
  3. repeat step 4 a couple of times to see the evaluations stack up.
    screen shot 2014-11-09 at 16 06 59

Thanks for the report. This may have overlap with LightTable/LightTable#1230. In the meantime you can clear these with the command Eval: Clear inline results

I'm seeing this too.

This first picture shows the results of starting the instarepl. Note that even though "foo" has been run 5 times, I'm just seeing the 3 inline argument values from the last call, as I'd expect.

screen shot 2014-11-20 at 11 07 43

If I now add a sixth call to "foo" with argument 66 I see this:

screen shot 2014-11-20 at 11 08 04

It looks like only the last of three previous inline argument values has been cleared, so the 3 new ones are tagged on the end.

Same again with seventh call:

screen shot 2014-11-20 at 11 08 18

Clearing inline results doesn't fix the problem - only the last argument value is cleared:

screen shot 2014-11-20 at 11 10 04

Hope this helps, and thanks!

In IRC, spenguin adds another picture: https://dl.dropboxusercontent.com/s/537qsln2ceqwf8e/Screenshot%202014-12-02%2017.58.58.png It's a serious issue in the instarepl, since every change to a line instantly re-evaluates. Students find it very distracting when I'm teaching them using the instarepl. I'll try and do some research into this tonight.

My suspicion is that this cropped up as the result of some change in the way CM deals with line handles/widgets.

The problem is resolved in 0.1.1 of the Clojure plugin. Cheers!

Still have this problem with doseq. Just type simple doseq form and start typing after it. Every evaluation there are will be new inlines:

Clear inline results delete only last result