Java Generation: Generate classes for concrete function parameters #2783
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
M2M execution relies on source fetch tree computation to generate the list of Pure classes to generate Java code for.
However, if a function is passed an empty argument then there is no property access and hence nothing is present in the source tree informing the platform that Java code should be generated for the corresponding parameter type. As a result the compilation of Java code present in the execution plan fails due to missing classes.
This change fixes that by processing the parameters and generating code for parameter types that are not part of the Java standard library or engine conventions library. If we happen to have already generated code for the parameter type earlier in the plan generation (e.g the class is mentioned in the source fetch tree) then the Java generation merging code will handle duplicates that may be generated by this changeset.