Fork me on GitHub
#calva
<
2020-07-13
>
ikrimael06:07:30

is there a way to "unload"/reset everything from the repl without disconnecting & reconnecting?

ikrimael06:07:06

(context: i've changed a name of a function, the old one is still loaded and I want to forget it)

yuhan07:07:40

if it's just one var you want to unload, you can (ns-unmap *ns* 'old-fn-name)

yuhan07:07:14

cider-nrepl has a undef op to do this but it looks like calva doesn't support this yet

ikrimael07:07:49

thanks! is there one that does a clean full reset?

ikrimael07:07:36

or even if it's "force reload" entire namespace or current file

yuhan07:07:38

there are some tools out there that do this, you might want to check out the clojure.tools.namespace library or Stuart Sierra's Reloaded workflow

yuhan07:07:37

I've never used either myself, maybe someone else can be of more help-

pez09:07:53

Just forget about the old one? 😎

ikrimael10:07:19

😛 it causes bugs (e.g i forget to change the name in a call, get old behavior + new behavior and confusing runtime bugs)

pez12:07:41

I'll read that as well, @UNRL5S30U. 😃 For the specific use case, what I usually do when I rename a function is to redefine the old name such that it throws.

yuhan13:07:41

@pez It would be great for Calva to implement cider-undef - using it has the same effect that anything referencing the var throws a "unbound var" / "unable to resolve" error

bringe21:07:53

@yuhon If you want to make an issue in the repo for this enhancement that would be appreciated 😃. PRs are of course appreciated too if you have time, but an issue to start is good.

metal 3
snowell17:07:00

I'm seeing the "command 'paredit.deleteBackward' not found" error when I hit backspace. The only google result was this channel a month ago 😐

snowell17:07:49

To be fair, I used Calva a while ago, and am just now getting back to it. So there's every chance that there's some old config laying around. I did uninstall and reinstall to no avail

pez18:07:17

@snowell could it be that you have some other paredit extension installed?

snowell18:07:52

It absolutely could be that

snowell18:07:16

Like "Paredit for VS Code"

snowell18:07:47

Well, that's embarrassing 😄

😀 3
pez19:07:56

You are certainly not the first one. Maybe that extension has stopped working with more recent vs code.

bringe21:07:45

@pez I was just catching up on recent happenings here. I created this task for improving the docs for complete beginners. @way_gfp8cs and anyone else who might have something to add, please add it to that issue. https://github.com/BetterThanTomorrow/calva/issues/679

pez22:07:31

Awesome.