Generator-jhipster: JDL App generation is broken, again

Created on 19 Apr 2018  Â·  28Comments  Â·  Source: jhipster/generator-jhipster

The new JDL app generation support is broken, below are the issues

  • [x] The parser expects, appType, DB and basename to be passed, which is not logical for app generation as it needs to be inferred from the app config
  • [x] The import-jdl sub gen expects a .yo-rc.json when generating applications, it should be skipped
  • [x] The path option is not required and might cause issues(especially in JH online), it needs to be removed as we really don't need it, and for microservices, we could always create folders from the current directory
  • [x] When the app config is created it needs to call the app generator to create the actual source code as well

cc @MathieuAA

JDL

Most helpful comment

I've just released v3. Here are the done things/issues (you can see them in the coming PR):

  • No app & only entities -> creates .jhipster folder with the entities and generates them. No issue here
  • One app & entities -> creates a .yo-rc.json and a .jhipster folder with the entities, does not generate anything because I don't get why Yeoman wouldn't let me compose the app & the entity generators as I want (maybe a priority issue, and I may not call the app generator correctly)
  • More than one app & entities, once I get the second one, I don't expect it to be too difficult a thing to do.

All 28 comments

Didn't the merged PR cover these?Le 19 avr. 2018 14:05, Deepu K Sasidharan notifications@github.com a écrit :The new JDL app generation support is broken, below are the issues
The parser expects, appType, DB and basename to be passed, which is not logical for app generation as it needs to be inferred from the app config The import-jdl sub gen expects a .yo-rc.json when generating applications, it should be skipped The path option is not required and might cause issues(especially in JH online), it needs to be removed as we really don't need it, and for microservices, we could always create folders from the current directory When the app config is created it needs to call the app generator to create the actual source code as well
cc @MathieuAA

—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or mute the thread.

@MathieuAA I don't think so

I was trying this

application {
  config {
    baseName MyApp
    applicationType monolith
    databaseType sql
    prodDatabaseType mysql
  }
}

I won't be able to properly look into it until the 24th. But this smells weird.Le 19 avr. 2018 17:42, Deepu K Sasidharan notifications@github.com a écrit :I was trying this
application {
config {
baseName MyApp
applicationType monolith
databaseType sql
prodDatabaseType mysql
}
}

—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or mute the thread.

I confirm we still have the issue - as JHipster 5 is just around the corner, shouldn't we better remove the option to generate apps for the moment? @MathieuAA do you have time to fix this, or can we help you?

I would still prefer to fix this as the issues are easily fixable and its a
great feature.

I would also like to remove the path option in the JDL as its not necessary
for our workflows and it would cause lot of issues for us (by users who
will abuse it)

I can also do this once I'm back from vacation if Matheue is busy

On Wed, 9 May 2018, 3:05 pm Julien Dubois, notifications@github.com wrote:

I confirm we still have the issue - as JHipster 5 is just around the
corner, shouldn't we better remove the option to generate apps for the
moment? @MathieuAA https://github.com/MathieuAA do you have time to fix
this, or can we help you?

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/7504#issuecomment-387682115,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABDlF8eO0zQouPEcoz7YhQNyt93AFRjDks5twrh7gaJpZM4Tblrc
.

@jdubois I'm fixing these issues as I write this. @deepu105 I'll remove it after fixing the app generation.
What does "around the corner" mean? :)

@MathieuAA we have a "JHipster Day" at Ippon on Tuesday with @PierreBesson @pascalgrimaud @wmarques and my trainees so it should be a good day to release! We'll need to have some Opencollective drinks an evening with you and @cbornet (but not on Tuesday it's the 10th anniversary of the ParisJUG).

@jdubois okay then. I don't expect what I'm making will be ready for tuesday. The safest solution is to rollback to before I added the app gen.
I don't know when and if I'll be available the next few weeks, I'll try to keep some availability.

@jdubois i would suggest to push back the release a bit as well. There are stuff that needs to be ironed out, like e2e tests for React etc.
Also, there are some issues to be fixed with the Blueprint system which is a blocker for v5 IMO.
I'm on vacation this month so it will be difficult for me to work on that stuff.

I guess a perfect day for the release would be the JHipster conf, we could even do it during the Keynote :)

I understand but we've been delaying the release for about one month now, and everybody is waiting for our React support. For me we need to release ASAP, and then we'll improve.

  • For React e2e: I know they don't work, but those are not a blocker, we can release without them
  • Blueprints: yes that's very annoying, but nobody uses them at the moment, so they can be postponed
  • JDL: I don't really know the status here. Is that easy to rollback? Is there any issue with staying with JDL v1? JDL v1 was working very well, there's no need to wait for JDL v2 to do a release

-> for me we should do a v5 next week, and then all of these will for v5.1, v5.2, v5.3... If we need to wait for everything we'll never release

Quite easy. I've just finished implementing a fix for the application generation, I'm currently writing the tests. Don't hold your breath for me, there are quite a lot of tests to move around or write.

I agree to do the release more quickly. It would be great if the huge amount of work that has been done (over a 1300 commits) could be released. If application generation can be rolled back easily then let's do it. Let's not to put stress on @MathieuAA.

Technically we dont have to roll back as there is no breaking changes in
JDL. We just need to remove docs may be untill its fixed

Thanks & Regards,
Deepu

On Fri, May 11, 2018 at 12:50 AM Pierre Besson notifications@github.com
wrote:

I agree to do the release more quickly. It would be great if the huge
amount of work that has been done (over a 1300 commits) could be released.
If application generation can be rolled back easily then let's do it. Let's
not to put stress on @MathieuAA https://github.com/MathieuAA.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/7504#issuecomment-388157584,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABDlF7Pl3d4gnCm4-ry8hlecWaK9cmSLks5txJMXgaJpZM4Tblrc
.

@deepu105 @jdubois I'll release JCore v3 today or tomorrow (and create a PR for the subgen)

Awesome, thanks @MathieuAA !! I'll do a new beta release just afterwards

​​
awesome, you can assign me as a reviewer once PR is done

Thanks & Regards,
Deepu

On Thu, May 31, 2018 at 12:15 PM Julien Dubois notifications@github.com
wrote:

Awesome, thanks @MathieuAA https://github.com/MathieuAA !! I'll do a
new beta release just afterwards

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/7504#issuecomment-393425429,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABDlF48oLoeZbxHjf-opLZDa8y0MkgIkks5t35GPgaJpZM4Tblrc
.

I've just released v3. Here are the done things/issues (you can see them in the coming PR):

  • No app & only entities -> creates .jhipster folder with the entities and generates them. No issue here
  • One app & entities -> creates a .yo-rc.json and a .jhipster folder with the entities, does not generate anything because I don't get why Yeoman wouldn't let me compose the app & the entity generators as I want (maybe a priority issue, and I may not call the app generator correctly)
  • More than one app & entities, once I get the second one, I don't expect it to be too difficult a thing to do.

Okay, the last PR didn't work. I'm fixing it like Deepu suggested and dropping a PR.

@pascalgrimaud with the with-entitiies flag, I don't have to compose three generators anymore, just jdl & entity or jdl & app. Thanks :)

nice @MathieuAA !!

@pascalgrimaud you told me a few days ago that you managed to reproduce the issue by using the --with entities flag, and no yarn link. What's your setup to test without linking?

@pascalgrimaud nevermind!!! I found the issue. Yeoman has to declare options before anything else (it won't pick up the config file otherwise). I don't know why.
Look, this doesn't work:

module.exports = class extends BaseGenerator {
    constructor(args, opts) {
        super(args, opts);

        this.configOptions = ths.options.configOptions || {};
        // This adds support for a `--skip-client` flag
        this.option('skip-client', {
            desc: 'Skip the client-side application generation',
            type: Boolean,
            defaults: false
        });

And if I don't initialize this.configOptions up top, but at the bottom, it works.
Must be a special property of JS class constructors, or a side-effect of declaring for the first time options for Yeoman. This sucks.
At least, I'm fixing this today.


edit, maybe not. This fails or succeeds one of out two times... one time I do a yarn global add file:..., it fails, I redo it again it works. This is crazy.

In fact, I managed to reproduce the issue without doing anything:

  • copy a sample .yo-rc.json with some entities inside .jhipster/ (BankAccount, Label, Operation)
  • type jhipster --with-entities
    But it's resolved now.

Currently, I can't do a yarn link generator-jhipster as I'm with Yarn 1.7.0 and there is an issue with it. But I do it after the 1st generator instead of before.

About Travis:

@pascalgrimaud That's what I did, I did what the script does. It succeeds beautifully or fails miserably each time I do a yarn global add file:..., in turns.

@pascalgrimaud Nuking the cache, removing links and trying again seems to be consistent, and works. Thanks ;)

Btw you can also do npm link to do the linking and the use yarn for
everything else

Thanks & Regards,
Deepu

On Fri, Jun 15, 2018 at 9:44 AM Mathieu ABOU-AICHI notifications@github.com
wrote:

@pascalgrimaud https://github.com/pascalgrimaud Nuking the cache,
removing links and trying again seems to be consistent, and works. Thanks ;)

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/7504#issuecomment-397541062,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABDlF1P4pNlvcJtV53lqSRArHih193Zlks5t82XJgaJpZM4Tblrc
.

@deepu105 Yes :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pascalgrimaud picture pascalgrimaud  Â·  3Comments

sdoxsee picture sdoxsee  Â·  4Comments

SudharakaP picture SudharakaP  Â·  3Comments

SudharakaP picture SudharakaP  Â·  3Comments

DanielFran picture DanielFran  Â·  3Comments