susanw1 / zscript

Command interface processor for embedded devices
MIT License
1 stars 0 forks source link

Enable template transform plugin to read templates from classpath #116

Closed susanw1 closed 1 year ago

susanw1 commented 1 year ago

I did it wrong. Although the template context can be read from a classpath (as per the transformer adapter), the templates themselves are expected to be in the current project's file structure.

I originally needed the standard model (ie the model context) to be defined in a single place, and to have downstream modules use those contexts to generate different types of file - java, cpp, python etc. But newly user-defined modules need to define their own YAML contexts, and use the existing templates (available as resources) to generate their code. They're defining their YAML, but importing their templates.

There are other issues we might sweep up too.