Forum OpenACS Development: Re: Using "info procs" after upgrade to OpenACS 5.9.1b3 (nsf proc reform)

Hi Michael!

Gustaf Neumann will probably comment on that as the authority, but whether an nsf::proc shows up in [info procs] or [info commands] depends on the way it becomes implemented internally. nsf::proc falls back to ordinary Tcl proc (and the corresponding cmd type) when the formal arguments do not require NSF arg processing (optional or nonpos arguments). This matches your observation:

% ::nsf::proc foo {} {;}
% info proc foo
foo
% info commands foo
foo
% ::nsf::proc foo {b:optional} {;}
% info proc foo
% info commands foo
foo

Whether this should (can?) be dealt with, requires a dive. But symmetry in introspection would be good ... Pls. feel free to submit a ticket at https://sourceforge.net/p/next-scripting/tickets/.

As for the "feature checks" in OpenACS: These spots should uniformly use [info commands] anyways, simply because [info commands] does not discriminate between scripted (procs) and C-implemented commands. Using [info procs] at these places is not robust in light of switching between a scripted or C implementation or nsf::proc implementation of sth. named "::mypackage::myproc", which is typically orthogonal to the feature check as such, right?

Cheers,
Stefan

To be clear: [info commands] should not be substituted for each and every occurrence of [info procs], just for those feature checks you mentioned.