Re: Package Require getting "wrong version"



Gerald W. Lester wrote:
Depending on what order package requires are done, I'm getting different versions of the http package (1.0 vs 2.5.3 -- I want 2.5.3). This is in a FreeBSD system with the ports build of Tcl 8.5. See below:


$ tclsh8.5
% set auto_path
/usr/local/lib/tcl8.5 /usr/local/lib
% package require Tcl 8.5
8.5.1
% package require http
2.5.3
% exit
$ tclsh8.5
% package require Tcl 8.5
8.5.1
% package require WS::Utils
1.1.0
% package require http
1.0

I also get this behaviour on Mac OS X. Very odd. Even odder:

% package ifneeded WS::Utils 1.0.8
source /usr/local/lib/WebServices/Utilities.tcl
% eval [package ifneeded WS::Utils 1.0.8]
% package require http
2.5.4

So it looks like it's not a problem with Utilities.tcl itself that causes the problem, or with any pkgIndex.tcl file (requiring other packages doesn't cause a problem). However, requiring any of the webservices packages through [package require] does indeed cause this problem. Note: if you require http 2.5 *before* WS::Utils then things work fine.

-- Neil
.



Relevant Pages

  • Re: now do you "link" .tcl files?
    ... I think from the position of a newbie, this is how linking in Tcl ... At the time of the call, Tcl looks up the command named "foo" using ... pkgIndex.tcl for a Tcl-only package usually contains ...
    (comp.lang.tcl)
  • Re: Why TCL?
    ... The typical reason you see other languages have things like this is ... Tcl extension packages available as well. ... :And installing the MD5 package for TCL was too painful for me. ... in other scripting language camps wanted something similar. ...
    (comp.lang.tcl)
  • Re: New list commands ... What do you think ?
    ... That's the risk of every developer writing basic commands. ... allow some discussion about some of them, that are really good for core ... runtime consuming and could be done more efficiencly in C using the tcl ... Critcl builds a package which is loaded. ...
    (comp.lang.tcl)
  • Re: set character at string position
    ... > 'stub' for best performance and prettiness. ... Tcl 8.3 and still continue to link and work flawlessly with Tcl 8.5+. ... loads an extension. ... A package is any combination of Tcl and/or compiled C code that is ...
    (comp.lang.tcl)
  • Re: TCL vs. Perl
    ... Mainly, I am a Tcl developer, and I write TONS of databases in ... Downloading packages is cake, use the http package. ... tclIndex file and the paths for Tcl to find them. ... even Latex and PDF documents can be auto-generated by scripts. ...
    (comp.lang.tcl)