Skip to content

Spawning subrepl using main/repl not working. #2017

@maacl

Description

@maacl

Expected behavior

At cider repl:

(defn foo
  [n]
  (cond (> n 40) (+ n 20)
        (> n 20) (- (first n) 20)
        :else 0))

(require '[clojure.main :as main])
(main/repl :caught (fn [_] (println "Broken! HaHa!")))

(foo 24)
=> Broken! HaHa!

Actual behavior

(defn foo
  [n]
  (cond (> n 40) (+ n 20)
        (> n 20) (- (first n) 20)
        :else 0))

(require '[clojure.main :as main])
(main/repl :caught (fn [_] (println "Broken! HaHa!")))

Jumps to minibuffer with a stdin: prompt.

Steps to reproduce the problem

See above.

Environment & Version information

CIDER version information

CIDER 0.15.0-snapshot, nREPL 0.2.12
Clojure 1.8.0, Java 1.8.0_131

Lein/Boot version

N/A

Emacs version

Emacs 26.0.50

Operating system

Ubuntu 17.04

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions