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?
The command line is not edn
This is just parsing inside a bash script and it only supports concatenated keyword forms
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.
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
What is the actual problem you're running into?
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.
deps-clj is compatible about not liking the commas, btw. 😃
I guess I don't understand why you can't just make the expected thing
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…
yes, as a fan of non-breakage, I would make a new thing without the commas