demike / TsUML2

Generates UML diagrams from TypeScript source code
MIT License
266 stars 34 forks source link

ParseError: Parse error at ..., expected "]" but got end of file - angular (v0.10.0) #23

Closed shimwesl closed 1 year ago

shimwesl commented 1 year ago

I have an angular application I'm trying to run against tsuml2 am experiencing an issue when I run the following command:

tsuml2 --glob "./src/app/*/!(.d|*.spec).ts"

It appears there's an issue in the nomnoml library with the following stack trace:

Error: Parse error at line 57 column 169, expected "]" but got end of file ParseError: Parse error at line 57 column 169, expected "]" but got end of file at error (z:\mypath\npm\node_modules\tsuml2\node_modules\nomnoml\dist\nomnoml.js:913:19) at parseNode (z:\mypath\npm\node_modules\tsuml2\node_modules\nomnoml\dist\nomnoml.js:824:13) at parseNodesAndAssocs (z:\mypath\npm\node_modules\tsuml2\node_modules\nomnoml\dist\nomnoml.js:737:24) at parsePart (z:\mypath\npm\node_modules\tsuml2\node_modules\nomnoml\dist\nomnoml.js:715:39) at parseNode (z:\mypath\npm\node_modules\tsuml2\node_modules\nomnoml\dist\nomnoml.js:815:28) at parseNodesAndAssocs (z:\mypath\npm\node_modules\tsuml2\node_modules\nomnoml\dist\nomnoml.js:737:24) at parsePart (z:\mypath\npm\node_modules\tsuml2\node_modules\nomnoml\dist\nomnoml.js:715:39) at parseNode (z:\mypath\npm\node_modules\tsuml2\node_modules\nomnoml\dist\nomnoml.js:815:28) at parseNodesAndAssocs (z:\mypath\npm\node_modules\tsuml2\node_modules\nomnoml\dist\nomnoml.js:737:24) at parsePart (z:\mypath\npm\node_modules\tsuml2\node_modules\nomnoml\dist\nomnoml

TIA

demike commented 1 year ago

Hi can you post the nomnoml dsl file. You can export it with the additional args --outDsl nomnoml.dsl

shimwesl commented 1 year ago

nomnom.dsl.txt

Hi - I've uploaded an file with obfuscated information from the original source. Let me know if this gives you what you need to spot the issue.

Thank you.

demike commented 1 year ago

@shimwesl the problem was identified (one with the new parser) and will be fixed in nomnoml soon.

shimwesl commented 1 year ago

Hi - thanks for looking into this! Can you please break down a summary of the root cause of the issue?

demike commented 1 year ago

@shimwesl to sum it up: The new nomnoml parser does currently not allow the character '#' but you can escape it like \#

But the nomnoml developer sayed he will fix that: https://github.com/skanaar/nomnoml/issues/205#issuecomment-1598236664

shimwesl commented 1 year ago

thanks a million - great tool

demike commented 1 year ago

@shimwesl can you try v 0.11.0 the problem with the new nomnoml parser should be fixed there ( the # are escaped now in tsuml2)

shimwesl commented 1 year ago

Hi - I uninstalled 0.10.0 and installed 0.11.0, double checked the version, and am still experiencing the problem.

demike commented 1 year ago

Sorry I did not merge my last pull request. So the fix is not in 0.11.0 I will release 0.12.0 today

shimwesl commented 1 year ago

I installed 0.12.0 via npm and it's not throwing the parser anymore. Thanks so much!!!

demike commented 1 year ago

@shimwesl Thank you for your patience and your help!