cider

A channel dedicated to the Clojure Interactive Development Environment that Rocks (aka CIDER). :cider:
jhacks 2020-07-21T18:21:03.447100Z

I’m trying out cider-toggle-trace-var and cider-toggle-trace-ns. Is there any way to list the vars or namespaces that are being traced. It looks like some vars have the cider-traced-face applied and some don’t (in Emacs). Also, is there anyway to disable all tracing without tracking down each var/namespace individually?

jhacks 2020-07-21T18:21:54.447300Z

This is the reference I’m using: https://docs.cider.mx/cider/0.23/debugging/tracing.html

borkdude 2020-07-21T20:10:14.448300Z

Is it a good habit to check in .dir-locals files into source control? E.g. see https://github.com/borkdude/carve/pull/29. That PR wants to add a .dir-locals to "teach" CIDER that it should include :test profile from deps.edn. What are other ways of doing this?

bozhidar 2020-07-24T04:18:44.471800Z

Depends on the nature of the things in the .dir-locals.el - typically I check it in and include there stuff that are “standard” for the project. People can have a local .dir-locals2.el on top of this.

borkdude 2020-07-24T06:27:04.472Z

aha

dpsutton 2020-07-21T20:12:30.449300Z

its tough. if someone has more things in their dir-locals its better for it to be gitignored so there's no fighting and unstaged differences all the time

dpsutton 2020-07-21T20:12:53.449900Z

at work we recently had to have personal ones so put a template in the readme and added it to gitignore

borkdude 2020-07-21T20:13:25.450400Z

That's my feeling too. I don't want to dictate how people's editor config should look like.

borkdude 2020-07-21T20:14:07.451200Z

Does cider have an option to include alias deps when jacking in? I myself start the REPL always from the command line, but I guess a lot of people just use cider-jack-in

dpsutton 2020-07-21T20:14:35.451600Z

yes. jack in with a prefix allows editing of the jack in command

dpsutton 2020-07-21T20:14:58.452100Z

the keybinding is C-c M-j so C-u C-c M-j or C-u m-x cider-jack-in

borkdude 2020-07-21T20:17:05.452300Z

cool, thanks

practicalli-john 2020-07-21T20:18:12.452400Z

If it's just a common thing like a :test alias to add the test path, then it seems very low value. It's a general alias that can be added to the .clojure/deps.edn file and it can be used via C-u cider-jack-in as well as a .dir-locals.

borkdude 2020-07-21T20:20:59.452700Z

Thanks.

practicalli-john 2020-07-21T20:26:09.455400Z

If your project docs include guides on using with tools, you could include an example. There are lots of possible options for .dir-locals, e.g https://practicalli.github.io/spacemacs/clojure-projects/project-configuration.html

borkdude 2020-07-21T20:26:44.455700Z

Right, and that's a good reason not to include it in source control, because everyone wants to have a slightly different one

dominicm 2020-07-21T20:41:08.459Z

It's long been a wish of mine that project vs user configuration was distinguished. Edge does the "wrong" thing here, but the user experience is far better because of it. Edge's dir locals sets a few more things though.

dominicm 2020-07-21T20:42:01.460200Z

Vim doesn't really have any directory config, and the user space solutions are pretty flexible.

dpsutton 2020-07-21T20:43:10.461800Z

what is "edge" here?

borkdude 2020-07-21T20:44:09.462100Z

The new browser from Microsoft? Although I suspect that's not what he meant

dpsutton 2020-07-21T20:44:32.462600Z

yeah that's the only thing i can think of called edge. maybe is a vim plugin or something

practicalli-john 2020-07-21T20:46:45.462700Z

Reading the docs for Carve, the PR seems unrelated to the use of Carve. So I wouldn't even add this to the docs.

borkdude 2020-07-21T20:47:08.462900Z

this is carve, not calva

practicalli-john 2020-07-21T20:47:29.463100Z

Juxt Edge, a curated way to write Clojure projects https://www.juxt.land/edge/index.html

dominicm 2020-07-21T20:48:03.463900Z

Sorry. JUXT edge. The clojure starter project. https://github.com/juxt/edge This is what is generated: https://github.com/juxt/edge/blob/master/lib/edge-app-template/resources/clj/new/app.template/dir-locals.el

practicalli-john 2020-07-21T20:52:13.464800Z

Can't spell anymore... The docs on the repo of the PR doesn't seem to discuss running carve from a Clojure repl environment, just from a command line or CI service.

dpsutton 2020-07-21T21:04:49.465200Z

never used it. i'll give it a shot next time

dpsutton 2020-07-21T21:05:27.465600Z

not clear to me though. is that a sample repo that you clone and then change or is it a template for clj-new/lein new

borkdude 2020-07-21T21:17:09.465700Z

The PR is intented to make carve unit tests work with CIDER