eclipse / gemoc-studio-execution-ale

Gemoc studio execution ale
0 stars 7 forks source link

Validation plug-in for the Ale meta-programming approach in GEMOC Studio #34

Closed Kairides closed 4 years ago

Kairides commented 4 years ago

To perform validation on a DSL written in Ale during its creation, we have created an extension point allowing other plug-ins, such as this validation plug-in, to add validation rules to the DslValidator.

The validation plug-in for the Ale meta-programming approach contributes to the extension point from the validation plug-in in the GEMOC Studio. To contribute to the extension point, the Ale validation plug-in has to implement the IRuleProvider from the GEMOC validation plug-in and get a name to be easily distinguishable from another validation plug-in and used as the value of the "metaprog" entry.

ale_metaprog

The plug-in implements the interface IRuleProvider through the class AleRuleProvider, a class AleRule implementing the interface IRule is used for validation in the dsl as well as the EcoreRule, provided by the GEMOC plug-in, are used in this RuleProvider since the meta-programming approach uses an Ecore model.

Ale_class_diagram(v2)

The validation plug-in performs various validations , such as checking for the presence of an "ale" entry in the dsl file ale_error checking for the presence of an "ecore" entry since the RuleProvider uses the EcoreRule ecore_error2 and checking for the presence of methods tagged "@main" and "@init" in the ale file.

Signed-off by Ronan Guéguen gueguen.ronan1@gmail.com

dvojtise commented 4 years ago

CI job for verification: https://ci.eclipse.org/gemoc/job/gemoc-studio-integration/job/Kairides-metaprog/

dvojtise commented 4 years ago

Apparently there is something wrong in the pom.xml declarations

[ERROR] The project org.eclipse.gemoc.ale.interpreted.engine:org.eclipse.gemoc.ale.language.metaprogramming:1.0.1-SNAPSHOT (/home/jenkins/agent/workspace/io-integration_Kairides-metaprog/gemoc-studio-execution-ale/plugins/org.eclipse.gemoc.ale.language.metaprogramming/pom.xml) has 1 error [ERROR] Non-resolvable parent POM for org.eclipse.gemoc.ale.interpreted.engine:org.eclipse.gemoc.ale.language.metaprogramming:1.0.1-SNAPSHOT: Could not find artifact org.eclipse.gemoc.ale.interpreted.engine:org.eclipse.gemoc.ale.language.metaprogramming:pom:1.0.1-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 7, column 12 -> [Help 2]

Kairides commented 4 years ago

Changed the artifactId, hope that will be enough.

Kairides commented 4 years ago

I realized I made a mistake when I changed the artifactId, it is now fixed so it should point to the correct parent: org.eclipse.gemoc.ale.interpreted.engine.plugins

dvojtise commented 4 years ago

Apparently there is still something wrong in the build/deployment of your plugin (https://ci.eclipse.org/gemoc/job/gemoc-studio-integration/job/Kairides-metaprog/8/console):

[ERROR] Software being installed: org.eclipse.gemoc.gemoc_studio.branding.feature.feature.group 3.2.0.qualifier [ERROR] Missing requirement: org.eclipse.gemoc.ale.interpreted.engine.feature.feature.group 1.0.1.qualifier requires 'org.eclipse.equinox.p2.iu; org.eclipse.gemoc.ale.language.metaprogramming 0.0.0' but it could not be found

To help you fix it, you can try to compile the studio locally following the instructions here : https://github.com/eclipse/gemoc-studio/tree/master/dev_support/full_compilation (which launch this script: https://github.com/eclipse/gemoc-studio/blob/master/dev_support/full_compilation/docker/scripts/build_gemoc.sh )

I recommend ignoring system tests since they are quite long. And focus on making sure that the studio builds correctly. (in the following command, it builds only the linux package using the -P test_linux profile)

mvn -P test_linux --projects !../../gemoc_studio/tests/org.eclipse.gemoc.studio.tests.system.lwb,!../../gemoc_studio/tests/org.eclipse.gemoc.studio.tests.system.mwb  clean install --errors  --show-version;

Additionally, once you have completed one full build, the -o (offline) option will help you save some more precious seconds/minutes.

Kairides commented 4 years ago

I have corrected the plugin's ID but I have a hard time running builds. I hope that will be enough but at this point I don't know what to do.

ebousse commented 4 years ago

We got a successful build in the CI.

Kairides commented 4 years ago

I changed the severity for the check on the @init tag but sadly I messed up the commit's signature.