philoskim / debux

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

debux mishandles defn's attribute map #7

Closed jeaye closed 6 years ago

jeaye commented 6 years ago

Hey there! As per the docs, defn allows for attribute maps before the arities, as well as after. debux ends up wrapping these guys in debux.dbgn/d, which causes Clojure to choke. Here's the simplest test case showing the issue:

(dbgn
  (defn identity'
    {:private true}
    [x]
    x))

When trying to hook dbgn into an existing macro, which is taking advantage of these attribute maps, I've hit a wall. Hopefully this is something you're willing to support!

philoskim commented 6 years ago

I confirmed the issue you raised. I mistakenly had missed handling the attr-map and prepost-map in defn.

I will fix it as soon as possible. Thanks!

philoskim commented 6 years ago

The newer version 0.4.9 of debux has just been released, which supports attr-map and prepost-map in defn or defn-. If you find any problem in using debux, please let me know about it.

Thanks again for reminding me of these missed features.

jeaye commented 6 years ago

Thank you!