Skip to content

Conversation

SIMULATAN
Copy link

@SIMULATAN SIMULATAN commented Sep 5, 2025

Note: finding a commit message for this change is quite difficult, the current one is likely to cause confusion. I'd appreciate better suggestions

Originally introduced as Beta in 2.2.0, Context Parameters are a new Kotlin feature that I wanted to use in my project.
Those parameters have a different KParameter.Kind (CONTEXT) and are therefore not supported by the current CoroutinesUtils implementation. This resulted in the following error message:

java.lang.IllegalArgumentException: No argument provided for a required parameter: context parameter tenant of context(tenant: com.application.TenantContext)

Status

kotlin-reflect's Context Parameters support was first released in 2.2.20-Beta1. Therefore, I had to target the latest 2.2.20 RC with this PR.
Once 2.2.20 is formally released, I'll await the update on Spring's main branch, rebase onto it, and set the PR as ready to merge.
With 86fb62c, main is using the latest Kotlin release. I've done the rebase and marked the PR as ready to review. Thanks in advance for your considerations!

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Sep 5, 2025
@sdeleuze sdeleuze self-assigned this Sep 5, 2025
@sdeleuze sdeleuze added the theme: kotlin An issue related to Kotlin support label Sep 5, 2025
Signed-off-by: SIMULATAN <jakob@simulatan.me>
@SIMULATAN SIMULATAN force-pushed the fix/coroutinesutils-context-parameters branch from d5a1da2 to 99fa9dd Compare September 10, 2025 13:14
@SIMULATAN SIMULATAN marked this pull request as ready for review September 10, 2025 13:14
@sdeleuze
Copy link
Contributor

Could you please add related test(s)?

@sdeleuze sdeleuze added the status: waiting-for-feedback We need additional information before we can continue label Sep 11, 2025
Signed-off-by: SIMULATAN <jakob@simulatan.me>
@SIMULATAN SIMULATAN force-pushed the fix/coroutinesutils-context-parameters branch from 11ed8e7 to e69b67b Compare September 17, 2025 15:37
@SIMULATAN
Copy link
Author

Added tests in a fixup commit, analogous to the existing Kotlin Extension Function tests. Had to force-push once as I messed up the GPG signing on my work device.

Let me know in case any further modifications are wanted.

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Sep 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: feedback-provided Feedback has been provided status: waiting-for-triage An issue we've not yet triaged or decided on theme: kotlin An issue related to Kotlin support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants