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

Model output #59

Open
jjjt-git opened this issue Oct 9, 2022 · 4 comments
Open

Model output #59

jjjt-git opened this issue Oct 9, 2022 · 4 comments

Comments

@jjjt-git
Copy link

jjjt-git commented Oct 9, 2022

I am trying to use gtad in a project and have problems with building config and template.
After a few hours of testing and debugging and code-reading, I came to the conclusion, that implementing an option to output the models passed to the mustache engine into separate files should be possible (and very helpful for more inexperienced users), but my knowledge of C++ and the library used by gtad is not great enough to implement it myself. (or the words to search for to find a template, that will do just that)

@KitsuneRal
Copy link
Member

Thanks for your interest, and sorry for a long wait with the response and the review. I assume what you were asking for here, you managed to fix in #60, or is there something else I'm missing here? Also, let me know if there's anything else I can help with - issues and PRs are very welcome!

@jjjt-git
Copy link
Author

No the Idea was, that it would help in development of templates and config, when there was an option to output the model, the template was filled with. My current method for this is to open a debugger (in my case gdb), set the breakpoint to the line, the template is filled with the model (main.cpp:13) and the print the contents of the model-variable (p model). Needless to say, this method is very indirect and difficult to scale for larger specs. It would be much easier, when it was possible to serialize the model-variable into json or yaml and place this file besides the generated sources.

@KitsuneRal
Copy link
Member

Ah, yes, indeed, that's what I'm doing myself...

@KitsuneRal
Copy link
Member

KitsuneRal commented Feb 21, 2024

FYI: This proved to be harder than I hoped: the Mustache library used by GTAD doesn't give away the context on which it runs. Either the library has to be changed, or each piece of the context should be recorded at the moment of building it. I tend to the latter so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

2 participants