Artifacts Associated With Ticket 1101678
Ticket change [369e2b9273] (rid 107137) by vincentdarley on 2005-01-13 14:48:58:
- assignee initialized to: "dgp"
- cmimetype initialized to: "text/plain"
- comment initialized to:
The attached script creates a package 'testpkg' which provides two auto-loadable procs 'testpkg::one' and 'testpkg::two'. If we execute 'testpkg::one', then do 'auto_reset' and then try to execute 'testpkg::two', the latter is no longer available -- the auto_index entry has been cleared. Or, for example: package require testpkg # Now 'testpkg::one' and 'testpkg::two' are both available # for auto-loading and execution auto_reset # Now both of those procs have been lost!
- foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "vincentdarley"
- subsystem initialized to: "39. Package Manager"
- title initialized to: "auto_reset conflicts with tclPkgSetup"
- type initialized to: "RFE"
Add attachment "runtest.tcl" [753df81c1b] (rid 105358) by vincentdarley on 2005-01-13 21:48:58.
Ticket change [efa6b929f0] (rid 109032) by vincentdarley on 2005-01-13 21:48:58:
- icomment:
File Added - 115691: runtest.tcl
- login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
- icomment:
Ticket change [e123fcc36a] (rid 87398) by vincentdarley on 2005-01-13 21:52:25:
- foundin changed to: "obsolete: 8.4.9"
- icomment:
Logged In: YES user_id=32170 Note that bug 1101670 means that after auto_loading of all of the procs provided by the given package, we will no longer see this bug -- i.e. bug 1101670 is masking some possible occurrences of this problem, at least for good packages that place their code inside a namespace. This is because 1101670 implies that procs in a namespace will not be deleted. A more general comment: the basic conflict seems to arise because auto_reset assumes all auto_index entries can be regenerated from tclIndex files, so it's ok to delete them, but auto_index entries created by tclPkgSetup cannot be recreated...
- login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
Ticket change [84a45f60dc] (rid 117593) by dgp on 2005-01-13 22:46:31:
- closedate changed to: "2005-01-13T15:46:31"
- closer changed to: "dgp"
- icomment:
Logged In: YES user_id=80530 On this one, I'll agree that there's a misfeature, but there's no bug here. The real misfeature is [tclPkgSetup], and the [pkg_mkIndex -lazy] that creates it. Don't use either. They're broken by design and not worth fixing. If you want auto-loading in your package, create the appropriate tclIndex file to make it happen.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Wont Fix"
- status changed to: "Closed"
- username: "dgp"
Ticket change [230c7348ca] (rid 130851) by vincentdarley on 2005-01-14 18:23:56:
- icomment:
Logged In: YES user_id=32170 Can we at least document that pkg_mkIndex -lazy should not be used so others don't fall into this trap. Or, better yet, document what _should_ be used instead! This is not a theoretical problem, this report comes from attempting to use the package tclAE which is part of Daniel's BI distribution for MacOS X.
- login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
- icomment:
Ticket change [dfd56e8084] (rid 115085) by vincentdarley on 2005-01-18 16:55:19:
- foundin changed to: "obsolete: 8.5a3"
- icomment:
Logged In: YES user_id=32170 I've added a comment to '-lazy' to suggest it not be used. However, I still think there's a problem here, at least in the documentation, and probably in limitations of pkg_mkIndex. The documentation says you should use 'pkg_mkIndex', and goes to some lengths to explain simple vs complex packages, dependencies etc. However, the end result is simply that 'pkg_mkIndex' works well for a package composed of a single file (whether .dll or .tcl), but anything more than that, given that -lazy is buggy, requires one to manually created a tclIndex file and then manually create a pkgIndex.tcl file (which has to add $dir to the auto_path). Surely pkg_mkIndex should do that for me. In fact, why not re-write the '-lazy' implementation to do just that: -lazy will: (i) build its list of source-able procs and load-able commands as per normal. (ii) Then it will write those things to a new tclIndex file in the given directory (this is a new step). (iii) Finally it will construct a pkgIndex.tcl file which adds the relevant $dir to the auto_path. In this way we would have something that actually _works_, has no problems with 'auto_reset', and has the properties of '-lazy' that we want (don't source every single script in a multi-script package unless we actually need them).
- login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
Ticket change [76a05aa80c] (rid 105618) by dgp on 2005-01-19 22:43:55:
- foundin changed to: "None"
- icomment:
data_type - 360894 Logged In: YES user_id=80530 interesting idea. I'd need to think about it and look over the code implications, but I like it enough to make it a Feature Request.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "None"
- status changed to: "Open"
- subsystem changed to: "39. Package Manager"
- username: "dgp"
Ticket change [71e791e682] (rid 100766) by dgp on 2005-01-26 00:59:38:
- title changed to:
rewrite [pkg_mkIndex -lazy] to generate tclIndex file
- title changed to: