Hello
I recently saw some of the work being done for the next major version and, being a CDI committer and Weld lead, I wanted to drop some comments as well.
Two notable things I saw in the PDF with highlights[1] are:
1) Injection into methods
- this is not possible with CDI 4 apart from places such as initializers, producers, observers etc..
- it'd be great if some of you could leave a feedback as to whether such API *and it's usage restrictions* meet your expectations; REST is one of the use cases that prompted this PR so getting feedback on whether it fits the needs is crucial
2) CDI requires non-private no-args constructor for proxying but Weld having a workaround
- This requirement is basically a JDK limitation allowing CDI to correctly instantiate a stateless client proxy
- I would strongly urge you not to rely on impls having a workaround; there is nothing in the spec allowing that, in fact an impl using such workaround by default would *not* pass CDI TCKs!
- Weld has that option but whether it will work in the future basically depends on whether JDK chooses to leave this backdoor open or not
- other impls may have other means (such as ArC in Quarkus which are more foolproof but only work due to build time approach) and yet another impl may have nothing for it
Bunch of other changes are looking pretty good and I am glad to see that REST is finally getting more CDI-friendly :)
By the way, if you have any CDI questions related to these changes, don't hesitate to reach out to the CDI mailing list[2]; I am sure some of us will be around to answer.
Best regards
Matej
__________________________________________________