jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.48k stars 4.02k forks source link

Parallel execution of import-jdl causes issues with --interactive #9570

Closed MarcelRosenberger closed 5 years ago

MarcelRosenberger commented 5 years ago
Overview of the issue

There are issues running the import-jdl subgenerator to import a jdl-file that contains multiple applications when using the command-line argument --interactive. Multiple applications are generated with parallel processes, one for each application. When using --interactive the executions stop at various points to ask for overwriting or skipping files. Since the processes are run in parallel the questions in the command-line overlap jumping from one application to another and back. This leads to the issue that the answers (skip, overwrite) might not be related to the files it seems. Also there are formatting and visibility issues in the command line due to the overlapping processes.

Reproduce the error

Create a Model.jdl with multiple application {...} segments Run jhipster import-jdl Model.jdl --interactive

Suggest a Fix

If the import-jdl subgenerator is run with --interactive switch, the entity generation should not be done in parallel

JHipster Version(s)

5.8.1

[x] Checking this box is mandatory (this is just to show you read everything)

pascalgrimaud commented 5 years ago

The related code is here: https://github.com/jhipster/generator-jhipster/blob/master/cli/import-jdl.js#L195-L221

Would you like to try to contribute and improve this behavior ?

pascalgrimaud commented 5 years ago

It can be a minor improvement but it seems there is a lack of interest for that. I'm closing this, but feel free to submit a PR.