tools-deps

pez 2026-03-16T09:05:27.392549Z

Because reasons I got commas “separating” my aliases on this command line clojure -M:allow-attach-self,:dev,:test. I expected it to work, because commas are whitespace, but it doesn’t, it complains about [:allow-attach-self, :dev,]. What’s the rationale here?

Alex Miller (Clojure team) 2026-03-16T13:01:24.805509Z

The command line is not edn

Alex Miller (Clojure team) 2026-03-16T13:02:58.910439Z

This is just parsing inside a bash script and it only supports concatenated keyword forms

pez 2026-03-16T13:15:48.659249Z

Thanks. Yeah, not edn, but it looked Clojure-y enough to me that I was assuming edn semantics. The problem for me now is that Calva has thing that has been producing these alias list comma separated for a thing for several years. No-one has complained so I guess people just handle the inconvenience. Most significantly people will have scripts that assume those commas, so I can’t really fix it.

Alex Miller (Clojure team) 2026-03-16T13:34:29.684989Z

I guess the actual parser here is in Clojure in tools.deps, that whole chunk is just passed through. But in any case, I'd say whats documented is concatenated keywords

Alex Miller (Clojure team) 2026-03-16T13:35:07.373539Z

What is the actual problem you're running into?

pez 2026-03-16T13:57:06.795319Z

When supplying a custom command line for Calva Jack-in the command can use some substitution variables, one of them is the aliases. So Calva will construct a command where this placeholder is replaced with a comma separated string of aliases selected. The use cases I had in mind when doing it like this was most often that you would use a call to a shell script, babashka task, python script, or whatever as the custom command. And this script would split the list and construct whatever is needed for the target repl-starting command. But quite often the shell script wouldn’t be needed, and you could go straight at clojure, or bb, or whatever. Except, the commas are party poopers.

pez 2026-03-16T13:59:42.896999Z

deps-clj is compatible about not liking the commas, btw. 😃

Alex Miller (Clojure team) 2026-03-16T14:01:14.334469Z

I guess I don't understand why you can't just make the expected thing

pez 2026-03-16T14:11:47.758539Z

Expected thing = skip the commas? I think that would break some uses of this variable. But I could introduce a new variable which is just the string to use as is…

Alex Miller (Clojure team) 2026-03-16T14:17:38.026709Z

yes, as a fan of non-breakage, I would make a new thing without the commas

1