|
2024-08-30
| ||
| 17:38 | Merge [aa039328b4322715]: Actual state of [info vars], before fix [0e4b7fce57] global vars still res... check-in: dc99257fed user: pooryorick tags: unchained, INCOMPATIBLE_LICENSE | |
|
2024-07-14
| ||
| 19:34 | • Closed ticket [0e4b7fce57]: Running info vars in a namespace returns global va... artifact: 28d8129a25 user: sebres | |
| 19:32 | fixes [0e4b7fce57]: [info vars] strictly follows TIP #278 and doesn't resolve global vars in non-glo... check-in: 5d2e5c3e82 user: sebres tags: trunk, main | |
| 19:20 | merge 8.7, actual state of [info vars], before fix [0e4b7fce57] global vars still resolved in namesp... check-in: aa039328b4 user: sebres tags: trunk, main | |
| 19:03 | amend to [3d8bf31bdc], ultimately fixes [0e4b7fce57]: [info vars] should not resolve global vars in ... check-in: ae17d84761 user: sebres tags: bug-0e4b7fce57 | |
| 14:00 | • Ticket [0e4b7fce57] Running info vars in a namespace returns global variables<... artifact: 3c25d7812c user: sbron | |
| 13:49 | Fix [0e4b7fce57]: Running [info vars] in a namespace returns global variables. check-in: 3d8bf31bdc user: sbron tags: bug-0e4b7fce57 | |
| 13:20 | • New ticket [0e4b7fce57] Running info vars in a namespace returns global variab... artifact: b76c95893e user: sbron | |
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.