tools.trace

untrace-var* removes only the highest level of tracing created by trace-var*

Details

  • Type: Enhancement Enhancement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
  • Environment:
    Clojure 1.2-1.5.1

Description

Calling trace-var* (or using the macro trace-vars) multiple times on the same var(s) adds multiple tracing levels.
To remove tracing completely, untrace-vars* has to be called at least the same number of times on the traced var(s).

This behavior is annoying at the REPL where a single call to untrace-vars* would untracing much more simpler.
However such a behavior might be desirable when programatically driven.

Comments welcomed.

Activity

Hide
Luc Préfontaine added a comment -

Official release 0.7.8, bad readme in 0.7.7

Show
Luc Préfontaine added a comment - Official release 0.7.8, bad readme in 0.7.7
Hide
Luc Préfontaine added a comment -

trace-var* is now a noop if the fn is already traced

Show
Luc Préfontaine added a comment - trace-var* is now a noop if the fn is already traced
Hide
Luc Préfontaine added a comment -

After mulling over this, I think that the "recursive" behavior is not needed.
I see no added value even from a programmatic standpoint of allowing this behavior.

So calling trace-vars* on the same var has now on will not have any effect
after the first call.

Hence a single call to untrace-vars* will remove the trace at all times.

Took me some time but finally got through it

Show
Luc Préfontaine added a comment - After mulling over this, I think that the "recursive" behavior is not needed. I see no added value even from a programmatic standpoint of allowing this behavior. So calling trace-vars* on the same var has now on will not have any effect after the first call. Hence a single call to untrace-vars* will remove the trace at all times. Took me some time but finally got through it

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: