Skip to content
Tcl Source Code View Ticket
Login

View Ticket

testing existence of env(some_thing) destroys traces

Closed / Fixed9b47029467631832b6e9092f77eab7fd4e60f9d3Created 11 years agoUpdated 41 days ago
bchplain2016-02-15 23:14:51
[f6c1c6b4916aade8f7177b466|This commit] destroys traces on env() variables if the variables do not yet exist.

Example:

  proc foo args {
    puts "foo: $args"
  }

  trace add variable env(not_yet_existent) write foo
  info exists env(not_yet_existent)
  set env(not_yet_existent) "Now I'm here"; # trace fails to fire
jan.nijtmans Ticket [9b47029467]: 8 changes [History diff]2016-02-16 13:22:45
oehhar Ticket [9b47029467]: 3 changes [History diff]2016-02-19 09:29:47
jan.nijtmanswiki2016-02-19 10:54:27

Proposed fix in [5e24c6a9dbafaf63]. Donald, could you do a review please, since you did the env handling reform.

jan.nijtmanswiki2016-02-22 12:19:06

Fixed in trunk (and added test-case in core-8-5-branch). Kept "Pending" in case DKF would like to review it: There might be a better solution.

serhiy.storchakawiki2026-10-21 11:09:22

Fixed in 8.6.5 by [d644df2cad], with test env-7.3 (passes on trunk, 9.0 and 8.6). No review concerns came up since, so closing.

serhiy.storchaka Ticket [9b47029467]: 3 changes [History diff]2026-10-22 17:19:32
Log in (anonymous is fine) to add a comment.