this bug could be seen on windows:
I start with a command shell:
c:\> set A=VALUE
c:\> tclsh
% append env(A) 123
VALUE123
% exit
good!
c:\> tclsh
% puts $env(a)
VALUE
% append env(a) 123
VALUE123
% exit
good!
c:\> tclsh
% # no puts
% append env(a) 123
123
% puts $env(a)
123
% exit
huh?
Logged In: YES
user_id=148712
I don't even a windows platform to test this, and it does
seem windows specific. At least if there is no typo in the
report, I infer that
1. windows env vars are not case sensitive
2. the case conversion is probably done by a read trace
Note that we do *not* trigger read traces on append (even
though we do on lappend). Comment in tclVar.c line 1604 is
relevant, as well as the fact that TCL_TRACE_READS is not
passed in line 2309 (HEAD refs).
I do not see how we could fix this; maybe Kevin has an idea.
Logged In: YES
user_id=13583
I don't know the internal details, but after the first
access of env(a) it seems to work. Because the system
environment shouldn't change after the start of an
application, it could be solved by "initialize" env on
startup (however this is to be done internally). This costs
a startup penalty. (but maybe the read trace on
env could be removed).