Skip to content

Feat/kotlin all arities#1269

Closed
apoupard wants to merge 7 commits intospring-cloud:mainfrom
komune-io:feat/kotlin-all-arities
Closed

Feat/kotlin all arities#1269
apoupard wants to merge 7 commits intospring-cloud:mainfrom
komune-io:feat/kotlin-all-arities

Conversation

@apoupard
Copy link

No description provided.

Adrien added 7 commits April 19, 2025 14:42
…on implementations and tests

The FunctionExamples class provides a comprehensive set of function implementations demonstrating different arities, including synchronous and reactive types. This addition enhances the functionality of the Spring Cloud Function samples, allowing users to see practical examples of how to work with functions in a reactive programming context. Corresponding tests ensure the correctness of each function's behavior.
…ling for coroutine and flux types, allowing for more flexible function definitions. The validation logic is refactored into a new utility class for better organization and maintainability. Comprehensive tests are added to ensure the correctness of the new features and existing functionality. Additionally, dependencies are updated to the latest version to leverage improvements and bug fixes.
The changes improve the Kotlin function support by adding better handling for coroutine and flux types, allowing for more flexible function definitions. The validation logic is refactored into a new utility class for better organization and maintainability. Comprehensive tests are added to ensure the correctness of the new features and existing functionality. Additionally, dependencies are updated to the latest version to leverage improvements and bug fixes.
… code readability

The refactor introduces a new helper function, `executeInCoroutineAndConvertToFlux`, to streamline the invocation of suspending functions and reduce code duplication. It also enhances the `asFlux` function to handle various types more effectively, improving the overall clarity and maintainability of the code. This change aims to make the coroutine handling more consistent and easier to understand.
…redundant checks for suspending functions

The changes streamline the invocation logic in the Kotlin wrappers by removing unnecessary checks for suspending functions. This improves code readability and maintainability while ensuring that the correct functions are invoked based on the type of the target lambda. The removed checks were redundant since the invocation logic already handles the necessary conditions.
… Kotlin wrappers

The changes replace the usage of CoroutinesUtils with the newly created TypeUtils for handling type-related operations in Kotlin function wrappers. This refactor improves code organization and encapsulates type utility functions in a dedicated class, enhancing maintainability and readability. Additionally, it removes unnecessary code from CoroutinesUtils, streamlining the overall codebase.
…n types to enhance Kotlin support

refactor(wrapper): remove deprecated KotlinFunctionSuspendWrapper and update related classes
The commit introduces new Kotlin function wrappers to support various function types, including plain and suspend functions. It also removes the deprecated KotlinFunctionSuspendWrapper class, streamlining the codebase and improving maintainability. The changes enhance the overall Kotlin support in the Spring Cloud Function framework, allowing for better integration with Kotlin's coroutine features.
@apoupard apoupard closed this Apr 21, 2025
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.

1 participant