This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-05-13
Channels
- # admin-announcements (17)
- # aleph (1)
- # arachne (2)
- # boot (152)
- # braveandtrue (8)
- # cljs-dev (12)
- # cljsjs (3)
- # cljsrn (1)
- # clojure (105)
- # clojure-austin (1)
- # clojure-belgium (5)
- # clojure-berlin (1)
- # clojure-brasil (5)
- # clojure-canada (2)
- # clojure-dev (6)
- # clojure-gamedev (1)
- # clojure-greece (9)
- # clojure-russia (39)
- # clojure-uk (9)
- # clojurescript (106)
- # component (4)
- # cursive (1)
- # data-science (3)
- # datascript (1)
- # datomic (9)
- # emacs (6)
- # hoplon (92)
- # jobs (1)
- # ldnproclodo (2)
- # lein-figwheel (1)
- # off-topic (19)
- # om (47)
- # om-next (1)
- # onyx (10)
- # other-languages (1)
- # proton (1)
- # re-frame (5)
- # reagent (36)
- # rethinkdb (1)
- # ring (2)
- # rum (1)
- # yada (14)
turns out that DevTools developers just recently added a new experimental feature “sourceNamesResolver”[1]. [1] https://github.com/binaryage/dirac/blob/master/resources/unpacked/devtools/front_end/sources/SourceMapNamesResolver.js
it is pretty sophisticated system for resolving original variable names using information from source maps
their use case is for people who want to debug/inspect production code which was minified/closure-compiled. if one has matching source maps setup, devtools will provide user-friendly source panel and variable names using source map info
but this has a nice side effect for clojurescript + sourcemaps, it is able to resolve original variable names:
if you look at the screenshot above, you can see that in my code I defined odd-count?
and it got properly resolved by their resolver
unfortunately macro-expanded names are currently broken, but this will be probably easy to fix
I think this will allow me to completely avoid relying on demunge
when collecting locals from scope chain
btw. demunge didn’t work that well, because gensym
-d names used in macros should not be considered for demunge, but I have no easy way how to detect them