This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-07-27
Channels
- # announcements (16)
- # architecture (19)
- # beginners (31)
- # calva (2)
- # cider (1)
- # clerk (4)
- # clj-yaml (58)
- # cljdoc (2)
- # cljs-dev (10)
- # clojure (77)
- # clojure-europe (108)
- # clojure-norway (26)
- # clojure-sanfrancisco (2)
- # conjure (1)
- # cursive (2)
- # datahike (5)
- # datomic (13)
- # emacs (7)
- # etaoin (3)
- # hyperfiddle (15)
- # introduce-yourself (3)
- # kaocha (1)
- # off-topic (21)
- # reagent (4)
- # releases (1)
- # shadow-cljs (41)
- # spacemacs (28)
- # specter (8)
- # squint (30)
- # yamlscript (2)
It would seem very much handy for tool makers if the cljs analysis (i.e. the object that has a :cljs.analyzer/namespaces
key, among others included a :form
when descring a var
e.g. I'm asking for a :form to be associated here:
{:meta {,,,},
:form (def foo 42) ;; <--------------
:name shadow.remote.runtime.api/foo,
:file "shadow/remote/runtime/api.cljc",
:end-column 30,
:column 8,
:line 13}
is this a FAQ / something you'd consider?you should be able to get that from the line/col metadata? well the string at least. https://github.com/clojure/clojurescript/blob/1b6d4e559bfaa716052c557f6fa31111384eb336/src/main/clojure/cljs/repl.cljc#L1495
An edge case being, forms defined at the repl / interactively, those cannot be fetched from source+line+col Given that those would be like < 1% off all cases, it would not be memory-expensive to include them
currently this data is written to disk as transit per namespaces (for shadow-cljs at least)
what would you do with the form in the first place though? should probably first provide a proper use case before anything is decided 😛
Thanks. The use case would be "arbitrary tooling stuff". The usual suspects: offering better completions, refactorings, info, and such.
otherwise it might increase memory use? and may contain not easily serialized stuff, e.g. regexes are not part of EDN or transit by default