Skip to content

Commit

Permalink
[Fix #439] Add a workaround for race condition bug in cider-restart
Browse files Browse the repository at this point in the history
  • Loading branch information
bbatsov committed Feb 8, 2014
1 parent 38a9963 commit fa7a9cf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,14 @@ cider-nrepl's info middleware for jump-to-definition.
`cider-prompt-save-file-on-load`.
* New interactive command `cider-insert-defun-in-repl`.
* New interactive command `cider-insert-ns-form-in-repl`.

### Bugs fixed

* [#468](https://github.com/clojure-emacs/cider/issues/468) Fix
pretty-printing of evaluation results so that `*1` is set properly.
* [#439](https://github.com/clojure-emacs/cider/issues/439) Fix
race condition bug in `cider-restart`.


## 0.5.0 / 2014-01-24

Expand Down Expand Up @@ -155,6 +161,7 @@ buffers like `*nrepl-server*` and `*nrepl-connection*`.
* Add macroexpand key bindings to `nrepl-mode-map`.
* Don't suppress namespaces in macroexpansion.
* Add explicit require of expected namespaces in the repl buffer.

* Add command `nrepl-pprint-eval-last-expression`.
* Add an event buffer for debugging.
* Allow connections without repl buffers.
Expand Down
8 changes: 6 additions & 2 deletions cider-interaction.el
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
;;; cider-interaction.el --- IDE for Clojure

;; Copyright © 2012-2013 Tim King, Phil Hagelberg
;; Copyright © 2013 Bozhidar Batsov, Hugo Duncan, Steve Purcell
;; Copyright © 2012-2014 Tim King, Phil Hagelberg
;; Copyright © 2013-2014 Bozhidar Batsov, Hugo Duncan, Steve Purcell
;;
;; Author: Tim King <kingtim@gmail.com>
;; Phil Hagelberg <technomancy@gmail.com>
Expand Down Expand Up @@ -1314,6 +1314,10 @@ If PROMPT-PROJECT is t, then prompt for the project in which to
restart the server."
(interactive)
(cider-quit)
;; Workaround for a nasty race condition https://github.com/clojure-emacs/cider/issues/439
;; TODO: Find a better way to ensure `cider-quit' has finished
(message "Waiting for CIDER to quit...")
(sleep 2)
(cider-jack-in current-prefix-arg))

(add-hook 'nrepl-connected-hook 'cider-enable-on-existing-clojure-buffers)
Expand Down

0 comments on commit fa7a9cf

Please sign in to comment.