Index: openacs-4/packages/acs-tcl/tcl/test/doc-check-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/doc-check-procs.tcl,v diff -u -r1.27 -r1.28 --- openacs-4/packages/acs-tcl/tcl/test/doc-check-procs.tcl 22 Oct 2024 16:35:42 -0000 1.27 +++ openacs-4/packages/acs-tcl/tcl/test/doc-check-procs.tcl 23 Oct 2024 17:08:21 -0000 1.28 @@ -25,25 +25,8 @@ nx nsshell } - set skip { + set excluded_proc_index { { Object ::ns_cache} - { Class ::ns_hmac} - { Class ::ns_md} - { Class ::ns_crypto::HashFunctions} - { Class ::xotcl::Attribute} - { Class ::xotcl::MetaSlot} - { Class ::xotcl::RelationSlot} - { Class ::xotcl::package} - {xotcl::Attribute instproc __object_configureparameter} - {xotcl::Attribute instproc createForwarder} - {xotcl::Attribute instproc exists} - {xotcl::Attribute instproc istype} - {xotcl::package proc contains} - {xotcl::package proc create} - {xotcl::package proc extend} - {xotcl::package proc import} - {xotcl::package proc present} - {xotcl::package proc verbose} } foreach p [lsort -dictionary [nsv_array names api_proc_doc]] { set pa [nsv_get api_proc_doc $p] @@ -52,8 +35,32 @@ && !([dict get $pa deprecated_p] || [dict get $pa warn_p]) && ![string match *::slot* $p] && ![string match "ns_*" $p] - && $p ni $skip + && $p ni $excluded_proc_index } { + # + # For nx objects and classes, we check, if we find the + # place where it was defined (script_name). If thiswe + # cannot determine the location this indicates that it + # might not be defined by OpenACS, or it might hint a bug. + # + set obj [::xo::api object_from_proc_index $p] + if {$obj ne "" && [nsf::is object,type=::nx::Object $obj]} { + set obj [namespace which $obj] + set skip [::acs::per_request_cache eval -key script-name-$obj { + set script_name [::xo::api script_name -obj $obj {}] + if {$script_name eq ""} { + aa_log "Cannot determine script name for object '$obj' (proc_index: $p)" + set result 1 + } else { + set result 0 + } + }] + #ns_log notice "SKIP '$skip' for <$obj> // $p" + if {$skip} { + continue + } + } + incr count if { [string is space [join [dict get $pa main]]] && (![dict exists $pa return] || [string is space [join [dict get $pa return]]]) && Index: openacs-4/packages/xotcl-core/tcl/03-doc-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/03-doc-procs.tcl,v diff -u -r1.27 -r1.28 --- openacs-4/packages/xotcl-core/tcl/03-doc-procs.tcl 23 Oct 2024 11:47:00 -0000 1.27 +++ openacs-4/packages/xotcl-core/tcl/03-doc-procs.tcl 23 Oct 2024 17:08:21 -0000 1.28 @@ -247,6 +247,18 @@ return $scope } + :public object method object_from_proc_index {proc_index} { + # + # Parse the proc_index and return the scope from it. + # + set object "" + if {[regexp { *([^ ].+) (inst)?proc (.+)$} $proc_index . object] + || [regexp { (Class|Object) (.+)$} $proc_index . what object] + } { + } + return $object + } + :public object method script_name {-obj scope} { # # Determine name of the current "script" as displayed by "Defined