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

Failure to generate diagram in PlantUML converted files #63

Closed
ronaldtse opened this issue Jan 18, 2021 · 7 comments
Closed

Failure to generate diagram in PlantUML converted files #63

ronaldtse opened this issue Jan 18, 2021 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@ronaldtse
Copy link
Contributor

image

It seems that the converter includes the <CR> symbols and outputs them, which crashes LutaML:

diagram IsoDoc_IsoBibliographicItem {
  
  
  
  class BibliographicItem <<Bibliography>> {
  
  }
  
  class IsoBibliographicItem{
      +docIdentifier: IsoDocumentId

Trace:

lutaml-uml models/IsoDoc_IsoBibliographicItem.lutaml 
Traceback (most recent call last):
	10: from /Users/me/.rbenv/versions/2.6.6/bin/lutaml-uml:23:in `<main>'
	 9: from /Users/me/.rbenv/versions/2.6.6/bin/lutaml-uml:23:in `load'
	 8: from /Users/me/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/lutaml-uml-0.2.8/exe/lutaml-uml:21:in `<top (required)>'
	 7: from /Users/me/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/lutaml-uml-0.2.8/lib/lutaml/uml/interface/base.rb:11:in `run'
	 6: from /Users/me/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/lutaml-uml-0.2.8/lib/lutaml/uml/interface/command_line.rb:83:in `run'
	 5: from /Users/me/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/lutaml-uml-0.2.8/lib/lutaml/uml/interface/command_line.rb:83:in `each'
	 4: from /Users/me/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/lutaml-uml-0.2.8/lib/lutaml/uml/interface/command_line.rb:91:in `block in run'
	 3: from /Users/me/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/lutaml-uml-0.2.8/lib/lutaml/uml/parsers/dsl.rb:18:in `parse'
	 2: from /Users/me/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/lutaml-uml-0.2.8/lib/lutaml/uml/parsers/dsl.rb:23:in `parse'
	 1: from /Users/me/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/parslet-1.7.1/lib/parslet/atoms/base.rb:49:in `parse'
/Users/me/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/parslet-1.7.1/lib/parslet/cause.rb:70:in `raise': Failed to match sequence (WHITESPACE? DIAGRAM_DEFINITION) at line 1 char 1. (Parslet::ParseFailed
@ronaldtse ronaldtse added the bug Something isn't working label Jan 18, 2021
@ronaldtse
Copy link
Contributor Author

Actually it still doesn't work after removing <CR> symbols. Will await @w00lf for investigation.

@ronaldtse
Copy link
Contributor Author

The actual code is here: metanorma/metanorma-model-iso#60

w00lf added a commit to metanorma/metanorma-model-iso that referenced this issue Jan 18, 2021
@w00lf
Copy link
Contributor

w00lf commented Jan 18, 2021

The actual code is here: metanorma/metanorma-model-iso#60

The error was because of a redundant <<enumeration>> keyword on enum type entity:

enum <<enumeration>> {
....

Removed it, pushed changes

@ronaldtse
Copy link
Contributor Author

@w00lf thanks! Can the LutaML parser throw out the exact error so the user knows how to fix it?

@w00lf
Copy link
Contributor

w00lf commented Jan 18, 2021

@w00lf thanks! Can the LutaML parser throw out the exact error so the user knows how to fix it?

I am looking for a way to do that, the library that we are using for dsl parsing - parslet does allow it, but its not trivial to configure

@w00lf
Copy link
Contributor

w00lf commented Jan 18, 2021

@ronaldtse created an enhancement task for that

@ronaldtse
Copy link
Contributor Author

Thanks @w00lf ! Let's close this then.

ronaldtse pushed a commit to metanorma/metanorma-model-iso that referenced this issue Jan 18, 2021
ronaldtse pushed a commit to metanorma/metanorma-model-iso that referenced this issue Jan 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants