-
-
Notifications
You must be signed in to change notification settings - Fork 689
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Doxygen "unbalanced grouping commands" warnings #3654
Comments
So I inspected the Doxygen build artifacts, e.g. and did not find any file that would contain an "unbalanced grouping commands" warning. The warnings are only shown in the GitHub actions build log, but are not present in any output file that is later read/rendered to the HTML files. And as said before, I am unable to find a pattern that would raise those warnings. As said, my only guess is that we are somehow generating some I would have expected the output of the above scripts be present in the GHA build artifacts, but looks like the artifacts only contain the Doxygen documentation HTML pages. So I'd dare to say that the only way this can be debugged is by building the documentation locally and checking the files generated by the above scripts. The question to the Doxygen mailing list has not been answered either. |
A question has been created as https://stackoverflow.com/questions/74803895/fix-unbalanced-grouping-command-doxygen-warnings Here I posted:
|
It might have been that I found the problem, it looks like it is indeed in the perl script (as suggested somewhere).
and at the end of the file we see:
We see that a grouping starts for the The resulting file (example.tar.gz):
|
This is awesome @albert-github. Thanks for having taken the time to investigate this. I'll have a closer look during the coming days, and probably push a PR with the fixes following your proposal |
A PR has been submitted: #3805, but it looks like it requires more work/some workaround to make clang happy, or else, it is the Perl script that should be changed. @blowekamp Can the Doxygen version be updated to 1.9.5 in https://github.com/InsightSoftwareConsortium/ITKDoxygen in case that also helps? I have not found where the version is specified so as to submit a PR. |
The doxygen version is provided by the build machine, |
I just updated doxygen. Let's not merge PR 3805 until at least tomorrow. That way we will see the output with just the doxygen version updated. |
The dashboard is still showing such warnings and fixing them would be a tremendous benefit when going over the dashboard issues. |
@jhlegarreta
|
Not sure if I follow here @albert-github. Those warnings can be openly seen in the |
As non Insight user, but looking at it from the doxygen perspective how would I know where I can see the warnings etc. and furthermore these warnings are not persistent and where can I find the resulting documentation and the used Doxyfiel and version. From the comment #3654 (comment) it looked that 2 years ago the problem was reported as coming from a perl file but this file has not been updated since a long time so most likely the problem is still at that place. |
Still not following @albert-github:
The issues are being reported nightly and consistently since a few years now. The Doxygen file has not changed in relevant ways for this, and I remember @blowekamp mentioning whether we should update the Doxygen version being used, but I cannot find the comment/PR/issue now.
I am not sure what the root cause of the warnings is: #3805 (comment) was a manual fix that seemed to fix things, but then clang would not like the fix, so the underlying issue is maybe somewhere else, or we have to make clang understand that the change should persist. |
The per script is only used during the documentation generation and has, as far as I can tell, nothing to do with clang. Furthermore I don't see the reason why one would like to place the I think a maintainer / contributor / developer of ITK should fix the perl script. I see that there is the PR #3805 that should have been merged in December 2022 but never was. Furthermore I don't like the fix in the PR #3805 as it works around a problem in the perl script, thus it can easily resurface. The problem should be fixed ad the root cause of the problem. I think this is also already mentioned in #3805 As side note:
what I mean that when fixed the problem cannot be seen anymore. |
Yes. We are currently using 1.9.4 and the latest release of Doxygen is 1.13.2. Time is likely better spent getting a newer version of Doxygen to work than maintaining the old one. With the ITKDoxygen repository being used for the daily production this is a task that any community member can take on. Unfortunately ITKDoxygen's build is not being reported to the dashboard yet. |
I agree that the script should be fixed. I just used copilot to translate it to python, and it looks reasonable. I think the change in language will make the issue more approachable for the community. |
Never was because the solution was not optimal even to me, unfortunately, and hence the draft status. As you say, the underlying Perl issue also surfaced in that conversation, and some comments of yours earlier in this thread also mentioned the role of the Perl script in this issue.
The only solution we have is to trust a local build from the contributor.
Sounds reasonable, Brad. |
|
From the perl file:
It is use to apply one doxyen string to multiple member functions. For example:
That one string will be applied to both the the added grouping commands. |
That makes sense, but should normally be in the done straight in the code as now one is depending on some side effects (i.e. required empty lines). As you already use Regarding the
but should be
This one I quickly saw, but there are more. |
Issue #4161 might be related. |
I saw that 2 problems mentioned in #3654 (comment)
are already fixed, thanks. Gives some encouragement to report other problems as well (in new issues). |
Description
The dashboard Doxygen build is showing a number of "unbalanced grouping commands" warnings:
https://open.cdash.org/viewBuildError.php?type=1&buildid=8176854
These issues are also being reported by the nightly ITKDoxygen build:
https://github.com/InsightSoftwareConsortium/ITKDoxygen/actions/runs/3120254526/jobs/5060690356#step:4:2789
Expected information
The Doxygen build should be clean.
Actual information
The groups seem to be present and working as expected in the impacted classes' Doxygen pages, but fixing the warnings is necessary to keep the toolkit healthy and to avoid distractions.
Versions
master
Additional Information
Related to PR #3640 (comment).
The relevant Doxygen source code class/method/line:
https://github.com/doxygen/doxygen/blob/ade61047308990ec679d1d59f0019a825e87451d/src/docgroup.cpp#L142
A few things I've looked into:
Maybe the groups are not being closed properly in the
CMake
filedefgroup
s somewhere in here:https://github.com/InsightSoftwareConsortium/ITK/blob/b870edf59bb0347116d245a445a2df8f5c6a8e56/CMake/ITKModuleDoxygen.cmake
https://github.com/InsightSoftwareConsortium/ITK/blob/d12f14e105500362a30264e683a4045eed21ba14/CMake/ITKGroups.cmake
Or else it's maybe a closing
*/
in here?https://github.com/InsightSoftwareConsortium/ITK/blob/b870edf59bb0347116d245a445a2df8f5c6a8e56/Utilities/Doxygen/itkgroup.pl
e.g.
ITK/Utilities/Doxygen/itkgroup.pl
Line 74 in b870edf
Having a look at the first two warnings, which happen for


itk::AutoPointer
anditk::BackwardDifferenceOperator
I don't see any hint in the group/module bar in Doxygen:
However, when comparing to

itk::Array
which does not seem to trigger a warningIt looks like the first two have each a
defgroup
(ITKSystemObjects
foritk::AutoPointer
andOperators
foritk::BackwardDifferenceOperator
) which is itself inside another group (ITKSystemObjects
inSystemObjects
andOperators
inDataProcessing
, respectively):ITK/Documentation/Doxygen/Modules.dox
Line 510 in bcac6f9
Another randomly picked class which is also raising the warning,
itk::NeighborhoodOperatorImageFilter
, also contains the described nested group pattern (ImageFilters
being inFilters
).Maybe those nested groups are not being closed correctly when parsed by the above scripts. Inspecting the
dox
files that are generated by the CMake*.dox.in
files and Doxygen itself (e.g. somewhere in theblaster.kitware
machine) might provide a better idea. Otherwise, inspecting the artifacts available in ITKDoxygen:https://github.com/InsightSoftwareConsortium/ITKDoxygen/actions/runs/3120254526
might also provide some hint.
Related Doxygen mailing list post:
https://sourceforge.net/p/doxygen/mailman/doxygen-users/thread/CAPUXxNEK00EJruPwV__AL3W_bmoMWXuGoKBysXC4XEUeLM_9Ag%40mail.gmail.com/#msg37710320
The text was updated successfully, but these errors were encountered: