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
Hide inline namespace in html output #10070
base: master
Are you sure you want to change the base?
Conversation
This PR currently fails for unittest case 057. I locally run unittest and don't have idea how to fix the unittest. Run 057 unittestI create set(ENV{CTEST_OUTPUT_ON_FAILURE} "ON")
execute_process(
COMMAND
cmake -E env TEST_FLAGS="--xml --xmlxsd --xhtml --qhp --docbook --rtf --id 57"
cmake --build build --target tests
RESULT_VARIABLE result
)
if (NOT result EQUAL 0)
message(FATAL_ERROR "Running tests failed!")
endif() Run it with: cmake -P run_tests.cmake Set
|
fea7b7f
to
f18016c
Compare
When you want to run locally the tests you can do e.g.:
for running just one test, like you did in the
Note such a file should never entry the repository (and you created it, as far as I can see, only locally). Furthermore it looks like there might be 2 problems:
In the latest run I see at first glance 2 problems:
|
Fixed now, let it default to |
2f5f67c
to
2998a68
Compare
Actually
|
It seems
|
I'm not sure through which mechanism it is installed on GitHub Actions, but as the test are run on the Windows builds as well it must be present. (Locally I run the version I obtain through Cygwin so I don't have problems) |
I think the github action Windows image preinstalled libxml. Tested with an simple github action pipeline file, without manually install any thing, and printing xmllib version by
Full github action output: Corresponding workflow file: |
What is the status on this? I would love this feature. |
I'll take a look. Thanks! |
2998a68
to
9185632
Compare
Rebased, force-pushed, and re-run unittests on Linux, I find that both my branch (this PR, with force pushed commit) has same error as the upstream's master branch. Environment
The upstream master branch, local unittestIt use directory (base) zz@localhost:~/github/doxygen_official/build$ git log
commit 181b501cebab118c09c42ddbbd847899dde76735 (HEAD -> master, origin/master, origin/HEAD)
Author: Dimitri van Heesch <doxygen@gmail.com>
Date: Sun Mar 10 22:22:35 2024 +0100
Fix potential crash processing VHDL code with multithreading enabled
(base) zz@localhost:~/github/doxygen_official/build$ ctest . --rerun-failed --output-on-failure
Test project /home/zz/github/doxygen_official/build
Start 12: 012_cite
1/1 Test #12: 012_cite .........................***Failed 0.11 sec
1..1
not ok - [012_cite.dox]: test the \cite command
-------------------------------------
Difference between generated output and reference:
--- /home/zz/github/doxygen_official/build/testing/test_output_012/indexpage.xml 2024-03-11 10:06:57.387841381 +0800
+++ /home/zz/github/doxygen_official/testing/012/indexpage.xml 2024-03-11 10:03:37.427510097 +0800
@@ -6,8 +6,8 @@
<briefdescription>
</briefdescription>
<detaileddescription>
- <para>See knuth79 for more info.</para>
- <para>Other references with cross references see Be09 and BertholdHeinzVigerske2009 for more info. </para>
+ <para>See <ref refid="citelist_1CITEREF_knuth79" kindref="member">[3]</ref> for more info.</para>
+ <para>Other references with cross references see <ref refid="citelist_1CITEREF_Be09" kindref="member">[1]</ref> and <ref refid="citelist_1CITEREF_BertholdHeinzVigerske2009" kindref="member">[2]</ref> for more info. </para>
</detaileddescription>
<location file="012_cite.dox"/>
</compounddef>
-------------------------------------
error: Problems running bibtex. Verify that the command 'perl --version' works from the command line. Exit code: 2
/home/zz/github/doxygen_official/testing/012_cite.dox:6: warning: \cite command to 'knuth79' does not have an associated number
/home/zz/github/doxygen_official/testing/012_cite.dox:8: warning: \cite command to 'Be09' does not have an associated number
/home/zz/github/doxygen_official/testing/012_cite.dox:8: warning: \cite command to 'BertholdHeinzVigerske2009' does not have an associated number
-------------------------------------
1 out of 1 tests failed
0% tests passed, 1 tests failed out of 1
Total Test time (real) = 0.11 sec
The following tests FAILED:
12 - 012_cite (Failed)
Errors while running CTest The output of (base) zz@localhost:~/github/doxygen_official$ perl --version
This is perl 5, version 34, subversion 0 (v5.34.0) built for x86_64-linux-gnu-thread-multi
(with 60 registered patches, see perl -V for more detail)
Copyright 1987-2021, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page. My PR's branch, run unitest locallyIt use directory (base) zz@localhost:~/github/doxygen/build$ git log
commit 91856325bbb19f7d55d9c19254e25749c586b82c (HEAD -> hide_inline_namespace, origin/hide_inline_namespace)
Author: Zhuo Zhang <imzhuo@foxmail.com>
Date: Mon Mar 11 09:54:09 2024 +0800
[style] Adjust code style
(base) zz@localhost:~/github/doxygen/build$ ctest . --rerun-failed --output-on-failure
Test project /home/zz/github/doxygen/build
Start 12: 012_cite
1/1 Test #12: 012_cite .........................***Failed 0.08 sec
1..1
not ok - [012_cite.dox]: test the \cite command
-------------------------------------
Difference between generated output and reference:
--- /home/zz/github/doxygen/build/testing/test_output_012/indexpage.xml 2024-03-11 10:14:13.388483927 +0800
+++ /home/zz/github/doxygen/testing/012/indexpage.xml 2024-03-11 09:41:53.334425764 +0800
@@ -6,8 +6,8 @@
<briefdescription>
</briefdescription>
<detaileddescription>
- <para>See knuth79 for more info.</para>
- <para>Other references with cross references see Be09 and BertholdHeinzVigerske2009 for more info. </para>
+ <para>See <ref refid="citelist_1CITEREF_knuth79" kindref="member">[3]</ref> for more info.</para>
+ <para>Other references with cross references see <ref refid="citelist_1CITEREF_Be09" kindref="member">[1]</ref> and <ref refid="citelist_1CITEREF_BertholdHeinzVigerske2009" kindref="member">[2]</ref> for more info. </para>
</detaileddescription>
<location file="012_cite.dox"/>
</compounddef>
-------------------------------------
error: Problems running bibtex. Verify that the command 'perl --version' works from the command line. Exit code: 2
/home/zz/github/doxygen/testing/012_cite.dox:6: warning: \cite command to 'knuth79' does not have an associated number
/home/zz/github/doxygen/testing/012_cite.dox:8: warning: \cite command to 'Be09' does not have an associated number
/home/zz/github/doxygen/testing/012_cite.dox:8: warning: \cite command to 'BertholdHeinzVigerske2009' does not have an associated number
-------------------------------------
1 out of 1 tests failed
0% tests passed, 1 tests failed out of 1
Total Test time (real) = 0.08 sec
The following tests FAILED:
12 - 012_cite (Failed)
Errors while running CTest |
UnittestI would like to add a new test, "102_a.cpp". I have no idea how to pass customized option What's more, the upstream's master branch run unittests failed on my local machine (ubuntu 22.04), hence this PR's unittest is getting stuck.
How I ran unittest locallyAdd set(ENV{CTEST_OUTPUT_ON_FAILURE} "ON")
execute_process(
COMMAND
cmake -E env TEST_FLAGS="--xml --xmlxsd --xhtml --qhp --docbook --rtf"
cmake --build build --target test
RESULT_VARIABLE result
)
if (NOT result EQUAL 0)
message(FATAL_ERROR "Running tests failed!")
endif() Build and run with: #!/bin/bash
cmake \
-S . \
-B build-docker2 \
-G Ninja \
-Dbuild_doc=YES \
-Dbuild_wizard=NO \
-Dbuild_search=YES -Dbuild_app=YES -Dbuild_parse=YES -Dbuild_xmlparser=YES And get result:
Failure case investigation
Also tried align python version to gitlab CI's, i.e. 3.11.8, but failure cases unchanged. |
Regarding comment #10070 (comment)
I assume this is about the message
for generating the internal documentation (a proposed pull request #10725 already exists) and about problems regarding the Mac (just ignore for the time being). Regarding the problems with the |
Regarding the new test #10070 (comment)
(see e.g. 085_tooltip.cpp) Regarding the python problem, the tests run the python command and this can either be python2 or python3 and it is the responsibility of the system / user to have a proper python version linked to the python command (on *nix this is typically done ly mean of a symbolic link) and this gives the most flexibility. |
Thanks, I now installed LaTeX and 001~101 tests all passed. |
Thanks for pointing out the test_output_102/docbook/namespacefoo_1_1v1.xml:17: parser error : Opening and ending tag mismatch: para line 17 and listitem
<listitem><para></listitem>
^
test_output_102/docbook/namespacefoo_1_1v1.xml:18: parser error : Opening and ending tag mismatch: listitem line 17 and itemizedlist
</itemizedlist>
^ Full details : # build
cd ~/github/doxygen/
cmake --build build
# run all tests
cmake -P ./test.cmake
# run the new added test: 102_hide_inline_namespace.cpp
cd build/testing
python ../../testing/runtests.py --xml --xmlxsd --xhtml --qhp --docbook --rtf --id 102 --doxygen ../bin/doxygen --inputdir ../../testing --outputdir .
|
Quality Gate failedFailed conditions |
Regarding:
for this there is the possibility / flag
see also
|
Regarding:
this indicates to me that some adjustments are also needed in |
Oh I see in the void XmlDocVisitor::operator()(const DocPara &p)
{
if (m_hide) return;
m_t << "<para>";
visitChildren(p);
m_t << "</para>\n";
} But I'm not familiar with |
I just saw that also in the test_output_102/html/namespacefoo.xhtml there are some problems (the option |
For the first para error, it seems to be caused here:
Each def file seems to call the start and end functions on the current generator:
Based on this information, I would guess that for some reason the |
Aha! I believe the first para error is caused by You prematurely return before the end item can be added:
Maybe call |
Regarding the remark in #10070 (comment) I'm not sure that the |
Ah, yes the member declaration does need to be closed too.
It seems that closing both fixes the errors.
However, I am a bit confused by the |
Description
This PR try hide inline namespaces in html output, for the reason:
foo::Image
, instead of the tediousfoo::_v1::Image
foo::_v1::Image
for version1.x.y
, usefoo::_v2::Image
for version2.x.y
.foo::Image
,foo::_v1::Image
,foo::_v2::Image
} in the library's code.This PR is implemented by:
HIDE_INLINE_NAMESPACES
which defaults todefaults toYES
NO
for compatibility, set toYES
to have effect on html outputHIDE_INLINE_NAMESPACES
option.e.g. for classes defined inside an inline namespace, show the class, but hide its direct outer scope(i.e. the inline namespace).
Visualize output html difference
The config file
Doxyfile
is:The C++ header files that html document generated from, is with contents:
References
Related issues and repos:
PR status