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

ArC - improve the way a wildcard in a producer return/field type is detected #29836

Closed
mkouba opened this issue Dec 13, 2022 · 2 comments · Fixed by #29883
Closed

ArC - improve the way a wildcard in a producer return/field type is detected #29836

mkouba opened this issue Dec 13, 2022 · 2 comments · Fixed by #29883
Assignees
Labels
area/arc Issue related to ARC (dependency injection) kind/bug Something isn't working
Milestone

Comments

@mkouba
Copy link
Contributor

mkouba commented Dec 13, 2022

Describe the bug

It seems that we don't search through the "nested" parameterized types.

Note that wildcards are not legal in a a producer return/field type. See also https://jakarta.ee/specifications/cdi/2.0/cdi-spec-2.0.html#producer_field.

This is a follow-up of #4756.

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

Replace the return type of io.quarkus.arc.processor.TypesTest.Producer.produce(); List<? extends Number> -> List<Set<? extends Number>>

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@mkouba mkouba added the kind/bug Something isn't working label Dec 13, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Dec 13, 2022

/cc @manovotn

@quarkus-bot quarkus-bot bot added the area/arc Issue related to ARC (dependency injection) label Dec 13, 2022
@gonciarz
Copy link
Contributor

Guys, I believe that you forgot to mention about problem with Kotlin's suspend functions as Quarkus supports Kotlin.
#29789

CDI 2.0 says about producer's definition, so I guess we should focus on a class / function definition.
The question is can we can create a smart analyzer that could detect that we deal with 
Kotlin's suspend function and we can exclude Continuation. 
It depends on a context that calls it and in theory you may inject producer to different contexts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/arc Issue related to ARC (dependency injection) kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants