Fork me on GitHub
#cider
<
2019-11-13
>
iperdomo09:11:07

Hi all, I'm testing cider-path-translations and I was wondering if I can use function calls instead of fixed strings for the values - https://docs.cider.mx/cider/config/basic_config.html#_translate_file_paths

dpsutton13:11:32

Those should be static after getting the value yes? There’s a way to eval in dir locals so you should be good to go

iperdomo13:11:39

ok, testing again as I didn't make it work

iperdomo13:11:11

just found that one, will try it out

iperdomo08:11:40

I made several attempts and without luck ... the whole eval in local-dirs is too advanced for an Emacs newbie like me

iperdomo08:11:31

> You can specify the variables mode, eval, and unibyte in your .dir-locals.el, and they have the same meanings as they would have in file local variables. coding cannot be specified as a directory local variable. See File Variables.

iperdomo08:11:25

> eval evaluates the specified Lisp expression (the value returned by that expression is ignored).

Lucas Barbosa18:11:52

I was getting some NullPointerExceptions on a cljs project when cider tried to autocomplete. After browsing cider's repository, I found guidance to set cider-enhanced-cljs-completion-p flag to nil and it worked. Completion works, but now I wonder: am I loosing something significant by disabling this flag?

pez19:11:22

You are loosing completion on js interop stuff.

Lucas Barbosa19:11:07

Is there a simple way to find out the reason for the NPE? Like turning on some enhanced trace log or something like this.. sorry, I don't know much about the internals of the nrepl middleware

robertkrahn12:11:10

I don't think there is truly a simply way but one approach is to locate the cider-nrepl jar (e.g. ~/.m2/repository/cider/cider-nrepl/0.22.4/cider-nrepl-0.22.4.jar) and open it in emacs. Emacs is able to open and edit individual compressed files inside most jars. When you locate cider/nrepl/inlined_deps/suitable/v0v2v14/suitable/complete_for_nrepl.clj open it and change the debug var at the top to true. Restart the repl and see if you get a more helpful error output. If not, you can try to sprinkle in printlns.

robertkrahn12:11:42

A better way to debug is to have a clj and cljs repl into the same jvm process. I usually have an nrepl namespace in my projects that sets up the two nrepl servers. With that you can connect the clj session and then incrementally evaluate e.g. debug stmts in the jar code above. that saves you from restarts and such.