2024-03-22
| ||
15:55 | • Ticket [1577282fff] TIP 283: ensemble's command resolution status still Open with 6 other changes artifact: 6608e05308 user: jan.nijtmans | |
2024-03-20
| ||
10:13 | • Pending ticket [910d67a229]: NS-qualified invocations of command evade namespace unknown plus 4 other changes artifact: 78a4ce402f user: jan.nijtmans | |
2024-03-13
| ||
15:56 | • Ticket [910d67a229]: 4 changes artifact: 3258ec9867 user: jan.nijtmans | |
2024-03-10
| ||
13:04 | Fix [910d67a229fe7f65]: NS-qualified invocations of command evade [namespace unknown] check-in: 92e2d37e01 user: jan.nijtmans tags: trunk, main | |
11:28 | • Closed ticket [910d67a229]: NS-qualified invocations of command evade namespace unknown plus 7 other changes artifact: d945f1a93a user: jan.nijtmans | |
11:27 | Fix [910d67a229fe7f65]: NS-qualified invocations of command evade [namespace unknown] check-in: 1f0f766632 user: jan.nijtmans tags: core-8-branch | |
2024-03-06
| ||
19:47 | • Ticket [910d67a229] NS-qualified invocations of command evade namespace unknown status still Pending with 3 other changes artifact: e0c940a849 user: sebres | |
19:22 | better variant of fix for [910d67a229fe7f65] with improved search for NS::command (find NS even if c... check-in: c4d9c1dd86 user: sebres tags: bug-910d67a229fe7f65 | |
12:50 | • Ticket [910d67a229] NS-qualified invocations of command evade namespace unknown status still Pending with 3 other changes artifact: 4fa6445c7e user: sebres | |
12:05 | small amend to [910d67a229fe7f65]: additional corner case (see the test namespace-52.13) check-in: 98aab416a2 user: sebres tags: bug-910d67a229fe7f65 | |
2024-03-05
| ||
23:26 | • Ticket [910d67a229] NS-qualified invocations of command evade namespace unknown status still Pending with 3 other changes artifact: ceda4b913d user: jan.nijtmans | |
23:17 | • Ticket [910d67a229]: 3 changes artifact: 469aa1610e user: stevel | |
17:04 | • Pending ticket [910d67a229]. artifact: 5849319373 user: sebres | |
16:38 | fix for [910d67a229fe7f65]: search of `namespace unknown` handler fixed: first try to find namespace... check-in: 76660a8402 user: sebres tags: bug-910d67a229fe7f65 | |
16:26 | • Ticket [910d67a229] NS-qualified invocations of command evade namespace unknown status still Open with 4 other changes artifact: 5bd14828e3 user: oehhar | |
15:55 | • New ticket [910d67a229]. artifact: 2a40899de0 user: sebres | |
Ticket UUID: | 910d67a229fe7f653d28c00e470f2c256e3628ce | |||
Title: | NS-qualified invocations of command evade [namespace unknown] | |||
Type: | Bug | Version: | any | |
Submitter: | sebres | Created on: | 2024-03-05 15:55:58 | |
Subsystem: | 21. [namespace] | Assigned To: | sebres | |
Priority: | 5 Medium | Severity: | Important | |
Status: | Pending | Last Modified: | 2024-03-20 10:13:52 | |
Resolution: | Fixed | Closed By: | nobody | |
Closed on: | 2024-03-13 15:56:31 | |||
Description: |
The implementation of Here a diff illustrating proper implementation:
The issue that specified handler doesn't work everywhere prevents many possible usecases like dynamic NS/ensemble commands or fallbacks, or for instance an implementation of NS-based auto-loading by setting of unknown handler for an NS (instead it forces to call slowly global "::unknown" for known/loaded namespaces with registered unknown handler, which normally should be invoked as first). Because it is already fixed in my fork, it can be relative fast backported here, just must check against NRE (which is different on my side). | |||
User Comments: |
jan.nijtmans added on 2024-03-20 10:13:52:
> Fix [merged] to core-8-branch and trunk. This merge has now been undone, waiting for the TIP vote. The unkown handler for ::tcl::clock has been added as example to the TIP implementation. jan.nijtmans added on 2024-03-13 15:56:31: TIP written now by Harald (thanks!) jan.nijtmans added on 2024-03-10 11:28:51: Fix [1f0f766632e637cc|merged] to core-8-branch and trunk. Not yet to 8.6 (can always be done later, if desired) sebres added on 2024-03-06 19:47:51:
Now I know why it did not completely work initially after back-porting - I had a bit different variant of TclGetNamespaceForQualName (got amended a year later)... @Jan Although I also not believe it'd have any negative impact, I must admit I see one compat thing, so it should at least get a release note (as well as a documentation enhancement), explaining a precedence now - "deepest NS with unknown-handler always wins (regardless from where exactly it was executed)". sebres added on 2024-03-06 12:50:12:
There is a small amend [98aab416a2bac6b0] for additional corner case (calling near-fully qualified command To obtain real normalized command name inside the handler one would anyway use something like this (e. g. with auto_qualify like global ::unknown):
(Suggestion, just as nice to have) jan.nijtmans added on 2024-03-05 23:26:07: Let's see. 1) The change doesn't break any existing test-case. Good! 2) There's a new testcase demonstrating the corner-case. Good! Implementation looks good to me (cleanly written, as usual for sebres!). It handles a situation apparently not handled before. That looks like a valid bug-fix to me, which doesn't need a TIP. The bug-fix is written for 8.6, and can (trivially) be forward-merged. I'm +1 merging this to 8.6 and up, considering it a bug-fix for a corner-case which was not considered before. I don't see any negative impact. @Donal, do you agree too? stevel added on 2024-03-05 23:17:35: Do we need a TIP for 9.0? If it is treated as a bug fix then no, but it must be clearly documented in the release notes. If anyone objects to it being treated as a bug fix then yes, we need a TIP. I would assume no to start with. sebres added on 2024-03-05 17:04:23: The fix is in [76660a84029aa1c1]. Regarding Donals comment, I already saw it in core mailing list... I can only say: a feature that was implemented pretty useless (by design or not) can be for sure considered as a bug, isn't it? Sure it is compat thing more or less, just if someone used it previously only inside the namespace (otherwise it was not usable), this fix would not affect such people at all. oehhar added on 2024-03-05 16:26:07: Donal Fellow commented on the core list: That’s apparently “not a bug” in that it’s how that feature was designed to work. I’ll merrily admit to being very doubtful that that’s an entirely sane result; it results in [namespace unknown] being one of those features that’s IMO virtually useless. In terms of actual known uses, the only in-core one is TclOO, which uses it to handle definition abbreviations (it was merely the easiest way to customize command resolution in definition scripts, and I recommend that people try to avoid abbreviating definition names). There seem to be some more uses out in the wild, but I don’t know if they’re making effective use or are actually mostly just (accidentally?) avoiding being in the case which it handles. Donal. ---- So, it is more an RFE to fix the design in 9.0 -> do we need a TIP ? Harald |