2025-01-30
| ||
13:15 | • Ticket [70f3b23cad] Tcl_InitStubs: is the "-" in the version requirement "8.5-" allowed? status still Closed with 6 other changes artifact: 1761c14c8b user: oehhar | |
2025-01-13
| ||
09:56 | • Ticket [70f3b23cad]: 5 changes artifact: 2781e9247d user: jan.nijtmans | |
09:11 | • Ticket [70f3b23cad]: 6 changes artifact: b1874f9610 user: oehhar | |
08:35 | • Ticket [70f3b23cad]: 5 changes artifact: 9369d94098 user: jan.nijtmans | |
07:25 | • Ticket [70f3b23cad]: 6 changes artifact: d892e9b835 user: oehhar | |
2025-01-12
| ||
18:15 | • Closed ticket [70f3b23cad]. artifact: 8a594be2b6 user: jan.nijtmans | |
18:10 | Fix [70f3b23cad]. Doc fix only check-in: 5d7aa913b0 user: jan.nijtmans tags: trunk, main | |
18:04 | Fix [70f3b23cad]. Doc fix only check-in: e3fb9432f2 user: jan.nijtmans tags: core-8-branch | |
17:51 | Fix [70f3b23cad]. Doc fix only check-in: 9ab8873b08 user: jan.nijtmans tags: core-8-6-branch | |
2025-01-10
| ||
19:57 | • Ticket [70f3b23cad] Tcl_InitStubs: is the "-" in the version requirement "8.5-" allowed? status still Open with 3 other changes artifact: 48abc4dccc user: fvogel | |
14:06 | • Ticket [70f3b23cad]: 3 changes artifact: 7169a15925 user: jan.nijtmans | |
2025-01-07
| ||
06:47 | • Ticket [70f3b23cad]: 3 changes artifact: eae9891ce0 user: fvogel | |
03:05 | • Ticket [70f3b23cad]: 3 changes artifact: baddd29b75 user: apnadkarni | |
2025-01-06
| ||
22:19 | • Ticket [70f3b23cad]: 3 changes artifact: 09f4fe2d03 user: jan.nijtmans | |
21:27 | • Ticket [70f3b23cad]: 4 changes artifact: c2982775a7 user: oehhar | |
21:24 | • Ticket [70f3b23cad]: 3 changes artifact: 4a9572239c user: jan.nijtmans | |
18:21 | • Ticket [70f3b23cad]: 4 changes artifact: 98c9f9e505 user: oehhar | |
2025-01-03
| ||
14:52 | • Ticket [70f3b23cad]: 3 changes artifact: 5cc9296f87 user: jan.nijtmans | |
2024-12-20
| ||
10:21 | • Ticket [70f3b23cad]: 4 changes artifact: c6b87da8fd user: oehhar | |
2024-12-16
| ||
11:51 | • Ticket [70f3b23cad]: 4 changes artifact: 9961591c04 user: oehhar | |
11:50 | Ticket [70f3b23cad]: propose new doc wording for requirement strings check-in: 607aea587f user: oehhar tags: 70f3b23cad-docs-version-requirement | |
2024-12-15
| ||
22:11 | • Ticket [70f3b23cad] Tcl_InitStubs: is the "-" in the version requirement "8.5-" allowed? status still Open with 3 other changes artifact: 49ca7bb96f user: jan.nijtmans | |
18:28 | • Ticket [70f3b23cad]: 3 changes artifact: 5f58a6f2ac user: fvogel | |
17:58 | • Ticket [70f3b23cad]: 3 changes artifact: 197652ac66 user: oehhar | |
17:47 | • Ticket [70f3b23cad]: 3 changes artifact: ad54581286 user: oehhar | |
17:46 | • New ticket [70f3b23cad]. artifact: 062caa7aa8 user: oehhar | |
Ticket UUID: | 70f3b23caddc1a1cf77a3f7ed7daa6f9f6405ee5 | |||
Title: | Tcl_InitStubs: is the "-" in the version requirement "8.5-" allowed? | |||
Type: | Bug | Version: | 8.6 - 9.0 | |
Submitter: | oehhar | Created on: | 2024-12-15 17:46:31 | |
Subsystem: | 70. Sample Extension | Assigned To: | nobody | |
Priority: | 5 Medium | Severity: | Minor | |
Status: | Closed | Last Modified: | 2025-01-30 13:15:26 | |
Resolution: | Fixed | Closed By: | oehhar | |
Closed on: | 2025-01-30 13:15:26 | |||
Description: |
The wiki page for extension migration https://core.tcl-lang.org/tcl/wiki?name=Migrating+C+extensions+to+Tcl+9&p contains: #ifdef USE_TCL_STUBS if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) #else if (Tcl_PkgRequire(interp, "Tcl", "8.5-", 0) == NULL) #endif { return TCL_ERROR; } This might be wrong in two senses:
Also, the sample extension is related here. Here is the TCL 8.6. description stating, that only numbers and dots are allowed: https://core.tcl-lang.org/tcl/file?name=doc/InitStubs.3&ci=84c07aaa29698bb8&ln=23-24 IMHO, the "PackageRequire" capability without "USE_TCL_STUBS" is also undocumented. Here is the 9.0 (main) description which is identical: https://core.tcl-lang.org/tcl/file?udc=1&ln=on&ci=tip&name=doc%2FInitStubs.3 THanks to Francois to point-out this issue. | |||
User Comments: |
oehhar added on 2025-01-30 13:15:26:
Mnetioned in the Migration wiki page of TCL by [efbd9d4fb4] and Tk by https://core.tcl-lang.org/tk/info/2775ca08f78b27ab. I think, this is the best place for this information. Thanks, Harald jan.nijtmans added on 2025-01-13 09:56:43: I have no objection, mentioning this in the release notes. I don't know anyone calling Tcl_InitStubs(.... , 1). We should recommend the 'exact' parameter to be 0 always. There's no use-case for making it 1 (or -1, if you like). In C, printing a boolean always gives '1' or '0', never '-1'. oehhar added on 2025-01-13 09:11:22: Ok, thanks, great work. I was trapped by my own trap ;-). The change of the strict parameter from boolean to "list of flags" should be mentioned in the release notes. Remark that at least in machine language, a boolean 1 is always "-1" (all bits set) and not "1" (only LSB set). Thank you and take care, Harald jan.nijtmans added on 2025-01-13 08:35:04: > Would it be a good idea also to add the 3rd form "8.6-9" ? No, because "8.6-9" is exactly the same as "8.6", I see no added value. What you probably mean is "8.6-10" (because the max-value is _exclusive_, remember ....), Which means that all between 8.6 (inclusive) and 10.0 (exclusive) works. It's exactly this risk, people forgetting that the end-value is _exclusive_ why I prefer "8.6-" more than "8.6-10". Whether Tcl 10.0 will work or not, is not a concern yet, I don't think we will see Tcl 10.0 before my pension. oehhar added on 2025-01-13 07:25:15: Thanks, great. The new text mentions "8.6", "8.6-", but not "8.6-9". Would it be a good idea also to add the 3rd form "8.6-9" ? Thanks, Harald jan.nijtmans added on 2025-01-12 18:15:04: Merged to [5d7aa913b0164aec|trunk] and other branches. Since this is a doc-fix only, no need to mention this in changes.md fvogel added on 2025-01-10 19:57:38: Nice, thanks! jan.nijtmans added on 2025-01-10 14:06:42: Another [7512a6295d64bab9|attempt] to make things more clear without too much bloat. fvogel added on 2025-01-07 06:47:12: One point regarding Jan's attempt to clarify even more in the man pages in [3200a10430]: The comments following each line of code must be correct as of now only. As time passes and more Tcl version come out we will have to remember to update these comments. That's why I'm not 100% comfortable with this commit. I would see a pointer to the "VERSION NUMBERS" section and to the package vatisfies section of the [package] man page as a better alternative since those are much less specific. apnadkarni added on 2025-01-07 03:05:10: To clarify, what I was trying to say is that I saw no use for the version parameter. In my view the argument passed to For example, the extension might say Put it differently, the jan.nijtmans added on 2025-01-06 22:19:08: In most cases "8.6" is the right answer. After conversion to work with 9.0, "8.6-" or "8.6-10" is the right answer. Who is still interested in 8.5? And 8.7 doesn't exist yet. oehhar added on 2025-01-06 21:27:53: Thanks, Jan ! Nor Don, nor Ashok have any clue what to put into the version field. So, your light is really required. Thanks, Harald jan.nijtmans added on 2025-01-06 21:24:28: > Ashok proposed to use "TCL_VERSION" as content This is a bad idea. I created a [09218bf9618b1c29|demo] why. (try this with Linux or gcc on Windows) oehhar added on 2025-01-06 18:21:28: Thanks, Jan, for looking into this. Jan, we need your light here. The last meeting revealed other issues:
Sorry, but this may be subject of the next telco. So, we get Jans light.... Take care, Harald jan.nijtmans added on 2025-01-03 14:52:12: Looks good to me. Just one minor remark and an addition: [90436ee9e3ff3b1f] +1 for merge to trunk and 8.7 oehhar added on 2024-12-20 10:21:18: Possible merge is postponed after 9.0.1 release. Thanks for all, Harald oehhar added on 2024-12-16 11:51:45: Propose new wording for the documentation with checkin [607aea587f] of branch [70f3b23cad-docs-version-requirement]. Comments welcome ! Harald jan.nijtmans added on 2024-12-15 22:11:25: The enhanced "package" syntax is described in TIP #268, and is available since Tcl 8.5. Apparently, "InitStubs.3" was never adapted to describe the enhanced TIP #268 syntax. fvogel added on 2024-12-15 18:28:09: Regarding the dash "-" char: from a very quick look at the code it seems the actual version is obtained through tcl_PkgRequireEx, which *I think* calls Tcl_PkgRequireEx, which allows version numbers as documented for package require. So I think that it's probably the documentation that should be improved. But don't take this as certain since I didn't check sufficiently in depth. |