ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> activetcl
activetcl
Re: [Activetcl] Can someone else verify a problem with thisscriptonactivetcl 8.5 ?
by Andreas Kupries other posts by this author
Oct 29 2007 10:13AM messages near this date
view in the new Beta List Site
Re: [Activetcl] Can someone else verify a problem with this scriptonactivetcl 8.5 ? | Re: [Activetcl] Can someone else verify a problem with thisscriptonactivetcl 8.5 ?
> 
>  >> Then there are the "infinite loop" errors:
> 
> 
>  >Are you trying to load all the packages into the same interpreter ?
> 
>  Yes - I expected there might be some conflicts - I didn't, however,
>  expect the way the problems manifested themselves.
>  Given that any one Tcl program might do a package require on any number
>  of packages, it seemed worthwhile to see if things worked.

True, that is a valid point.


>  > It might be better to try and load everything into a trusted
>  sub-interpreter which is deleted after the require. That
>  > contains interactions to the package itself and its dependencies. Not
>  sure if that is feasible/an option for what you
>  >wish to achieve.
> 
>  This would make the test of each library more accurate. How do you do a
>  package require in a trusted sub-interpreter and then deleting it? Right

A safe interp you create with 'interp create -safe'. For a trusted one you
simply leave out the -safe option. As a trusted interpreter it automatically
inherits the full auto_path settings etc. of its parent interpreter. Which
means that you can simply 'package require Foo' to get package Foo. No
special contortions required. A plain 'interp destroy' then gets rid of the
interpreter and the loaded package(s).

In other words, the easiest way to clean up state is to destroy the whole
interpreter and then create a new one for the next package. That is what I
do (*). Much easier than trying to use a single sub interpreter and trying
to clean it up.


(*) I have some verification in our buildsystem which basically loads
package after package using an AT test installation (**). ... Given this
thread I am thinking about extending that to try to load all possible pairs
of packages to look for possible conflicts. Trying out all possible
combinations and permutations would however be likely take way to much time
...

(**) I am exluding certain packages, mostly the stuff I know is for plugin
management stuff and not for a regular interpreter. Oratcl is another as I
know that I can build it, but not run it.

>  now, my goal is just testing out the individual packages in a site
>  installation.
> 
>  I have tcl installed on Windows, Linux, Solaris, etc. and was trying to
>  come up with a relatively simple script that would test that they each
>  would resolve in a 'package require' statement.

Yes, as I do.

>  HOWEVER, if there are combinations of packages that do not work
>  together, that info should probably be documented somewhere...

Agreed. Or fixed, if it is a bug.

>  > Still, seeing this it would be interesting to see in which order you
>  load packages, so that we know which others went
>  before (sucessfully) and thus may cause this. And then reduce the set
>  until the error goes away, extend, etc. until the
>  minimal set is identified. Then we can send this to the package
>  maintainer.
> 
>  I have attached the order that my script loaded packages.

Thanks.

>  The order is
>  just the order returned by package names .

Ah, that is all which I needed. Have to compare with my script. I might sort
them by name before doing my stuff. However with me using sub interpeters I
never ran into the conflicts, so for me order was not important.

Still, now I have at least a new idea on how to extend distribution testing
...

--
	Andreas Kupries <andreask@[...].com> 
	Developer @ http://www.ActiveState.com
	Tel: +1 778-786-1122


_______________________________________________
ActiveTcl mailing list
ActiveTcl@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Larry W. Virden
Andreas Kupries
Larry W. Virden
Andreas Kupries
Larry W. Virden
Andreas Kupries
Larry W. Virden

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved