Navigation Menu

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

PlantUML @start<engine> not recognized #9604

Closed
tllngr opened this issue Sep 15, 2022 · 11 comments
Closed

PlantUML @start<engine> not recognized #9604

tllngr opened this issue Sep 15, 2022 · 11 comments
Labels
documentation bug in the documentation enhancement a request to enhance doxygen, not a bug

Comments

@tllngr
Copy link

tllngr commented Sep 15, 2022

Describe the bug
When using special commands @start<engine> and @end<engine>, doxygen outputs warning unknown command instead of using plantuml to render desired content.

Expected behavior
Expect usage of @start<engine> and @end<engine> works as described in manual at https://www.doxygen.nl/manual/commands.html#cmdstartuml

To Reproduce
Use project from attached .zip doxygen_plantuml_issue.zip

Included markdown file main.md contains:

# Main

@startjson
{
"fruit": "Apple",
"size": "Large"
}
@endjson

@startuml
A --> B
@enduml
  • Running doxygen to generate html only output will cause error messages:

$ doxygen
...
mytest/main.md:3: warning: Found unknown command '@startjson'
mytest/main.md:8: warning: Found unknown command '@endjson'
...

As result, generated html page html/md_main.html shows unrendered plain text of the start/endjson block. The second block start/enduml is rendered. Tried also salt, yaml and others. Looks like everything other than start/enduml is not recognized.

Example project is attached to this issue

Version

Attachement
doxygen_plantuml_issue.zip

@albert-github albert-github added the Usage The mentioned problem is not a doxygen problem but due to usage of a feature. label Sep 15, 2022
@albert-github
Copy link
Collaborator

Doxygen does not support the individual start commands for plantuml like @startjson but it supports @startuml{json}, the user can define an own command in the ALIASES settings like ALIASES += startjson=@startuml{json} and ALIASES += endjson=@enduml.

The chosen strategy is a design decision.

@tllngr
Copy link
Author

tllngr commented Sep 16, 2022

Hi Albert,

It works like you described it. I'd suggest to fix documentation at https://www.doxygen.nl/manual/commands.html#cmdstartuml by putting in your description and maybe extend/modify the example

Thank you for your quick reply and help!

@albert-github albert-github added enhancement a request to enhance doxygen, not a bug documentation bug in the documentation and removed Usage The mentioned problem is not a doxygen problem but due to usage of a feature. labels Sep 16, 2022
albert-github added a commit to albert-github/doxygen that referenced this issue Sep 16, 2022
Adding a small note about how to use the Plantuml commands like `@startjson` in doxygen
@albert-github
Copy link
Collaborator

Regarding the documentation suggestion I've just pushed a proposed patch, pull request #9606

doxygen added a commit that referenced this issue Sep 16, 2022
…son_docu

issue #9604 PlantUML @start<engine> not recognized
@albert-github albert-github added the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label Sep 17, 2022
@albert-github
Copy link
Collaborator

Code has been integrated in master on GitHub (please don't close the issue as this will be done at the moment of an official release).

@tllngr
Copy link
Author

tllngr commented Sep 26, 2022

Hi Albert!

Thanks for adding it to the docs

@doxygen
Copy link
Owner

doxygen commented Dec 27, 2022

This issue was previously marked 'fixed but not released',
which means it should be fixed in doxygen version 1.9.6.
Please verify if this is indeed the case. Reopen the
issue if you think it is not fixed and please include any additional information
that you think can be relevant (preferably in the form of a self-contained example).

@doxygen doxygen removed the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label Dec 27, 2022
@doxygen doxygen closed this as completed Dec 27, 2022
@MrNice2001
Copy link

ALIASES += startjson=@startuml{json} and ALIASES += endjson=@enduml

I tried to verify the proposed solution but the diagram of the JSON data (from main.md) is not present.

Procedure

  1. Extracted doxygen_plantuml_issue.zip
  2. Added to Doxyfile
                ALIASES               += startjson=@startuml{json}
                ALIASES               += endjson=@enduml           
  1. Updated PLANTUML_JAR_PATH in Doxyfile
  2. Executed doxygen Doxyfile with Doxygen v1.9.6

Result
No errors nor warnings during Doxygen execution, good.

Issue
But the first diagram is not generated, the JSON data is not displayed in a diagram.

My Understanding
The aliases are applied. Therefore, the main.md will be in interpreted in the following way:

# Main

@startuml{json}
{
"fruit": "Apple",
"test": "Apple"
}
@enduml

@startuml
A --> B
@enduml

The JSON data cannot be handled by PlantUML within the section @startuml and @enduml. Is my understanding correct? If yes, may we reopen this issue?

@tllngr
Copy link
Author

tllngr commented Mar 22, 2023

@MrNice2001

Your procedure works on my linux x86_64 machine using doxygen 1.9.6 and plantuml-1.2023.4.jar.
The json part shows up as diagram as expected

You may try the following:

  • Use a new shell terminal instance and ensure doxygen --version does output version number 1.9.6
  • Delete doxygen output dir htmlbefore running doxygen

@albert-github
Copy link
Collaborator

@MrNice2001 as indicated by @tllngr this should work.

what does the following command line command return:

java -Djava.awt.headless=true -jar /usr/local/share/plantuml/plantuml-1.2022.7.jar -version

what does the following command return in your case:

doxygen -q -d markdown -d extcmd Doxyfile

@MrNice2001
Copy link

@MrNice2001

Your procedure works on my linux x86_64 machine using doxygen 1.9.6 and plantuml-1.2023.4.jar. The json part shows up as diagram as expected

You may try the following:

* Use a new shell terminal instance and ensure `doxygen --version` does output version number `1.9.6`

* Delete doxygen output dir `html`before running doxygen

I updated to plantuml-1.2023.4.jar and now it works for me as well.

Here is my takeaway:

  • PlantUML
    Version 1.2020.2 is not sufficent
    Version 1.2023.4 is sufficent
  • Configuration is needed:
	ALIASES               += startjson=@startuml{json}
	ALIASES               += endjson=@enduml  
  • Doxygen
    Version 1.9.1 is not sufficent
    Version 1.9.6 is sufficent

Thanks you for your swift support!!!

@MrNice2001
Copy link

@MrNice2001 as indicated by @tllngr this should work.

what does the following command line command return:

java -Djava.awt.headless=true -jar /usr/local/share/plantuml/plantuml-1.2022.7.jar -version

what does the following command return in your case:

doxygen -q -d markdown -d extcmd Doxyfile

Here the output:

java -Djava.awt.headless=true -jar /usr/share/plantuml/plantuml.jar -version

PlantUML version 1.2020.02 (Sun Mar 01 11:22:07 CET 2020)
(GPL source distribution)
Java Runtime: OpenJDK Runtime Environment
JVM: OpenJDK 64-Bit Server VM
Java Version: 17.0.6+10-Ubuntu-0ubuntu122.04
Operating System: Linux
Default Encoding: UTF-8
Language: en
Country: US
Machine: d-ryzen
PLANTUML_LIMIT_SIZE: 4096
Processors: 12
Max Memory: 16,844,324,864
Total Memory: 1,073,741,824
Free Memory: 1,058,011,120
Used Memory: 15,730,704
Thread Active Count: 1

The environment variable GRAPHVIZ_DOT has not been set
Dot executable is /usr/bin/dot
Dot version: dot - graphviz version 2.43.0 (0)
Installation seems OK. File generation OK

An update to PlantUML Version 1.2023.4 solved my issue.

For the sake of completeness, here the second output

doxygen-1.9.6/bin/doxygen -q -d markdown -d extcmd Doxyfile

======== Markdown =========
---- input ------- 
# Main

@startuml{json}
{
"fruit": "Apple",
"test": "Apple"
}
@enduml


@startuml
A --> B
@enduml



---- output -----
@page md_main Main\ilinebr 

@startuml{json}
{
"fruit": "Apple",
"test": "Apple"
}
@enduml


@startuml
A --> B
@enduml



=========

Thank you for your swift support!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation bug in the documentation enhancement a request to enhance doxygen, not a bug
Projects
None yet
Development

No branches or pull requests

4 participants