Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++: Namespace name dropped in XML documentation for base classes (Origin: bugzilla #765812) #5993

Open
doxygen opened this issue Jul 2, 2018 · 7 comments
Labels

Comments

@doxygen
Copy link
Owner

doxygen commented Jul 2, 2018

status NEW severity major in component general for ---
Reported in version 1.8.11 on platform Other
Assigned to: Dimitri van Heesch

On 2016-04-29 15:28:56 +0000, DT wrote:

===== Sample source code: =====

struct a1 : public d::c
{
};

struct a2 : public d::c
{
};

struct a3 : public d::c
{
};


===================

When generating XML documentation for this code, only the first structure
will have full namespace name documented for base class:

    <inheritancegraph>
      <node id="0">
        <label>a1</label>
        <link refid="structa1"/>
        <childnode refid="1" relation="public-inheritance">
        </childnode>
      </node>
      <node id="1">
        <label>d::c</label> <<<---- Notice this CORRECT line: d::c
      </node>
    </inheritancegraph>

But for all other structs in the file namespace name will be dropped for
base class:

    <inheritancegraph>
      <node id="5">
        <label>c</label> <<<---- Notice this WRONG line: "c", namespace "d"
dropped!
      </node>
      <node id="4">
        <label>a2</label>
        <link refid="structa2"/>
        <childnode refid="5" relation="public-inheritance">
        </childnode>
      </node>
    </inheritancegraph>
@albert-github albert-github added C/C++ XML XML Output labels Jul 17, 2018
@excitoon
Copy link

FYI. This bug was introduced between Release_1_7_1 and Release_1_7_2.

@albert-github albert-github removed the XML XML Output label Jul 17, 2018
@albert-github
Copy link
Collaborator

The question here is should the relation be to "d" or to "d::c" but anyway it should be consistent.
To reproduce the bug it is important to set HIDE_UNDOC_RELATIONS = NO, besides setting the EXTRACT_.... = YES.
When looking to the code in doxygen.cpp function findClassRelation here are 2 calls to insertBaseClass the second one is called for a1 and the first one for a2. The relevant argument here is the 2nd argument which is filled differently.

I'm not sure what the reason of the different handling is and what the consequences would be when changing either one of them.

(Problem is also shown in inheritance and collaboration graphs in e.g. HTML)

@excitoon
Copy link

More information is better that less, I guess. We depend on this behavior and expect full name of a class (otherwise, how would one guess which one is mentioned?)

@excitoon
Copy link

This is a change which introduced a bug: f0e4767 .

@excitoon
Copy link

excitoon commented Jul 19, 2018

Exactly this line.
f0e4767#diff-1c8be53f930af9a4ffb709d1e81bc430R3641
Can someone explain what is going on?
@albert-github @doxygen
#3841 #5199

@XonqNopp
Copy link

Any chance to see this fixed?

@excitoon
Copy link

excitoon commented Jul 24, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants