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

Full scope needed when making link inside cross-referenced section [with test case] (Origin: bugzilla #740218) #5678

Closed
doxygen opened this Issue Jul 2, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@doxygen
Copy link
Owner

doxygen commented Jul 2, 2018

status RESOLVED severity normal in component general for ---
Reported in version 1.8.8-GIT on platform Other
Assigned to: Dimitri van Heesch

Original attachment names and IDs:

On 2014-11-16 19:51:17 +0000, Vladimír Vondruš wrote:

Created attachment 290809
Repro/test case

See attached ZIP file for minimal repro case or the following snippet:

namespace Foo {

/** @brief Structure */
struct Bar {
    /**
     * @brief Foo
     * @deprecated Use @ref bar() instead.
     */
    void foo1();

    /**
     * @brief Foo
     * @deprecated Use @ref Foo::Bar::bar() "bar()" instead.
     */
    void foo2();

    /** @brief Bar */
    void bar();
};

}

WHen generating docs, Doxygen compains about invalid reference on the deprecated page:

deprecated:2: warning: unable to resolve reference to `bar()' for \ref command

The first link is created correctly in the class documentation, but not on the Deprecated page (deprecated.html). When full scope is specified like in the second case, the link is correctly generated, but the workaround gets annoying when the scope is too long to write. This happens for all cross-referenced items, such as @todo, @bug and user-defined ones created with @xrefitem.

Would it possible for Doxygen to remember scope of each cross-referenced item when creating given page and resolve links relative to that scope?

Tested with current Git (9f477b8), but the issue appears for some time (I think
it was present already in 1.7).

On 2014-11-16 20:23:03 +0000, Kevin McBride wrote:

Created attachment 290811
HTML Page of Deprecated List

On 2014-11-16 20:47:52 +0000, Kevin McBride wrote:

I have the same problem with version 1.8.8. In addition, a search for similar bugs reveals that Doxygen has a problem with referencing functions in structs and classes within the namespace it is documenting.

I also put some code underneath bar(), named the function foo3(), and bar() is still not being referenced in deprecated blocks.

On 2014-11-16 20:52:02 +0000, Kevin McBride wrote:

Created attachment 290814
Edited Test Case

On 2014-11-17 19:44:52 +0000, Dimitri van Heesch wrote:

Confirmed. Should be fixed in the next GIT update.

On 2014-12-18 18:43:29 +0000, Vladimír Vondruš wrote:

Sorry for taking so long to reply, but the commit (c6e4122) caused an regression for me. The relative scope now works properly, but the output is broken in the following case (also included in the following attachment):

namespace MyNamespace {

template<class> struct Foo;

/** @todo Xrefitem works without issues */
template<class T> struct Foo<T> {};

/** @todo Xrefitem prints warning */
template<class T> struct Foo<Bar<T>> {};

}

When processing the file, Doxygen prints the following output (in other words, fully-scoped name of the documented template specialization, character by character):

todo:2: warning: Unexpected character `M'
todo:2: warning: Unexpected character `y'
todo:2: warning: Unexpected character `N'
todo:2: warning: Unexpected character `a'
todo:2: warning: Unexpected character `m'
todo:2: warning: Unexpected character `e'
todo:2: warning: Unexpected character `s'
todo:2: warning: Unexpected character `p'
todo:2: warning: Unexpected character `a'
todo:2: warning: Unexpected character `c'
todo:2: warning: Unexpected character `e'
todo:2: warning: Unexpected character `:'
todo:2: warning: Unexpected character `:'
todo:2: warning: Unexpected character `F'
todo:2: warning: Unexpected character `o'
todo:2: warning: Unexpected character `o'

In addition to this warning, in the cross-reference list (in this case the TODO list), the following is displayed:

Bar< T > > Class MyNamespace::Foo< Bar< T > >

instead of just:

Class MyNamespace::Foo< Bar< T > >

To be clear, the issue appears only when using template as template parameter in template specialization (very corner case, I know). When using non-templated type as template parameter (the first case), it works properly. Also it doesn't matter if the class is enclosed in namespace or not.

The issue is not present in the parent commit (9f477b8) and is still present in current master (b3c44e5).

Thanks a lot!

On 2014-12-18 18:44:18 +0000, Vladimír Vondruš wrote:

Created attachment 292995
Repro/test case for the regression

On 2014-12-19 05:17:38 +0000, Kevin McBride wrote:

I tested attachment in comment # 6 with the release version of 1.8.8 to verify the output. The output is okay, and I turned off quiet to verify there were no warnings. Unfortunately, I have not yet found a way to compile 1.8.8-GIT on my Windows laptop, despite a request on bug 697511 to get the necessary files to get Visual Studio to compile doxygen.

On 2014-12-19 10:25:55 +0000, Dimitri van Heesch wrote:

Regression confirmed. Should be fixed in the next GIT update.

On 2014-12-25 16:03:41 +0000, Dimitri van Heesch wrote:

This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.9. 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 (preferrably in the form of a self-contained example).

@doxygen doxygen closed this Jul 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.