Skip to content

Debugger errors with 'recur and 'do #1048

@DesmondHayes

Description

@DesmondHayes
(defn factorial
  [n]
  (loop [cnt n acc 1]
    (if (zero? cnt)
      acc
      (recur (dec cnt) (* acc cnt)))))

C-u C-c C-c to debug factorial gives an error in cider buffer:

Failed to instrument  (recur # #)
CompilerException java.lang.UnsupportedOperationException: Can only recur from tail position, compiling:(blah-blah-blah)
(defn foo
  [v]
  (do v))

C-u C-c C-c to debug foo gives an error in cider buffer:

Failed to instrument  (do v)

and also sometimes hangs cider repl so that only C-c C-c can stop it (at which point it gives a huge error with a stacktrace).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions