Skip to content
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

support adding language plugins as dependencies to build script #83

Open
amirmv2006 opened this issue Nov 15, 2020 · 4 comments
Open

support adding language plugins as dependencies to build script #83

amirmv2006 opened this issue Nov 15, 2020 · 4 comments

Comments

@amirmv2006
Copy link

amirmv2006 commented Nov 15, 2020

Hi, I have been trying to automate generating a model using a language I created myself, but it's more complicated than I thought! After some digging I found your useful plugin and now I think I'm very close. I have a couple of questions and a possibly suggested solution!

  • What is the best practice for using generate-models plugin? Is the downloaded MPS supposed to have all the required languages present already (maybe using an internal maven repo hosting the MPS generated from the languages)?

  • If we should use a "clean MPS", then should we use the pluginLocation and plugins to define list of plugins that contain the required languages?

  • If the latter is the way to go, why not define these language plugins through dependencies? (something like this maybe, example usage) if this is approved, I will clean up and create a proper pull request

@sergej-koscejev
Copy link
Member

Currently the plugin checks that the mps build configuration contains an artifact with coordinates com.jetbrains:mps so using a custom version of MPS won't work unless you publish it under group com.jetbrains and artifact ID mps. See code in your fork here. I think we could relax this requirement, but for now your only option is to use additional plugins via pluginLocation and plugins as you mentioned.

Yes, it could probably be made to work using the Gradle dependencies mechanism, the only problem I can think of is that MPS wants to know the ID of each plugin when loading it and the ID does not always correspond to its folder name.

@amirmv2006
Copy link
Author

amirmv2006 commented Nov 24, 2020

Thank you for your reply Sergej, initially I was using the folder name, but then I made some extra changes to actually parse the META-INF/plugin.xml file and extract plugin id from there.

@sergej-koscejev
Copy link
Member

Looks good but it's probably better to make it lazier, to improve startup time. Currently the initialization code will look into the files every time Gradle is run even if you end up not running the task, correct?

@amirmv2006
Copy link
Author

Good point, TBH I'm a bit new to gradle and you're probably right, so I'll look into that 👍. I'll also make some more adjustments to cleanup and get closer to a real-life solution 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants