checkonly flag do not log which file contains error [V1.2021.7 vs V.2014]

+1 vote
asked Jun 17, 2021 in Bug by The-Lu (74,900 points)
edited Jun 17, 2021 by The-Lu

Hello PlantUML team,

It seems there is a regression about this functionality...

Test on: V1.2021.7
with: 2 files (a.txt and b.txt) one without error (a.txt) and one with error (b.txt):

Test -checkonly

>java -jar  plantuml.jar -checkonly a.txt b.txt
Some diagram description contains errors
>Exit code: 200
  • We observe only 'Some diagram description contains errors': 
    Not the name of the wrong file!
    Why?

Test -checkonly -stdrpt

>java -jar  plantuml.jar -checkonly -stdrpt a.txt b.txt
>Exit code: 200
  • We observe nothing!
    Why? Is is normal or not?

Test -syntax

>java -jar plantuml.jar -syntax a.txt b.txt
...
Ctrl+C
>Process failed to respond; forcing abrupt termination...
>Exit code: 1
  • What is the difference with '-syntax'?
    (Hints: After new tests: OK that is for 'pipe' mode [To report any syntax error from standard input without generating images​])

After this observation:

  • Could you have a look about this very old functionality?

See new wanted feature here:
https://forum.plantuml.net/14067/how-prevent-plantuml-from-creating-error-images

Regards,
Th.

1 Answer

0 votes
answered Jun 22, 2021 by plantuml (295,800 points)

It seems there is a regression about this functionality...

The question https://forum.plantuml.net/1537/checkonly-flags-do-not-log-which-file-contains-error is very old (7 years!). So it does not describe the actual behavior of PlantUML. Sorry about that ! 

The situation is complex because all those flags have been added over time since 2014  without any global thinking. And changing their behavior is now very risky because it may break some existing scripts.

The aim of -checkonly flag is just to be used in some scripting, not directly from the command line. In theory, we should not even print any messages (like "Some diagrams contains..." ). But once again, I think it's too late to change this.

The only thing that we can easily do is to add some new options in -stdrpt, because it won't break existing scripts. For example, we could add a new flag -stdrpt:text which would produce a text about which file(s) have error. Basically, it would be the same info as -stdrpt:1 or -stdrpt:2 but formatted differently.

Our main difficulty is that we have no idea of what people would like.

The good news is that this thread can help !

So feel free to emit suggestion here.

Thanks

...