philoskim / debux

A trace-based debugging library for Clojure and ClojureScript.
468 stars 19 forks source link

fix ns-symbol-for-cljs handling for local vars #26

Closed lucywang000 closed 2 years ago

lucywang000 commented 2 years ago

Currently debux would throw NPE when expanding this snippet in CLJS:

(defn f1
  [v]
  #d/dbgn (v))

A repro of the issue (a complete shadow-cljs project) could be find here: https://github.com/lucywang000/bugs-repro/tree/5a86fcdc19faa6a105a6c99338c3a11c290675dc/repro-debux-npe

The problem is the ns-symbol-for-cljs function would return a null symbol name when the symbol is a local variable.

philoskim commented 2 years ago

Thanks a lot again!

philoskim commented 2 years ago

The new version 0.8.2 of Debux has just been released reflecting your pull request.

Many thanks!