Overcoming "Lisp Connection Closed Unexpectedly" by Cleaning .Cache/Common-Lisp

Cleaning up whatever is in .cache/common-lisp helped me get around issues that began with the update of slime and swank to version 2.28 in Debian unstable.

Using slime would invariable go something like this:

PreviConnecting to Swank on port 42941..
Connected. Let the hacking commence!
Open my-obviously-buggy.lisp
Lisp connection closed unexpectedly: connection broken by remote peer

Whenever I wanted to work on an obviously inperfect Lisp project of my own.

This would also happen when running

emacs -q --debug-init

So it seemed like this wasn't something in my local settings.

The inferior-lisp buffer would show message like these (redacted and formatted):

Backtrace
SWANK DISPATCH-EVENT SWANK MULTI THREADED-CONNECTION
FLET SB-UNIX BODY IN SB-THREADRUN
FLET WITHOUT-INTERRUPTS-BODY
SB-THREADRUN
foreign function call_into_lisp
foreign function funcall
Connection to Emacs lost.
condition dcase failed WRITE-DONE 2
type SIMPLE-ERROR
style SPAWN

Searching in the Slime issues tracker eventually encouraged me to clean up m local .cache/common-lisp files. And that seems to have resolved it. There was lots of old stuff in there, going back to SBCL 2.0.1 from around 2020, and SBCL is now at 2.3.7.

Hope this helps others.