This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-02-16
Channels
- # announcements (33)
- # asami (37)
- # autochrome-github (1)
- # aws (5)
- # babashka (26)
- # babashka-sci-dev (18)
- # beginners (63)
- # biff (1)
- # calva (66)
- # cider (15)
- # clj-kondo (24)
- # cljs-dev (2)
- # cljsrn (14)
- # clojure (62)
- # clojure-doc (1)
- # clojure-europe (15)
- # clojure-nl (11)
- # clojure-spec (12)
- # clojure-uk (4)
- # clojurescript (45)
- # community-development (2)
- # cursive (34)
- # datahike (7)
- # datomic (7)
- # events (1)
- # figwheel-main (5)
- # fulcro (19)
- # gratitude (7)
- # holy-lambda (85)
- # hyperfiddle (4)
- # jobs (7)
- # jobs-discuss (25)
- # kaocha (4)
- # lsp (11)
- # off-topic (1)
- # polylith (20)
- # portal (14)
- # practicalli (6)
- # proletarian (5)
- # rdf (52)
- # re-frame (13)
- # reagent (48)
- # releases (1)
- # remote-jobs (3)
- # shadow-cljs (7)
- # tools-deps (17)
@seancorfield nice. I went with the stdin approach given that JSON is going to be nye impossible to trust as a bash arg.
@cjsauer In bash’s defence, it should work fine when passing the arg as JSON to a -M -m invocation. The extra quoting required by the EDN parsing of -X is what makes this hard. In Clojure CLI’s defense, it can make other things easy ;-).
Perhaps the clojure CLI can have some convention to prevent the argument from being parsed as EDN. E.g.:
clojure -X foo/bar :foo 1 :bar @$(.. some json here ...)
An @
isn't valid in EDN anyway and it's just one character to check to see if the arg must be handled as a literal string instead.you know where to make requests... :)
Before making requests, hearing a firm :face_vomiting: , no, or such can save me time ;)
But a "hmm, not a bad idea, will consider, could you make an ask" will be enough for me to create one :)
willing to consider :)
Asked: https://ask.clojure.org/index.php/11585/consider-convention-for-bypassing-edn-parsing-in-x-usage
Yeah, like most folks, I too prefer to ping on Slack for a :face_vomiting: or reaction before investing time in crafting a more formal issue or request.
I may have found a nicer convention as the leading character:
$ clojure -X foo/bar :foo /dude :bar '"dude"' ;;=> (foo/bar {:foo "dude" :bar "dude"})
A leading slash. Normally this would result into an invalid symbol (or something else invalid) when reading EDN, so it would probably not be breaking anything. It's kind of irrelevant if we go with /
or @
but since @
in command line args often denotes reading a file's contents, maybe it's better to reserve that one for later.can you put suggestions on the ask question please?