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

Bug: Generation of MetaModel instance breaks when no declarations #332

Closed
jeromesimeon opened this issue Sep 3, 2021 · 1 comment · Fixed by #334
Closed

Bug: Generation of MetaModel instance breaks when no declarations #332

jeromesimeon opened this issue Sep 3, 2021 · 1 comment · Fixed by #334
Assignees
Labels
Type: Bug 🐛 Something isn't working

Comments

@jeromesimeon
Copy link
Member

If there're no declarations in the concerto cto file, the metamodel generation throws and error instead of creating a metamodel with no declarations.

How to reproduce

namespace foobar
@jeromesimeon jeromesimeon added the Type: Bug 🐛 Something isn't working label Sep 3, 2021
@jeromesimeon jeromesimeon self-assigned this Sep 3, 2021
@jeromesimeon
Copy link
Member Author

This is only when fully qualified name resolution is being used:

zsh-5.8$ ../concerto-cli/index.js import --input test/data/model/empty.cto
11:40:52 AM - INFO: {
  "$class": "concerto.metamodel.ModelFile",
  "namespace": "test.empty",
  "imports": []
}
zsh-5.8$ ../concerto-cli/index.js import --input test/data/model/empty.cto --resolve
11:41:00 AM - ERROR: Cannot read property 'forEach' of undefined

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug 🐛 Something isn't working
Projects
None yet
1 participant