jasongilman / proto-repl

A Clojure Development Environment package for the Atom editor
https://atom.io/packages/proto-repl
MIT License
565 stars 50 forks source link

Fixed loading spinners not getting cleaned up when exceptions are thrown in Boot REPLs #288

Closed hanslivingstone closed 6 years ago

hanslivingstone commented 6 years ago

Previously, any code executed in a Boot REPL (remote or local) that threw an exception would cause a spinner to appear in the editor and never disappear. The problem is, Boot returns exceptions in a slightly different way, causing proto-repl to ignore the returned message and never trigger the result handler which would cleanup the spinner.

This now checks for Boot exception messages and calls the result handler fixing the issue.

Fixes issues #209 and #215 for local and remote REPLs.

To reproduce and verify:

  1. Start a REPL server with Boot or Leiningen and connect to it with proto-repl:

    boot repl --server --port 4000 -- wait
    lein repl :headless :port 4000
  2. Execute any code from inside a file in Atom to throw an exception:

    (/ 1 0)