Ticket UUID: | 1159942 | |||
Title: | TIP229: namespace path | |||
Type: | Patch | Version: | TIP Implementation | |
Submitter: | dkf | Created on: | 2005-03-09 15:50:01 | |
Subsystem: | 21. [namespace] | Assigned To: | dkf | |
Priority: | 5 Medium | Severity: | ||
Status: | Closed | Last Modified: | 2005-06-01 15:07:28 | |
Resolution: | Fixed | Closed By: | dkf | |
Closed on: | 2005-06-01 08:07:28 | |||
Description: |
Implementation of [namespace path ?list?] | |||
User Comments: |
dkf added on 2005-06-01 15:07:28:
Logged In: YES user_id=79902 Implementation (based on patch here) checked into HEAD dkf added on 2005-05-20 22:35:17: File Deleted - 134007: dkf added on 2005-05-20 22:35:13: File Added - 135281: nsPath.diff dkf added on 2005-05-20 22:35:09: Logged In: YES user_id=79902 Update to handle more of dgp's wish-list. No docs yet. dkf added on 2005-05-11 22:20:13: File Deleted - 131329: File Added - 134007: nsPath.diff dgp added on 2005-05-10 04:38:11: Logged In: YES user_id=80530 One really minor quibble with the new namespace-51.* tests. They assume the -body of each test will run in the global namespace. These tests will be more robust if they do their own [namespace eval :: {...}]. dkf added on 2005-04-26 05:25:16: Logged In: YES user_id=79902 ToDo: Fix InfoCommandsCmd in tclCmdIL.c; when the pattern is namespace-less, need to add all (matching) commands from the whole path. dkf added on 2005-04-22 22:17:22: File Deleted - 124839: dkf added on 2005-04-22 22:17:21: File Deleted - 131247: dkf added on 2005-04-22 22:17:02: File Added - 131329: tip229.diff dkf added on 2005-04-22 22:16:58: Logged In: YES user_id=79902 And another version, with cleaner internal API (possibly worth exposing in the future) and more extensive testing. dkf added on 2005-04-22 04:43:20: File Added - 131247: tip229.diff dkf added on 2005-04-22 04:43:01: Logged In: YES user_id=79902 Here's an updated version. Resolution cacheing is implemented (and in fact the main problem has been over-eager cacheing, not insufficient cacheing!) as is a bunch of issues relating to what happens in tricky lifetime-management cases. Everything's also now object-aware, and errors relating to unknown namespaces are generated early. msofer added on 2005-03-10 01:54:02: Logged In: YES user_id=148712 I'm worried about the speed implications, as I do not immediately see how the core can cache already resolved command names and insure that the cached values are correct. The problem is (un)shadowing of commands at different levels in the search path. The test namespace-51.5 (added in the patch as knownbug) illustrates the point. One possibility is to disable caching selectively: commands called from a namespace that has a non-empty search path are only cached if they reside in that namespace. Later on, we may design a mechanism to cache all commands and detect shadowing/unshadowing effects. I am not sure if this can be done reasonably in presence of dynamic paths. The core currently does this, but with fixed search paths of length 2 (as given by Tcl's resolution rules). dkf added on 2005-03-09 23:00:58: File Deleted - 124836: dkf added on 2005-03-09 23:00:57: File Added - 124839: nsPath.diff dkf added on 2005-03-09 22:50:03: File Added - 124836: nsPath.diff |
Attachments:
- nsPath.diff [download] added by dkf on 2005-05-20 22:35:09. [details]