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

Enabling multi-step generation #680

Open
2 tasks
jdiazgon opened this issue Jun 27, 2018 · 1 comment
Open
2 tasks

Enabling multi-step generation #680

jdiazgon opened this issue Jun 27, 2018 · 1 comment

Comments

@jdiazgon
Copy link
Member

Our objective

  • We will add a new configuration feature on the context.xml so that the user is able define a generation pipeline. For instance:
<gen-pipeline>
	<incrementRef ref="crud_openapi_java_server_app"/>
	<incrementRef ref="crud_java_server_app::inc21" use-input="${variables.entityName}Entity.java"/>
  </gen-pipline>

This configuration means that from an OpenAPI file we will generate the crud_openapi_java_server_app templates. Then, using the generated ${variables.entityName}Entity.java, we will generate templates from the crud_java_server_app using the increment with id "inc21". Related to issue #678.

  • The second increment will completely wait until the first increment has been generated. Then we need some logic to try to compile the generated files from the first increment (maybe by a method tryCompile() to try to compile with each plug-in?). This way, we will be able to use the pojo.classobject and reflection. If compiling was not possible, we will have to use the java source file rather than the class object and generate with that data. Related to issue Compiling generated source code #679.

Although this issue is tricky, it will highly improve maintainability of the templates and reduce the development time for the next plug-ins templates.

Related/Dependent Issues

Part of issue #676.

@github-actions
Copy link

Stale topic. Please negotiate closing or discussing the relevance of this ticket.

@maybeec maybeec changed the title Adding gen-pipeline tag for enabling multi-step generation Enabling multi-step generation Apr 25, 2020
@maybeec maybeec removed this from the cobigen-core-v5.1.0 milestone Aug 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants