The problem is with the way EnvTraceProc works: for array traces it calls TclSetupEnv, which in turns first deletes the env variable and then recreates it. The deletion cancels all searches.
What this means is that the env array cannot be searched at all. This should be either fixed or documented.
Wary to muck with this stuff, especially since:
(a) the bug is prehistoric, raised few complaints, no tests available
(b) the bug combines two touchy issues (array searches and env), a fix may introduce subtle new bugs
Requesting comments.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=148712
Originator: NO
Same result on 8.34, 8.4.14, 8.5a6 (pre varReform), HEAD.
Logged In: YES
user_id=148712
Originator: NO
The problem is with the way EnvTraceProc works: for array traces it calls TclSetupEnv, which in turns first deletes the env variable and then recreates it. The deletion cancels all searches.
What this means is that the env array cannot be searched at all. This should be either fixed or documented.
Wary to muck with this stuff, especially since:
(a) the bug is prehistoric, raised few complaints, no tests available
(b) the bug combines two touchy issues (array searches and env), a fix may introduce subtle new bugs
Requesting comments.