After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 624095 - Cross-project inheritance using tags does not work
Cross-project inheritance using tags does not work
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.6.3
Other Linux
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2010-07-11 11:32 UTC by Roger Leigh
Modified: 2010-10-09 08:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Simple testcase (15.82 KB, application/x-bzip-compressed-tar)
2010-07-11 11:32 UTC, Roger Leigh
Details

Description Roger Leigh 2010-07-11 11:32:27 UTC
Created attachment 165674 [details]
Simple testcase

I am documenting different modules separately using doxygen, generating tagfiles for each.  I then use TAGFILES to reference modules being used by other modules.  Earlier versions of doxygen correctly documented inheritance (with full inheritance diagrams) as well as inheriting documentation for virtual functions which were documented in the base class in the other module.

Versions 1.6.3 (Debian) and 1.7.1 (self-built) no longer appear to do this.  The inheritance diagrams are missing the parts of the inheritance hierarchy in the other module, and the documentation for virtual functions is missing.

I have attached a simple testcase containing just two classes (one from each module), as well as the doxygen configuration for each.  sbuild.dox is the first module generating sbuild.tag.  schroot.dox is the dependent module, using that tag.  You'll see that the sbuild::session class in the first is not shown as a parent of dchroot::session_base in the second, and is missing all of the documentation.  I've also included all.dox which combines both modules to show it does work correctly in this case.

The full (non test case) code is available from:
http://git.debian.org/?p=buildd-tools/schroot.git;a=shortlog;h=refs/heads/schroot-1.4
http://git.debian.org/?p=buildd-tools/schroot.git;a=tree;h=refs/heads/schroot-1.4;hb=refs/heads/schroot-1.4
doxygen configuration in http://git.debian.org/?p=buildd-tools/schroot.git;a=tree;f=doc;h=bcff57a67ddfb54b097dbce2c23f6b1f845f03e1;hb=refs/heads/schroot-1.4



Best regards,
Roger Leigh
Comment 1 Dimitri van Heesch 2010-07-11 14:21:59 UTC
Hi Roger,

The problem is that the namespace in sbuild in not documented and as a result does not appear in the tag file. When doxygen looks for the base class, it does not find it because it cannot find its namespace.

I'll correct this, but as a workaround I suggest to document the namespace.
Comment 2 Roger Leigh 2010-07-11 15:30:40 UTC
Thanks for the quick response!  I can confirm that documenting the namespace does fix the issue of the missing parent in the inheritance diagrams.  However, I still don't see the virtual functions documented.  If I combine all the sources into a single doxygen file, I do see correct documentation of the virtual functions, so AFAICT there's still something else not quite right in this situation (possibly something else not correctly documented, though I don't see anything related in the warnings).

Regards,
Roger
Comment 3 Roger Leigh 2010-07-11 15:39:26 UTC
Just as an additional suggestion, warning about undocumented namespaces in addition to other undocumented items would also be most helpful!

Regards,
Roger
Comment 4 Roger Leigh 2010-07-11 16:35:13 UTC
Possibly also related to the virtual functions: If I have a static class member:
namespace sbuild
{
template <typename T>
class error : public error_base
{
 …
 private:
    /// Mapping between error code and string.
    static map_type error_strings;
 …
};
}

The error_strings needs defining for each new instance of the templated class.  Such as:

template<>
sbuild::error<main_base::error_code>::map_type
sbuild::error<main_base::error_code>::error_strings
(init_errors,
 init_errors + (sizeof(init_errors) / sizeof(init_errors[0])));

If this is in the same (sbuild) namespace, it is documented correctly.  If it's in another namespace and uses explicit namespaces as in the above example, doxygen complains about it:

/home/rleigh/schroot/bin/schroot/schroot-main-base.cc:77: Warning: Member error_strings(init_errors, init_errors+(sizeof(init_errors)/sizeof(init_errors[0]))) (function) of class sbuild::error is not documented.
/home/rleigh/schroot/bin/schroot-listmounts/schroot-listmounts-main.cc:66: Warning: Member error_strings(init_errors, init_errors+(sizeof(init_errors)/sizeof(init_errors[0]))) (function) of class sbuild::error is not documented.
/home/rleigh/schroot/bin/schroot-releaselock/schroot-releaselock-main.cc:67: Warning: Member error_strings(init_errors, init_errors+(sizeof(init_errors)/sizeof(init_errors[0]))) (function) of class sbuild::error is not documented.


Regards,
Roger
Comment 5 Dimitri van Heesch 2010-10-09 08:19:24 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.7.2. Please verify if this is indeed the case. Reopen the
bug if you think it is not fixed and please include any additional information
that you think can be relevant.