From: <apn...@ya...> - 2024-07-02 02:31:43
|
Yes, that would seem to be a false negative. Does not seem to account for reference to array elements when the array variable is declared. Should be fixable..I think. Thanks for the feedback From: Paul Obermeier <pa...@po...> Sent: Tuesday, July 2, 2024 3:14 AM To: tcl...@li... Subject: Re: [TCLCORE] Migration tool for Tcl 9 For the following simple test script: namespace eval poImg { variable DrawPos set DrawPos(x) 0 set DrawPos(y) 0 } I get the following warnings from tcl9-migrate: Line 4: W Variable "DrawPos(x)" possibly set without a variable or global declaration within namespace ::poImg. [UNDECLARED] Line 5: W Variable "DrawPos(y)" possibly set without a variable or global declaration within namespace ::poImg. [UNDECLARED] Is this a false negative? Paul Am 01.07.2024 um 22:42 schrieb Paul Obermeier: Hi Ashok, thanks for this great tool. I found several Tcl9 related issues (esp. [RELATIVENS] and [UNDECLARED]) in my Tcl sources, which are otherwise difficult to find. The runtime checker works, too. Best regards, Paul Am 01.07.2024 um 09:44 schrieb apnmbx-public--- via Tcl-Core: All, I've been working on a tool to help with migration of Tcl 8 scripts to Tcl 9. It includes a static checker based on Nagelfar as well as a runtime shim that fixes up incompatibilities like i/o encoding errors, tilde expansion, package requirements etc., allowing the scripts to be loaded while emitting warnings. Repository: https://github.com/apnadkarni/tcl9-migrate Docs: https://github.com/apnadkarni/tcl9-migrate/blob/main/README.md Download: https://github.com/apnadkarni/tcl9-migrate/releases/tag/v0.1 I'm looking for testers and feedback on both the tool as well as documentation (explanation of the warnings). I'd appreciate testing with your Tcl 8 (or ported to Tcl 9) code bases. Please log tickets in above repository. Be warned it has (and always will have) false positives and false negatives but the hope is it will nevertheless be useful in saving time. Thanks /Ashok _______________________________________________ Tcl-Core mailing list Tcl...@li... <mailto:Tcl...@li...> https://lists.sourceforge.net/lists/listinfo/tcl-core _______________________________________________ Tcl-Core mailing list Tcl...@li... <mailto:Tcl...@li...> https://lists.sourceforge.net/lists/listinfo/tcl-core |