This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-03-14
Channels
- # announcements (10)
- # architecture (3)
- # atom-editor (1)
- # babashka (53)
- # babashka-sci-dev (118)
- # beginners (74)
- # biff (10)
- # calva (13)
- # clara (13)
- # clerk (20)
- # clj-commons (17)
- # clj-kondo (6)
- # cljdoc (19)
- # cljs-dev (3)
- # clojars (2)
- # clojure (63)
- # clojure-art (2)
- # clojure-europe (68)
- # clojure-nl (1)
- # clojure-norway (6)
- # clojure-uk (3)
- # clojured (19)
- # clojurescript (34)
- # clr (1)
- # cursive (11)
- # emacs (12)
- # fulcro (3)
- # helix (2)
- # holy-lambda (2)
- # honeysql (27)
- # hyperfiddle (36)
- # malli (2)
- # off-topic (72)
- # polylith (4)
- # rdf (20)
- # re-frame (20)
- # reitit (4)
- # rewrite-clj (14)
- # shadow-cljs (17)
- # slack-help (2)
- # tools-deps (36)
- # xtdb (3)
In #C04QVMQ39LG there is now a edamame/parse-ns-form
function which returns a map which could be used with rewrite-clj's sexpr options as well (if you massage it in the right form, of course)
it's the same as this:
https://github.com/borkdude/ns-parser/blob/bbdb60ec67af0c8e7adf820b71966bd3bee6569d/test/borkdude/ns_parser_test.cljc#L8
but I moved that parse-ns-form
into edamame core instead of a separate lib
Cool. Curiosity: A while back we had thought rewrite-clj should not take on the job of interpreting namespaces. Edamame is now doing so, do you think rewrite-clj should/could also be doing so?
Yeah. I was on the fence but it came up quite often that I just bit the bullet. We could do it as an option, similar to edamame.
What I did in edamame is :auto-resolve-ns true
and if the alias still isn't found based on that, I fall back on the :auto-resolve
options
it could also be argued that :auto-resolve
should be tried first, then based on the ns state and then falling back on auto-resolve again
Yeah, the :auto-resolve
support being there is good, but I expect it goes unused because folks just have no idea what to hook up to properly interpret nses.