You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There have been a few issues in the past (e.g. #3, #50, #49) where the plantuml output contained invalid syntax/content. It might be a good idea to add some output filtering and/or monitoring to automatically detect and/or filter and/or comment out portions of the output that will prevent plantuml from rendering the rest of the output.
This is definitely a bug. {{packageName}} is use to to have a placeholder to later substitute the package name by the real name since many go file prefer to name imports using aliases.
Issues like those described in #49, #50 and #3 could be prevented from causing un-renderable output by filtering out (or commenting out) any lines that contain occurrences of certain known patterns.
Such lines could alternatively be commented-out (instead of stripped) (e.g. using sed).
Either of the above workarounds could be done manually by the user (using grep and/or sed or similar), except a novice user is unlikely to know what patterns to strip/convert. And (as issue #32 demonstrates) some users don't know enough about plantuml to effectively identify and manually correct such errors in the output.
Instead, goplantuml could internally perform equivalent filtering/commenting, so that users don't have to.
Also, it would be a better user experience if goplantuml automatically prevented a handful of errors from making the entire output un-renderable. E.g. For the first project I used goplantuml on, it generated >5000 lines of output that contained only 2 invalid lines. Simply removing or commenting-out those 2 lines made the rest of the diagram renderable and useful (though slightly incomplete due to the 2 missing edges/arrows).
Also, additional functional tests could be added to this repo (targeting a wider variety of OSS golang packages) and use similar pattern detection to detect whether goplantuml generates any such invalid output is generated. Such tests would likely detect functional regressions in goplantuml (e.g. when new versions of golang are released).
The text was updated successfully, but these errors were encountered:
There have been a few issues in the past (e.g. #3, #50, #49) where the plantuml output contained invalid syntax/content. It might be a good idea to add some output filtering and/or monitoring to automatically detect and/or filter and/or comment out portions of the output that will prevent plantuml from rendering the rest of the output.
For example, from #50 (by @jfeliu007):
Issues like those described in #49, #50 and #3 could be prevented from causing un-renderable output by filtering out (or commenting out) any lines that contain occurrences of certain known patterns.
For example:
Such lines could alternatively be commented-out (instead of stripped) (e.g. using
sed
).Either of the above workarounds could be done manually by the user (using
grep
and/orsed
or similar), except a novice user is unlikely to know what patterns to strip/convert. And (as issue #32 demonstrates) some users don't know enough aboutplantuml
to effectively identify and manually correct such errors in the output.Instead,
goplantuml
could internally perform equivalent filtering/commenting, so that users don't have to.Also, it would be a better user experience if
goplantuml
automatically prevented a handful of errors from making the entire output un-renderable. E.g. For the first project I usedgoplantuml
on, it generated >5000 lines of output that contained only 2 invalid lines. Simply removing or commenting-out those 2 lines made the rest of the diagram renderable and useful (though slightly incomplete due to the 2 missing edges/arrows).Also, additional functional tests could be added to this repo (targeting a wider variety of OSS golang packages) and use similar pattern detection to detect whether
goplantuml
generates any such invalid output is generated. Such tests would likely detect functional regressions ingoplantuml
(e.g. when new versions of golang are released).The text was updated successfully, but these errors were encountered: