Running [info vars] in a namespace returns global variables
Running info vars in a fresh namespace in Tcl 9 reports the same list of variables that Tcl 8.6 does; the existing global variables.
However, since TIP #278 was implemented, global variables are no longer directly visible from within a namespace. They can only be accessed using their fully qualified names. It is therefor unexpected that info vars still reports them, especially by their simple name.
I also don't think the globals should be reported by info vars using their fully qualified name, because all variables can be accessed using their fully qualified names. Then, if globals are included that way, then all variables in all namespaces should be included. That would quickly become a mess.
dc99257fedMerge [aa039328b4322715]: Actual state of [info vars], before fix [0e4b7fce57] global vars still resolved in namespace. check-in2024-08-30 17:38:495d2e5c3e82fixes [0e4b7fce57]: [info vars] strictly follows TIP #278 and doesn't resolve global vars in non-global NS anymore (without extra global pattern) check-in2024-07-14 19:32:28aa039328b4merge 8.7, actual state of [info vars], before fix [0e4b7fce57] global vars still resolved in namespace check-in2024-07-14 19:20:45ae17d84761amend to [3d8bf31bdc], ultimately fixes [0e4b7fce57]: [info vars] should not resolve global vars in namespace by simple pattern too (see info-19.8 test); added tests covering the behaviour check-in2024-07-14 19:03:383d8bf31bdcFix [0e4b7fce57]: Running [info vars] in a namespace returns global variables. check-in2024-07-14 13:49:07
First attempt at a fix in the bug-0e4b7fce57 branch.
This change caused no test failures, so it seems that this functionality could also use better testing.
Fixed in [5d2e5c3e82] (with small amend and better test coverage), thus closing the ticket now as fixed.