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
Added application generation support for the JDL based on JCore v2 #7339
Conversation
@MathieuAA will you create a PR to update/add jdl files in project JDL samples? |
@DanielFran yes :) |
@deepu105 I was wondering if the way to generate an app is as simple as generating an entity... From the code, it looks like it's really easy but I'd rather have your opinion before committing the code. |
@MathieuAA have you also looked for upgrading https://github.com/jhipster/jdl-studio ? |
@jdubois Not yet edit: just tried, can't install the project for some annoying reason... Will try tomorrow. |
@MathieuAA give me some time, i'll take a look mostly this weekend. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine, from a high level look, will test some edge cases and take a closer look over the weekend
@MathieuAA I didn't understand this comment. Your PR already creates the application from JDL right? |
@deepu105 it creates the required .yo-rc.json files and folders (and generates .jhipster + JSON entity files if needed). It doesn't call the app subgen, that was my question :) |
This is good for me -> @deepu105 let's wait until your review this week-end |
@MathieuAA thats easy in the import-jdl index.js new line 156 where we call
also, ensure to skip |
Thanks Deepu! I'll update the PR.
By the way, have you tried fresh-installing JDL-studio lately? I've tried
setting it up from scratch yesterday evening and it gave me headaches.
Some issues I've had may have been caused by not fixing the versions,
but I'm not 100% sure yet. Will try to get it working right after.
…On 22/03/2018 16:30, Deepu K Sasidharan wrote:
@MathieuAA <https://github.com/mathieuaa> thats easy in the import-jdl
index.js new line 156 where we call |this.getExistingEntities()| just
add this inside the try block
|if (Object.keys(jdlObject.applications).length !== 0) {
this.composeWith(require.resolve('../app'), { force:
this.options.force, debug: this.options.debug, 'skip-install':
this.options['skip-install'], ... other flags that needs to be passed
}); } this.getExistingEntities().forEach((entity) => { ... }); |
also, ensure to skip |this.rebuildClient();| in the end |if
(Object.keys(jdlObject.applications).length !== 0)| to avoid double
webpack build
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7339 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACoDZRodvlwdoknBvFNOP8OFu-IHbvIqks5tg8N6gaJpZM4S1NfJ>.
|
@MathieuAA I didn't do fresh install recently, i can try this weekend. Btw use NPM as it doesnt work well with YARN due to flat structuring |
Roger that!
…On 22/03/2018 18:12, Deepu K Sasidharan wrote:
@MathieuAA <https://github.com/mathieuaa> I didn't do fresh install
recently, i can try this weekend. Btw use NPM as it doesnt work well
with YARN due to flat structuring
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7339 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACoDZS0uyXBrQDxqa3cvyQ7Gsa5sN4X1ks5tg9t-gaJpZM4S1NfJ>.
|
} | ||
} catch (e) { | ||
this.debug('Error:', e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was added to help errors be more understandable to end users, this.error(
Error while parsing applications and entities from the JDL ${error}.);
is not very helpful all the time, so can you retain these, please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do
generators/import-jdl/index.js
Outdated
} | ||
} | ||
}; | ||
} | ||
|
||
end() { | ||
if (!this.options['skip-install'] && !this.skipClient && !this.options['json-only']) { | ||
if (!this.options['skip-install'] && !this.skipClient && !this.options['json-only'] | ||
&& Object.keys(this.jdlObject.applications).length === 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can be !shouldGenerateApplications
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well spotted!
I generated several applications, including some pretty complex ones, everything looked perfect to me! |
@jdubois it is fixed, but as I've changed the code GH's diff didn't pick it up... |
@MathieuAA , sorry to remind you but it is missing update/add jdl files in project JDL samples... I just think it is impportant to have good jdl examples for testing. ;) |
You needn't be sorry, I completely forgot :)At least the doc's ready.Le 30 mars 2018 19:00, Daniel Franco <notifications@github.com> a écrit :@MathieuAA , sorry to remind you but it is missing update/add jdl files in project JDL samples...
—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or mute the thread.
|
Please make sure the below checklist is followed for Pull Requests.
Travis tests are green
Tests are added where necessary
Documentation is added/updated where necessary
Coding Rules & Commit Guidelines as per our CONTRIBUTING.md document are followed
Notice the subtle bump from v1.4.6 to v2.0.1 ;)