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

Adding the ability to bypass reconciliation and compilation phases. #24

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tomb50
Copy link

@tomb50 tomb50 commented Jun 21, 2024

As far as I can see the reconciliation phase doesn't really offer anything in the use case of execute-generators in a headless environment. Please correct me if this is wrong.

I have a use case where my generation phase takes 60 seconds, the reconciliation is ALSO taking 70+ seconds, so I'd very much like the ability to opt-out of that stage. This wasn't an issue for me when using the old Ant GenerateTask as that just did pure Generation, no mention of reconciliation.

Similarly, I've added the ability to opt-out of Java compilation since my source_gen is compiled externally. I know that it can be defined at the Solution level whether or not compilation is needed, but I think it is nicer to be able to have the model compiled if made from the IDE, but not compiled if Made through CLI.

@sergej-koscejev
Copy link
Member

sergej-koscejev commented Jun 29, 2024

Thank you for your investigation and your PR.

I would like to understand why GenerateTask is not performing reconciliation. I don't see anything in its code in MPS skipping reconciliation explicitly. Perhaps we should also always skip it?

I am a bit on the fence about skipping compilation because it seems very specific to your use case.

However, since a generic mechanism to configure make/generation properties externally is missing from MPS, I will consider merging this as well. I have also created MPS-37484 to request the generic mechanism from JetBrains... eventually.

In any case, before this PR can be merged (with or without skipping compilation), several things will need to be done:

  • MPS uses the term "skip" rather than "bypass" for similar functionality, I'd prefer "skip" for consistency in the backends as well, so --skip-reconciliation and --skip-compilation).
  • This is a new feature so minor version has to be bumped.
  • An entry in CHANGELOG.md is needed.
  • Documentation in execute-generators/README.md must be updated (to generate the usage page you can run the backend e.g. in IDEA with --help option).

@tomb50
Copy link
Author

tomb50 commented Jul 1, 2024

Hi Sergej,

Thanks for the comments - I think I made a mistake, the Ant GenerateTask DOES do reconciliation, as you mentioned. - I got confused when reading through Tasks vs Facets (the ReduceMakeFacet).

I will update the PR as needed above, though as it seems like this may be becoming a more specific change I'm also happy to use a local fork for now whilst we wait for generic mechanism for the other configurable options.

@tomb50 tomb50 force-pushed the feature/bypass-recon_and_compile branch from c0c5bff to 6b95fbe Compare July 2, 2024 09:16
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 this pull request may close these issues.

2 participants