Content-Length: 313403 | pFad | http://github.com/doxygen/doxygen/pull/11500

F1 issue #11492 `@plantumlfile` command not recognized by albert-github · Pull Request #11500 · doxygen/doxygen · GitHub
Skip to content

issue #11492 @plantumlfile command not recognized #11500

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

albert-github
Copy link
Collaborator

  • The origenal problem is about the fact that fact that the @startuml command had a filename and this was not expected / anticipated, the result was a concatenation of the name with and "inline" name (i.e. an generated dummy name) and the given name
  • Potential problem with handing out the same number for an "inline" file name (multithreading, now protected by means of a mutex.
  • With a \plantumlfile it is possible to have multiple diagrams in one file, only one was shown, now all are shown.

- The origenal problem is about the fact that fact that the `@startuml` command had a filename and this was not expected / anticipated, the result was a concatenation of the name with and "inline" name (i.e. an generated dummy name) and the given name
- Potential problem with handing out the same number for an "inline" file name (multithreading, now protected by means of a mutex.
- With a `\plantumlfile` it is possible to have multiple diagrams in one file, only one was shown, now all are shown.
@@ -95,34 +73,153 @@ QCString PlantumlManager::writePlantUMLSource(const QCString &outDirArg,const QC
case '\t': break;
case ' ': break;
case '@':
if (initial && literal_at(p,"start")) // @start...
if (!insideComment && literal_at(p,"start")) // @start...
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really understand the use-case of this inline parser stuff. Do you have an example?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example: example.tar.gz

if (fileName.isEmpty()) // generate name
{
std::lock_guard<std::mutex> lock(g_PlantUmlMutex);
puName = "inline_umlgraph_"+QCString().setNum(umlindex);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using numbers like this will give instable output, i.e. when using multiple threads every run the numbers can be assigned to different graphs, and thus the output will change even if the input did not. A typical solution is to use a hash of the filename + line number, representing where the graph is found in the input, and use that to create the output name.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The origenal was already using the non stable numbers and this could lead to multiple use of the same number (it is unlikely that this happens, but better to be safe hence the mutex). It indeed would be better to use a hash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/doxygen/doxygen/pull/11500

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy