Open elgabbouch opened 9 months ago
/cc @evanchooly (kotlin), @geoand (kotlin)
cc @mkouba
With @Ladicek's improvement that brings the ability to do transformations, the no-args constructor transformation is probably one we want incluided
@elgabbouch we'll need to know the Quarkus version you are using
@geoand is right that QuarkusComponentTest
does not support bytecode transformations yet and thus simplified constructor injection does not work. Simplified constructor injection is a Quarkus-specific feature to relax a requirement from the CDI spec where every normal scoped bean must declare a no-args constructor.
However, the same applies to Java - there's no difference. If you modify Foo
so that a field injection point is used then it should just work.
The PR to allow bytecode transformations in @QuarkusComponentTest
(#35473) wasn't merged and likely won't in its current form because it's super intrusive. I think we're in a waiting mode, to see if @holly-cummins can escape the classloader hell in @QuarkusTest
and if we can use some of her tricks.
Ah okay, thanks for the update
@geoand I tested it with version 3.3.2 and 3.3.3
I'm using the version 3.10.0 and it is still not working
I'm using the version 3.10.0 and it is still not working
Yes, that's why this issue is still open :shrug:. We don't have an estimate when this will be fixed and AFAIK nobody is working on it right now.
Describe the bug
I re-wrote the same example in the documentation: https://quarkus.io/blog/quarkus-component-test/ using kotlin
Expected behavior
should work as in java
Actual behavior
How to Reproduce?
Output of
uname -a
orver
No response
Output of
java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
3.3.3 and 3.3.2
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response