-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
getDefsNew fails to find symbols if a filename matches a namespace name #11282
Comments
I can imagine that there might be a conflict, but I don't understand yet where this is in the output, so where does the problem:
show? Also I don't understand the usage / purpose of the file |
This is a minimal reproducer extracted from Eigen's documentation.
It is a separate documentation page. We have many such pages, like https://libeigen.gitlab.io/docs/TopicInsideEigenExample.html. The purpose is usually to describe some particular usage in detail.
Since it's a
where Aligned is not a link, when it should be. |
Shines a bit of a light on the problem.
to
and setting
the problem as well. I don't say the last (with the settings) is the solution as this would mean that the documentation information from the (include) file We have to dive into the problem a bit. |
I dove a bit into the problem and ran with the current master (1.13.0 (163ed03)) and the problem is not present. I think the problem is fixed but not released. |
Ah, I think you're right, thanks. I was working off master, but I guess it was originally from an older commit. Running git bisect, it looks like it was "fixed" by 4ebaa8b. |
Actually, although this minimal reproducer seems fixed, we still do have the bug in Eigen's codebase. Temporarily renaming our I'll see if I can rework the reproducer. |
I see that the repository package can easily be obtained by: git clone https://gitlab.com/libeigen/eigen.git
|
The documentation won't currently build from the main source yet - I'm working to fix it. But I do have a branch with my current fixes: git clone -b doxyfix --single-branch https://gitlab.com/cantonios/eigen.git
cd eigen
cmake -B .build
make -C .build doc 1>doc.log You should see all the warnings about
For example, in table of math functions pretty much all the member function links ( rm Eigen/Eigen
make -C .build doc -j12 1>doc.log then all the symbols are resolved, and the links start working. |
[edit: I overlooked the resolver.tar.gz which is also a small example to capture the problem] I was able to capture the problem is a very small example issue11282.zip running I think doxygen's symbol resolving algorithm gets confused by the file and namespace with the same name. |
@cantonios Please verify if the referenced commit fixes the problem for you. Do not close the issue, this will be done automatically when the next official release becomes available. |
Yes, that commit fixes the issue, thank you! |
This issue was previously marked 'fixed but not released', |
Describe the bug
For the Eigen project, we have a
namespace Eigen
, and a header file namedEigen
. Doxygen fails to find certain symbols likeEigen::Aligned
because of the conflicting scope names.The reason seems to be because in the
getDefsNew
function here, the function first looks for a single scope. It finds thefile
version ofEigen
(instead of the namespace scope), then tries to search that file scope for the symbol and fails.To Reproduce
resolver.tar.gz
Expected behavior
If there are multiple matching scopes, doxygen should search all of them for the match.
Version
Compiled from
master
commit163ed03282c894bd9a15cc2a81182cb5336daefd
.Possible Solutions
The most intrusive solution is to change the
SymbolResolver
to return all matching symbols. You would then iterate through all possible scopes.The least intrusive seems to be to add an argument
startIndex
toSymbolResolver::resolveSymbol
, that would only search therange
starting atstartIndex
. IngetDefsNew
, you would then increment thestartIndex
when searching for thescope
until either you find a match, or run out of scopes.The text was updated successfully, but these errors were encountered: