Fork me on GitHub
#cider
<
2021-10-26
>
javahippie07:10:31

I upgraded my packages yesterday (I’m using Doom Emacs, so doom upgrade), and now I get an error when opening clj files or trying to launch cider: Error (clojure-mode-hook): Error running hook "clj-refactor-mode" because: (file-missing Cannot open load file No such file or directory cider-jar). Googling the error message did not help that much, do you have any pointers for me?

vemv07:10:50

https://github.com/clojure-emacs/cider/blob/master/cider-jar.el is new, I'd make sure that your cider.el is the latest snapshot

javahippie07:10:31

Hmmm have to dig into that, everything regarding clojure and cider was managed by doom until now and I never had to do anything manually.

bozhidar07:10:45

Did you restart Emacs after the package update? From time to time this fixes problems with package.el.

bozhidar07:10:58

Reinstalling packages manually also helps.

javahippie07:10:01

@U45T93RA6 Thanks for the help, got a starting point! cider-jar.el is in the repository, that looks fine to me.

javahippie07:10:26

@U051BLM8F Yes, Emacs was restarted. Also cleaned out the repositories folder and ran doom sync again

vemv07:10:37

Same error?

javahippie07:10:41

Yes. The cider repo in .emacs.d/.local/straight is on 0a9d0ef429e76ee36c34e116c4633c69cea96c67

vemv07:10:46

Does (require 'cider-jar) succeed in a repl? (or other Elisp eval command)

javahippie07:10:05

> Reinstalling packages manually also helps. That did the trick for me. I’d like to know the root cause and might look into it again later, but for now I needed everything to work again. Thanks for your help!

✌️ 1
vemv07:10:13

Sounds good! Might have been cached byte compilation

vemv07:10:53

(for which the fix is removing all .elc files recursively within .emacs.d prior to starting Emacs - it's always a harmless step)

bozhidar07:10:08

I think removing a package also removes its bytecode, but I might be mistaken. At any rate - such issues with bytecode that didn't get properly recompiled are very common.

javahippie07:10:46

Might fit these messages, I am just seeing right now?

vemv07:10:00

definitely :) I'd guess that those messages would go away on subsequent Emacs sessions as the code get compiled again

❤️ 1
javahippie07:10:34

Ha, learned something. Will do the cleanup of .elc files as you suggested, thanks!

vemv07:10:44

:) Perhaps doom or straight.el maintainers would appreciate an issue report so that they can improve .elc handling

javahippie08:10:45

Absolutely, will try to write down the steps I did and the results 👍