Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2005-06-01
15:07 • Closed ticket [1159942fff]: TIP229: namespace path plus 8 other changes artifact: b9fb8dedb4 user: dkf
2005-05-20
22:35 • Ticket [1159942fff]: 4 changes artifact: 29d4d880d7 user: dkf
22:35 • Ticket [1159942fff]: 4 changes artifact: 923d1e8bb3 user: dkf
22:35 • Add attachment nsPath.diff to ticket [1159942fff] artifact: 5ff0b5f9ee user: dkf
22:35 • Ticket [1159942fff] TIP229: namespace path status still Open with 4 other ch... artifact: 164ac50c69 user: dkf
2005-05-11
22:20 • Ticket [1159942fff]: 4 changes artifact: a58a9c713d user: dkf
2005-05-10
04:38 • Ticket [1159942fff]: 4 changes artifact: 2a95f4fab7 user: dgp
2005-04-26
05:25 • Ticket [1159942fff]: 4 changes artifact: 909dc110dd user: dkf
2005-04-22
22:17 • Ticket [1159942fff]: 4 changes artifact: 4f9aee25bf user: dkf
22:17 • Ticket [1159942fff]: 4 changes artifact: 25f5256c63 user: dkf
22:17 • Ticket [1159942fff]: 4 changes artifact: 18a1763f52 user: dkf
22:16 • Ticket [1159942fff]: 4 changes artifact: 07a352334b user: dkf
04:43 • Ticket [1159942fff]: 4 changes artifact: 1c67417055 user: dkf
04:43 • Ticket [1159942fff]: 4 changes artifact: 0c79c30c85 user: dkf
2005-03-10
01:54 • Ticket [1159942fff]: 4 changes artifact: 1b8c2f94b9 user: msofer
2005-03-09
23:00 • Ticket [1159942fff]: 4 changes artifact: ea86d95057 user: dkf
23:00 • Ticket [1159942fff]: 4 changes artifact: 75208dabdd user: dkf
22:50 • Ticket [1159942fff]: 4 changes artifact: 6c8c3f40b0 user: dkf
15:50 • New ticket [1159942fff]. artifact: dda89dc2bb user: dkf

TIP229: namespace path

Closed / Fixed1159942fffffffffffffffffffffffffffffffffCreated 22 years agoUpdated 22 years ago
Descriptionplain2005-03-09 15:50:01
Implementation of [namespace path ?list?]
dkfplain2005-03-09 22:50:03
File Added - 124836: nsPath.diff
dkfplain2005-03-09 23:00:57
File Added - 124839: nsPath.diff
dkfplain2005-03-09 23:00:58
File Deleted - 124836:
msoferplain2005-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).
dkfplain2005-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.
dkfplain2005-04-22 04:43:20
File Added - 131247: tip229.diff
dkfplain2005-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.
dkfplain2005-04-22 22:17:02
File Added - 131329: tip229.diff
dkfplain2005-04-22 22:17:21
File Deleted - 131247:
dkfplain2005-04-22 22:17:22
File Deleted - 124839:
dkfplain2005-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.
dgpplain2005-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 :: {...}].
dkfplain2005-05-11 22:20:13
File Deleted - 131329: 



File Added - 134007: nsPath.diff
dkfplain2005-05-20 22:35:09
Logged In: YES 
user_id=79902

Update to handle more of dgp's wish-list.

No docs yet.
dkfplain2005-05-20 22:35:13
File Added - 135281: nsPath.diff
dkfplain2005-05-20 22:35:17
File Deleted - 134007:
dkfplain2005-06-01 15:07:28
Logged In: YES 
user_id=79902

Implementation (based on patch here) checked into HEAD
Log in (anonymous is fine) to add a comment.

Attachments: