Andrew Mangogna
2024-07-16 21:52:17 UTC
I have been out of the Tcl loop for a while, but have been porting an old
"C" based extension of mine to Tcl 9.0b2. The port went well, required
very few changes, but I have some differing behavior that I'm trying to
track down. The package consists of an ensemble command, "ral" which
has three subcommands implemented in the "::ral" namespace. Each of
the subcommands is also exported from the namespace. The following shows
the problems:
For Tcl 8.6:
% info patchlevel
8.6.11
% package require ral
0.12.2
% info commands ral
ral
% namespace export
% ral relvar names
% relvar names
invalid command name "relvar" <- expected
% namespace import ::ral::*
% relvar names
% namespace export
%
For Tcl 9.0b2:
% info patchlevel
9.0b2
% package require ral
0.13.0 <- new port to Tcl 9
% info commands ral
ral
% namespace export
tuple relation relvar <- unexpected -- ral exports these commands
<- but they shouldn't appear in the global
<- namespace
% ral relvar names
% relvar names
invalid command name "relvar" <- expected, just as Tcl 8.6
% namespace import ::ral::*
% relvar names
invalid command name "relvar" <- unexpected
% namespace export
tuple relation relvar <- again, not sure why these appear
So my question is, "Is there some namespace / ensemble changes that I've
not been able to track down?" It appears that the ensemble works
correctly, but that the exported commands are no longer exported or
available.
Thanks,
Andrew Mangogna
"C" based extension of mine to Tcl 9.0b2. The port went well, required
very few changes, but I have some differing behavior that I'm trying to
track down. The package consists of an ensemble command, "ral" which
has three subcommands implemented in the "::ral" namespace. Each of
the subcommands is also exported from the namespace. The following shows
the problems:
For Tcl 8.6:
% info patchlevel
8.6.11
% package require ral
0.12.2
% info commands ral
ral
% namespace export
% ral relvar names
% relvar names
invalid command name "relvar" <- expected
% namespace import ::ral::*
% relvar names
% namespace export
%
For Tcl 9.0b2:
% info patchlevel
9.0b2
% package require ral
0.13.0 <- new port to Tcl 9
% info commands ral
ral
% namespace export
tuple relation relvar <- unexpected -- ral exports these commands
<- but they shouldn't appear in the global
<- namespace
% ral relvar names
% relvar names
invalid command name "relvar" <- expected, just as Tcl 8.6
% namespace import ::ral::*
% relvar names
invalid command name "relvar" <- unexpected
% namespace export
tuple relation relvar <- again, not sure why these appear
So my question is, "Is there some namespace / ensemble changes that I've
not been able to track down?" It appears that the ensemble works
correctly, but that the exported commands are no longer exported or
available.
Thanks,
Andrew Mangogna