Skip to content
Tcl Source Code Check-in [ca5801aeac]
Login

Check-in [ca5801aeac]

Overview
Comment:The issue regarding the schedule no longer occurs: `set $r`—where `$r` is a `var<int>` link—correctly reads `::A` as of v13, and this remains the case in v15. While investigating, I discovered a similar scenario that was still failing, which I have now corrected (v15i). The remaining case tcl set nm2 {mm}n ;# a name carrying an annotation set $nm2 ;# v15: unknown type "mm" now: 7 The substituted name was being interpreted as a declaration in two places: within `set`, which passed it to the constructor; within the v14 redeclaration mechanism (`TclObjLookupVarEx`), which triggers upon every access—even a read—involving an annotated name. The applied rule A distinction must be made between two types of annotated names: Annotation Example Effect Written in the source `set {pt}p`, `lappend {list}M x` Declares (constructs using default values; triggers redeclaration) Carried by a substituted value `set $r`, `set $nm2` Declares nothing: a `set` command with a single argument performs a read, and a read operation does not trigger a redeclaration. The "schedule" rule—that "a `set` command with a single argument always performs a read"—could not be applied universally; for instance, `set {pt}p` (without a value) constructs an object using default values—a behavior that is explicitly documented. Consequently, this rule also applies to substituted names. There is a limitation, however. At runtime, an annotation written in the source can only be distinguished as such until it is resolved. Therefore, in a case like `set {rect}Q(A, $k) ...`—where the annotation is explicitly written but the remainder of the name is substituted—the original behavior persists whenever a value is present: it continues to perform a construction, as confirmed by test `t53`. For the same reason, a set $nm 9 is written (with an additional argument, the rule does not apply). Verifications Compared to v15, the project tests and examples remain unchanged, aside from previously known discrepancies. t35, t37, t52, t53, and t55 through t60 continue to yield their expected results. Regarding Tcl, there are 14 test files (covering variables, arrays, `set`, `upvar`, namespaces, etc.)—totaling 2,116 tests—which exhibit the same failures as in v15. I have verified that the four current kernel patches can be applied in sequence to a v15 build. Update Two type-related source files: `tclAnnotObj.c` and `tclTypes.h`. One kernel patch—`noyau/set-nom-substitue.patch`—which modifies `tclVar.c` and has been added to the end of `ORDRE.txt`. This is followed by `maj.sh`. A new test, `t61_set_nom_substitue`, has been added, along with a `v15i` section in `noyau/LISEZMOI.md`. This item has been marked as complete on the schedule.
Timelines: family | ancestors | descendants | both | tip-764_tcl90
Files: files | file ages | folders
SHA3-256: ca5801aeac76e818e31d08e9185dc909177bf40c40c8e7a729f258681c67fbe5
User & Date: Florentis on 2026-10-23 09:44:57.219
Other Links: branch diff | manifest | tags
Context
2026-10-23
09:56
This issue had already been fixed in the code; all that remained was to write the documentation, whi... check-in: afa40f8750 user: Florentis tags: tip-764_tcl90
09:44
The issue regarding the schedule no longer occurs: `set $r`—where `$r` is a `var<int>` link—corr... check-in: ca5801aeac user: Florentis tags: tip-764_tcl90
09:26
The bug has been fixed (v15h). I went a bit further than what was noted in the schedule: instead of ... check-in: a04ace5134 user: Florentis tags: tip-764_tcl90
Changes