Fork me on GitHub
#cider
<
2020-10-08
>
ozzloy_clojurians_net01:10:30

what's the right way to make a change to .dir-locals.el and have variable be set in the currently open files?

ozzloy_clojurians_net01:10:05

for example, line 5 here: https://gitlab.com/ozzloy/figserv/-/blob/master/.dir-locals.example.el#L5 is supposed to start my server when starting cider.

ozzloy_clojurians_net01:10:47

i've tried closing and re-opening the .cljs file, i've tried m-x revert-buffer,

ozzloy_clojurians_net01:10:04

this may have something to do with me having .dir-locals.el as a symlink to .dir-locals.example.el, that's just a guess though.

dpsutton01:10:47

Easiest is probable restarting emacs. Thereโ€™s a function โ€œhack-local-variablesโ€ that might help as well. Check out the documentation on that

jr0cket02:10:33

@ozzloy_clojurians_net Reverting the buffer or reopening the same file has always loaded in the .dir-locals.el file for me. Although I have never tried using a symlink.

ozzloy_clojurians_net02:10:59

it turned out the help buffer wasn't updating

ozzloy_clojurians_net02:10:07

i killed and re-opened it

ozzloy_clojurians_net02:10:33

i tried removing the symlink and re-`C-h v variable`

ozzloy_clojurians_net02:10:30

sorry, that was scattered. i tried again without symlink and just copied the .dir-locals.example.el to .dir-locals.el and that didn't work. i then tried killing the help buffer that displays the value of the variable, and then re-doing C-h v variable-name and then i finally got the new value displayed.

ozzloy_clojurians_net02:10:13

but now i have a different problem. i added "--init src/fyi/tuwo/figserv/server.clj" to the clojure command line and now it's looking for a file named "-Sdeps", here's the messages buffer: https://www.appdevtools.com/pastebin/FCGXrp

ozzloy_clojurians_net02:10:00

i'm trying putting the --init src/... at the end, that didn't fail in the same way when i ran it in bash

ozzloy_clojurians_net03:10:56

ok, maybe i don't know what i want

dpsutton03:10:07

What are you trying to do?

jr0cket07:10:54

@ozzloy_clojurians_net It sounds like the auto-injected configuration that cider-jack-in uses is conflicting with the alias set in the .dir-locals.el configuration. Assuming you can connect to the project without Cider injecting the extra dependencies, then you can disable them using the following in a .dir-locals.el

((clojure-mode . ((cider-preferred-build-tool . clojure-cli)
                  (cider-clojure-cli-global-options . "-M:lib/cider-nrepl:inspect/rebl:middleware/nrebl")
                  (cider-jack-in-dependencies . nil)
                  (cider-jack-in-nrepl-middlewares . nil)
                  (cider-jack-in-lein-plugins . nil)
                  (cider-clojure-cli-parameters . "")))) 
The Clojure project will need to include the cider-nrepl library or have that library included in the alias used to start the project, for example http://practicalli.github.io/clojure/clojure-tools/data-browsers/rebl-data-visualization.html#run-rebl-for-nrepl-based-editors

ozzloy_clojurians_net07:10:49

@jr0cket i might try that tomorrow. going to wrap up and go to sleep soon.

jr0cket07:10:23

I've just woken up, good luck ๐Ÿ™‚

ozzloy_clojurians_net07:10:03

@jr0cket & @dpsutton i'm trying to make play a game of bingo with my grampa, and other family. http://bingo.challenge-bot.com/ is what i have so far. it serves an isolated bingo game to each person that connects. i'd like to sync multiple players up by having them share the called numbers. i'm currently trying to do that with sente

ozzloy_clojurians_net07:10:54

i'm thinking sente can make it so the server knows the current called numbers and push that out to the players. and there can be a master player in charge of adding numbers to the list of called numbers

jr0cket07:10:10

I assume you mean this project (and not the anti-aging skin care) https://github.com/ptaoussanis/sente

ozzloy_clojurians_net07:10:41

current code for the bingo game is here: https://gitlab.com/ozzloy/b1ng0/ but right now i'm working on a throwaway thing just to learn the libs (sente, compojure, ring etc)

ozzloy_clojurians_net07:10:10

i'm not married to sente. if there's a way that someone knows that is easier, i'm down to try.

ozzloy_clojurians_net07:10:26

good night, and thank you all!

timvisher14:10:42

Is it expected that CIDER (emacs) and cider-nrepl (leiningen plugin) are now out of sync? CIDER is on 0.26 and cider-nrepl is on 0.25.4.

dpsutton15:10:06

yes they are no longer in lockstep

(defconst cider-required-middleware-version "0.25.3"
  "The CIDER nREPL version that's known to work properly with CIDER.")
in cider.el line 408

dpsutton15:10:27

(apparently i'm a few commits behind)

timvisher15:10:36

Sweet. That's kind of what I figured. It was nice to connect to the REPL and not get the big scary "YOUR VERSIONS MISMATCH HEATHEN REBEL SCUM!" message. ๐Ÿ˜‚

dpsutton15:10:27

"THINGS WILL BREAK AND ITS YOUR FAULT! I"M DROPPING ALL YOUR TABLES AS WE SPEAK!"

timvisher15:10:05

At least that's how I always read it. LOL

bozhidar15:10:52

๐Ÿ˜„ ๐Ÿ˜„ ๐Ÿ˜„

bozhidar15:10:55

> Prior to CIDER 0.18, CIDER and cider-nrepl were always released together and their versions had to match for things to work (e.g. CIDER 0.15 required cider-nrepl 0.15). But as the prominence of cider-nrepl grew and many other tools started using it, the two projects evolved separately and are no longer in tight lock-step. Usually, any recent version of cider-nrepl should be (mostly) compatible with a recent version of CIDER. You can check the required version of cider-nrepl for your version of CIDER by looking at cider-required-middleware-version.

timvisher16:10:29

I knew you all would've written about it somewhere.

timvisher16:10:58

Thanks for your tireless efforts, @bozhidar! Although I still wish my logo had been accepted for the project. ๐Ÿ˜œ

timvisher16:10:13

(Not bitterโ€ฆ)

dpsutton16:10:28

what was the logo? got it handy?

timvisher17:10:07

LOL I'll see if I can dig it up. I'm sure I have it Dropbox somewhere. ๐Ÿ™‚

timvisher17:10:33

My favorite comment was @bozhidar telling me how it looked like a frozen chicken! ๐Ÿ˜‚ https://github.com/clojure-emacs/cider/issues/399#issuecomment-27909759

timvisher17:10:41

God this is bringing back memories.

dpsutton17:10:50

frozen chicken! lol

bozhidar19:10:52

@timvisher I'm laughing out loud right now! I remember your logo proposals, but I definitely didn't remember that comment I made. ๐Ÿ˜„ ๐Ÿ˜„ ๐Ÿ˜„