-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Merge JCore inside the generator #11694
Conversation
Did it so that the DocumentParser was more modular. It has been further refactored.
To make the DocParser more modular. Refactored the DocParser in consequence.
To make the DocParser more modular
This is the preferred way of passing a parsed JDL content. Previously, it was the "document" attribute, but that was too vague a name. The document attribute is still accepted but will be removed in the future. Also refactored the doc accordingly
The options field of the JDL entity wasn't used anywhere
What I did: - Modified to way entities are converted in the DocParser by splitting the entity creation and the entity's fields setting. That gave me a better view of an "private access" issue: the DocParser doesn't have to know how the JDLEntity stores the fields. - Added a setField method to the JDLEntity (takes an iterable) to avoid open/close violations - Doing the two things enables me to write an EntityConverter, almost - Extracted the entity option setting from the loop! - To make creating an EntityConverter easier - By extracting it to another function, I could see a nested loop and a potential refactoring.
commit 002941f1108e5c3171d9745f775b553ae7b11e34 Author: Mathieu Abou-Aichi <mathieu.aa@protonmail.com> Date: Thu Dec 26 12:37:59 2019 +0100 Made option name & value attributes be the same For: annotations & relationship options Next step: figure out if options can be set to entities, fields, relationships, etc. without making a mess in the parsing system and JDL objects commit e9eed065acfbdd29506a016184635f9efc582af9 Author: Mathieu Abou-Aichi <mathieu.aa@protonmail.com> Date: Thu Dec 26 11:39:00 2019 +0100 Implemented the EntityConverter To make the DocParser more modular Also renamed and sorted functions for clarity commit aca9ac6e6ac57a8a38c6602ebdc26fec26fa2298 Author: Mathieu Abou-Aichi <mathieu.aa@protonmail.com> Date: Thu Dec 26 10:51:49 2019 +0100 Renamed function
Update Copywrite Headers for 2020
Update Copyright Headers for 2020
To replace the Abstract one and the 4 concrete ones The idea behind this new design: - only the config changes depending on the type - there's no shared field between the classes (so this isn't a good fit for inheritance) Refactored the project to create JDLApplications instead
…pp factory Replaced the previous JDL application classes by the single JDLApplication. The goal is to make changes easier to do, and reduce complexity as inheritance made changes delicate and in more than one file. Now, for each application type, a function exists to get the correct config as well as default configuration. Refactored the impacted files to make it work again. The correct way to create an application now is to: - either provide a full configuration to the JDLApplication - or use the JDL app factory and provide custom options Removed: - AbstractJDLApplication and its 4 concrete classes - Poor design choices as inheritance wasn't the best choice (see previous commit for more info)
Happens when importing a JDL file, but not when exporting because an written JDL file will be based on a "resolved" yo-rc file, which contains blueprints already prefixed).
Added chevrotain dep
Added other dependencies
Update from master
Update from master
Alright! as v7 is the next step, this PR is no longer a draft. |
I'd like to merge this, before going further in v7 |
Unless someone wants to review it first, yes |
As mentionned, no breaking changes here, as it's the merge of 2 projects |
I don't know if you can do that @pascalgrimaud but now that the merge is live, we should archive JCore |
@MathieuAA : I'd prefer to keep jhipster-core like this, and archive it once v7 is released. The reason is, in case we find a bug and we need to do new release of jhipster-core and new patch release of generator-jhipster |
What it does:
jdl
inside the repopackage.json
file to use the mocha config fileWhat it doesn't do:
Next steps: