Menu

#2953 cannot delete trace

obsolete: 8.4.7
closed-fixed
46. Traces (50)
5
2004-11-15
2004-11-12
No

I'm using 8.4.7 and I find that I cannot delete a trace
using "trace remove variable" while I can with the soon-
to-be-obsolete "trace vdelete".

Example script:
proc Trace {var1 var2 op} {puts "in
Trace: '$var1' '$var2' '$op'"}
trace variable myVar w Trace
trace info variable myVar ;# There it is

trace remove variable myVar w Trace ;# error
must be "write"
trace remove variable myVar write Trace
trace info variable myVar ;# Still there

trace vdelete myVar w Trace ;# works
trace info variable myVar ;# gone

Keith

Discussion

  • Don Porter

    Don Porter - 2004-11-12
    • labels: 105659 --> 46. Traces
    • milestone: --> obsolete: 8.4.7
    • assigned_to: dkf --> dgp
     
  • Don Porter

    Don Porter - 2004-11-13

    Logged In: YES
    user_id=80530

    confirmed on the core-8.4
    tip of development and on
    the HEAD.

    This likely traces back to
    a mistaken implementation
    choice that kept support for
    the old subcommands in place
    with a separate set of code from
    the new subcommands, rather
    than doing it wrapper style
    with the old name ultimately
    invoking the new implementation.

    Thanks for the bug report.
    Until a fix shows up, work around
    it by balancing [trace variable] with
    [trace vdelete] and [trace add] with
    [trace remove].

     
  • Don Porter

    Don Porter - 2004-11-13
    • priority: 5 --> 9
     
  • Don Porter

    Don Porter - 2004-11-15
    • status: open --> closed
     
  • Don Porter

    Don Porter - 2004-11-15
    • priority: 9 --> 5
    • status: closed --> closed-wont-fix
     
  • Don Porter

    Don Porter - 2004-11-15

    Logged In: YES
    user_id=80530

    after looking into this, it seems that
    because the [trace] syntax changed
    at the same time that the acceptable
    values for variable trace operations
    changed (rwua -> read write unset array),
    the consequence is the two forms of
    variable traces are not interchangeable.
    (They differ notably in the ops arguments
    passed to the trace itself). So, the only
    viable workaround it to just be consistent.
    Either stick with the old form, or convert
    fully to the new form. Don't try to mix and
    match.

     
  • Don Porter

    Don Porter - 2004-11-15
    • status: closed-wont-fix --> open-wont-fix
     
  • Don Porter

    Don Porter - 2004-11-15

    Logged In: YES
    user_id=80530

    oops. spoke too soon. Got a fix
    coming after all.

     
  • Don Porter

    Don Porter - 2004-11-15
    • priority: 5 --> 9
    • status: open-wont-fix --> open-remind
     
  • Don Porter

    Don Porter - 2004-11-15
    • status: open-remind --> closed-remind
     
  • Don Porter

    Don Porter - 2004-11-15

    Logged In: YES
    user_id=80530

    Here's a patch.

     
  • Don Porter

    Don Porter - 2004-11-15
    • priority: 9 --> 5
    • status: closed-remind --> closed-wont-fix
     
  • Don Porter

    Don Porter - 2004-11-15
     
  • Don Porter

    Don Porter - 2004-11-15

    Logged In: YES
    user_id=80530

    fixed for 8.4.8 and 8.5a2.

     
  • Don Porter

    Don Porter - 2004-11-15
    • status: closed-wont-fix --> closed-fixed