practicalli

https://practicalli.github.io/ http://yt.vu/+practicalli (youtube)
practicalli-john 2020-10-22T00:04:00.099400Z

On a separate note, from Clojure CLI tools version 1.10.697 onwards I recommend using clojure -M:alias-name rather than the -A that is deprecated. I updated the https://github.com/practicalli/clojure-deps-edn#common-development-tasks with examples. This should not affect the workings of cider, so long as cider-jack-in is starting a REPL successfully.

2020-10-22T00:29:54.103Z

@jr0cket The biggest different seems to be the cider version. I'm running cider-20201020.1058. The weird thing is it all works without spacemacs and with spacemacs, only works with lein based projects. Interestingly, I just tried connecting using -M:test instead of -A:test and I get a new error - this time it is an error in process sentinal stating that FileInputStream.java could not be found.

practicalli-john 2020-10-22T00:41:39.104Z

I get the same message using the -M option, first time I've noticed this. Will take a look in the morning. I only get the message when pulling in the alias, so wonder if its related to the test.check library I am pulling in...

2020-10-22T00:49:03.105500Z

@jr0cket I notice you don't get any errors if you do clj -M:test from the command line, which wold also be pulling in test.check, so I suspect it may be something to do with cider-nrepl?

practicalli-john 2020-10-22T00:56:19.106400Z

My tests so far suggest using any alias with cider-jack-in-clj will cause the error. Very strange.

2020-10-22T01:01:46.108500Z

@jr0cket I just tried wiping out my .m2 cache, complete re-clone of spacemacs, complete re-install of all packages and still cider-clojurdocs fails with the wrong type argument. I also tried cider-connect-clj, but no luck, same error. The -M error is weird, -A works fine.

practicalli-john 2020-10-22T01:03:44.109400Z

I get the same results, -M doesnt work, -A works fine. I've asked a question in the #cider channel and will investigate tomorrow. Need to sleep now...

2020-10-24T22:07:03.113400Z

A new version of cider has been pushed to ELPA which fixes this issue.

practicalli-john 2020-10-24T22:52:17.113600Z

That was quick. My pull request was just accepted earlier today. Excellent.

2020-10-22T01:06:28.110500Z

@jr0cket Thanks. Sleep is important! I'm in Australia, so 11 hours in front of you - I've had my sleep, though this frustration makes me want to go back to bed!

practicalli-john 2020-10-22T16:43:50.111Z

Hopefully you saw the discussion in #cider channel. I recommend using -A for now with Cider jack-in when setting the aliases in a .dir-locals.el file. Or using the universal argument before cider-jack-in-clj and edit the command line to add -M aliases in the correct position.

2020-10-23T09:00:27.111200Z

Yep, using -A or C-u and editing the command woks fine. Sadly, still cannot resolve my issue with cider-clojuredocs not working. I've tried everything I can think of and am now out of ideas. Nobody elase seems to be able to reproduce the issue, so it has to be something unique to what I'm doing, but I can't find it. I even have the same issue on different accounts and on different machines. Looks like either I will have to not use codumentation lookup from within emacs, use non-spacemacs config or stick with lein projects. very frustrating. Anyway, thanks for getting to the bottom of the -M and for your other assistance.

practicalli-john 2020-10-23T09:11:33.111400Z

I'll take another look at the clojuredocs command over the weekend. You could backup your own .spacemacs config and try mine, to see if it makes any difference. You would just need to move your .spacemacs out of the way and clone this repo to ~/.spacemacs.d and start Emacs (it may give a warning about the fira font not being there, but otherwise should work fine) https://github.com/practicalli/spacemacs.d/

2020-10-23T12:28:39.111900Z

OK, I'll give that a go. I already us the fira fonts, so that is not an issue.

practicalli-john 2020-10-23T13:05:42.112100Z

I have a PR with the fix for the -M flag in Cider, so hopefully that will be included in the next release. Its only moving two lines, so you could also hack the code in the cider package in ~/.emacs.d/elpa/.../cider.../cider.el https://github.com/clojure-emacs/cider/pull/2917/files

2020-10-23T20:01:52.112300Z

Sad news. Installed from spacemacs.d repository, using deps.edn from clojure-deps-edn repository and tried out project cloned from four-clojure repository and have the same problem. Only thing I changed in spacemacs.d was theme (gotham) and font size. Also wiped out .cache and elpa directories from .emacs.d so that all was 'fresh'. Updated to latest spacemacs develop as well.

2020-10-25T18:18:46.113800Z

@jr0cket Finally worked out what the issue is thanks to some help from Martin Racak. When running under spacemacs, you must load/evaluate the buffer at least once before documentation links work correctly (e.g. , h). Once you have loaded or evaluated the buffer, all works fine. This is not the case outside of spacemacs.

practicalli-john 2020-10-25T19:04:18.114Z

Great news. I think I tend to evaluate code before using doc functions. I am also used to just typing clojure something in a browser. However, having clojuredocs function now, I'm more likely to stay in Emacs.

2020-10-25T19:34:26.114200Z

Yes, I tend to use cider-apropos and cider-clojuredocs quite a bit and being able to do this quickly and easily inside emacs is something I've grown very use to. Still a bit weird that you don't need to manually evaluate the buffer when using pretty much the same setup outside of spacemacs. I originally 'discovered' this issue when working on a brand new project. I hadn't yet evaluated the buffer because I hadn't yet written anything needing evaluation. I wanted to just check the docs for a core function and did , h d and that is when the wheels dropped off!

2020-10-22T11:39:01.110600Z