-
Notifications
You must be signed in to change notification settings - Fork 628
Fixes: Enhance Kotlin Support for Suppliers, Functions, and Consumers #1277 #1278
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
base: main
Are you sure you want to change the base?
Fixes: Enhance Kotlin Support for Suppliers, Functions, and Consumers #1277 #1278
Conversation
b8e40f1
to
5224936
Compare
About the DCO task fail, I have update the email to [email protected]. |
It has to container your legal name - full legal name. |
5224936
to
8a8ef5a
Compare
Done, thanks |
@apoupard It doesn't build Basically when I try a full build here is what i see pretty much right away
am i missing something? |
Very strange What command are you using to do a full build? Can you try manually removing the ./spring-cloud-function-context/target directory? |
I’ve checked — most of the Kotlin utility functions I added can be implemented in Java, so I’ll migrate them. |
This commit introduces a comprehensive suite of tests to cover all possible declarations of Kotlin functions, consumers, and suppliers within the `spring-cloud-function-kotlin` module. The primary goal of these tests is to explore the various declaration combinations and identify potential areas for improvement and enhanced support in the framework. Signed-off-by: Adrien Poupard <[email protected]>
This commit refactors the `spring-cloud-function-context` to comprehensively handle all combinations of possible declarations for Kotlin functions, consumers, and suppliers. This improves the framework's ability to correctly interpret and manage different Kotlin functional styles. Signed-off-by: Adrien Poupard <[email protected]>
This commit adds new unit tests to verify the core logic for Kotlin arity handling and wrapper mechanisms. These tests cover various scenarios including catalogue registration and native type casting for consumers, functions, and suppliers. Signed-off-by: Adrien Poupard <[email protected]>
Signed-off-by: Adrien Poupard <[email protected]>
… Kotlin type handling and consistency. Signed-off-by: Adrien Poupard <[email protected]>
…ction validation Signed-off-by: Adrien Poupard <[email protected]>
11507f6
to
50b8929
Compare
@olegz I have moved most of the Kotlin utility methods into I also tried to resolve the DCO issue by running:
Then I force-pushed the changes using:
I verified that all commits now include the line:
However, the DCO check is still failing. Do you have any idea why this might be happening? |
Description:
This merge request aims to enhance and solidify Kotlin support within Spring Cloud Function. It addresses several identified issues related to the handling of various Kotlin features, including
suspend
functions,Flow
types, and different functional arities/signatures for Suppliers, Functions, and Consumers.Recent compatibility testing highlighted a number of scenarios where Kotlin function declarations were not being processed as expected, leading to runtime exceptions and test failures. This MR introduces fixes and improvements to the
spring-cloud-function-context
to better interpret and manage diverse Kotlin functional styles.Key Changes:
spring-cloud-function-context
has been refactored to more comprehensively handle various declaration combinations for Kotlin functions, consumers, and suppliers.spring-cloud-function-kotlin
module. These tests cover a wide range of Kotlin function, consumer, and supplier declarations to ensure their correct behavior and to help identify areas for further improvement.Summary of Addressed Issues from Testing:
The changes in this MR specifically target issues observed during testing, such as:
UnsupportedOperationException
andNullPointerException
related tosuspend
function handling.ClassCastException
when dealing withkotlinx.coroutines.flow.Flow
andorg.springframework.messaging.Message
types.DecodingException
for certain reactive types likeFlow
.By addressing these points, this MR significantly improves the robustness and usability of Spring Cloud Function for Kotlin developers, aiming to provide a more seamless and first-class experience.