-
Notifications
You must be signed in to change notification settings - Fork 28
Feature: Make intentions customizable through an extension point #1543
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
Feature: Make intentions customizable through an extension point #1543
Conversation
225ec6e to
e69e474
Compare
|
TBH, I do not see the need for this big cross-cutting change. Is there a ticket with a real motivation why this is necessary? The mentioned ticket #1378 is just a request to disable a handful of intentions, and I am sure this could be done by setting some property programmatically, or implementing some local/specific logic (similar to a feature flag) in the intentions which should be disabled. The changes in this PR affect all intentions in the repository. There is a lot of boilerplate code in every intention, and the maintainability is poor. Moreover, how could it be ensured that new intentions will boilerplated same as the old ones? @alexanderpann @AtanasM98 Pls. comment. |
|
The mentioned ticket was just an additional ticket that was fixed as a result. The idea is to make KernelF more customizable through customizing of the editor (#1522), customizing intentions (this PR, e.g. translating descriptions to a different language or disabling intentions) and customizing aliases (MPS-Extensions, again translating/changing terms). Those requirements come up every so often in customer projects. We are talking about 3 lines of code per intention. I'll have a discussion about the aliases with @wsafonov and @sergej-koscejev anyway. If people are unhappy with the changes after dicussion, I revert them. |
|
Thanks for your offer to revert the PR, I would highly appreciate that.
I would not close the ticket #1378 as of now, as long as the discussion is ongoing. As the requester uses MPS 2022.x, the changes in mps20251 won't help anyway. I sketched an approach in that ticket, maybe this is feasible (and without changes to IETS3 at all).
Customers may talk about such customizations, but I would strongly suggest to "translate" their wishes into sustainable tickets in the specific platform every time. This process of writing a platform ticket capturing and generalizing the customer's requests is sometimes tedious, but nevertheless necessary to document the requirements (at least the motivation) and how the platform design is planned to be changed to reflect this. In some cases it is also okay to implement something without direct customer requirements (e.g. infrastructure changes, prototypical new features, ...). But here IMO it is again good practice to create tickets describing the motivation of the change (except for very technical changes like cascading merges and dependency updates).
Actually, for each of about 250 intentions four concept functions have been wrapped with boilerplate code, and where the concept function was not needed before, a wrapped default implementation had to be added (as is often the case for "child filter"). My point is: We are using the MPS generative approach and DSLs to avoid boilerplate code on any level, so it is quite counter-intuitive to spread >1000 lines of such code in our own platform. If there is a requirement for this kind of customization, it should be defined crisply in a ticket, and we should then think hard to implement a solution which applies the generative approach so that minimal or (even better) no changes to the intentions code are necessary at all.
I don't know the other two requests, but I am very much in favour of reverting this one. |
In this case, the idea for the ticket came from me. I will still create a ticket next time. I recognized that I just made the chance at the wrong place. There is a solution in MPS-extensions that I overlooked (we are already customizing extensions there), that's why I came up with this approach. Still, you are right. Every time we have this repetitive code, it is a good indicator that there might be a better solution. |
Example usage: