fwiw, I ripped out the ns-map altogether in core.typed.analyzer.jvm
. to compensate, I added dynamic vars resolve-{ns,sym}
.
here's the new def of macroexpand-1 https://github.com/clojure/core.typed.analyzer.jvm/blob/9950f5b30ca888e1a721d62c60909b3c015f5e6b/src/main/clojure/clojure/core/typed/analyzer/jvm.clj#L85
the jvm implementation of resolve-ns https://github.com/clojure/core.typed.analyzer.jvm/blob/9950f5b30ca888e1a721d62c60909b3c015f5e6b/src/main/clojure/clojure/core/typed/analyzer/jvm.clj#L187
and the jvm impl of resolve-sym https://github.com/clojure/core.typed.analyzer.jvm/blob/9950f5b30ca888e1a721d62c60909b3c015f5e6b/src/main/clojure/clojure/core/typed/analyzer/jvm.clj#L200
a few other things needed changing, but I reuse many tools.analyzer passes as-is. Things like desugar-symbol
, desugar-host-expr
, maybe-class-literal
, macro?
, inline?
need new implementations, which you can find in the above file or here https://github.com/clojure/core.typed.analyzer.jvm/blob/9950f5b30ca888e1a721d62c60909b3c015f5e6b/src/main/clojure/clojure/core/typed/analyzer/jvm/utils.clj
oh, I also ripped out *env*
.
probably a lie that I use the passes as-is, because I delete some dependencies and copy somethings around.
Thanks! I’ll look into that.