cider icon indicating copy to clipboard operation
cider copied to clipboard

Invalid cider-repl-history file prevents cider-jack-in from working

Open TimoFreiberg opened this issue 6 years ago • 5 comments

Expected behavior

If the cider-repl-history file is invalid, CIDER should still work. If CIDER could clean up invalid parts automatically, I would prefer that, but if that's impossible (or too hard), I would be fine with getting a prompt to clean it up manually.

Actual behavior

If the cider-repl-history file is invalid, CIDER doesn't start with the relatively cryptic error message error in process filter: cider-repl--history-read: End of file during parsing (although Bozhidar recognized the error immediately :smile: ) To get it working again, you have to clean up/delete the file manually.

Steps to reproduce the problem

Use broken-cider-repl-history.txt as your cider-repl-history-file, which has a malformed expression at the end:

(:require [clojure.java.io :as io]
          [datascript.core :as d]
          [mdm-utils
            [service :

Run cider-jack-in-clj

Environment & Version information

CIDER version information

CIDER 0.18.1snapshot (package: 20180903.2111)

Emacs version

GNU Emacs 26.1

Operating system

Arch Linux

TimoFreiberg avatar Sep 05 '18 08:09 TimoFreiberg

Should be easy to fix, but how the broken entries get into the history in the first place?

vspinu avatar Sep 06 '18 21:09 vspinu

Unfortunately I have no idea how it happened.

TimoFreiberg avatar Sep 07 '18 06:09 TimoFreiberg

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding!

stale[bot] avatar May 08 '19 17:05 stale[bot]

I'll add here what's needed to be done - we just need to catch that error and display some message prompting the user to reset their history file.

bbatsov avatar May 12 '19 05:05 bbatsov

I was having this problem and solved it by removing the nrepl-history file inside .local/cache

sovelten avatar Jun 01 '21 20:06 sovelten