quarkus icon indicating copy to clipboard operation
quarkus copied to clipboard

CDI Lite compliance (CDI 4.0)

Open Ladicek opened this issue 3 years ago • 1 comments

Description

I intend to eventually make ArC fully compliant with the CDI Lite part of CDI 4.0. This entails:

  • implementing Build Compatible Extensions in ArC
  • implementing an Arquillian adapter for ArC
  • adding a CDI TCK runner module to ArC
  • most likely adding a special mode (off by default) that enables strict spec compliance
  • fixing the issues found by the TCK

This issue is a tracker for all that. Work will start on this when Quarkus mainline switches to Jakarta EE 10 dependencies and ArC specifically switches to CDI 4.0.

Implementation ideas

I actually have quite a lot of that already implemented on a non-public branch (that I've been rebasing for more than 2 years actually). Specifically:

  • Arquillian adapter is implemented (could be submitted now, but would cause too much churn), together with a simple CDI Lite TCK runner module
  • Build Compatible Extensions are implemented and pass all the relevant CDI TCK tests

What I didn't focus on yet is passing the full CDI Lite TCK. As is, ArC passes roughly 1/2 of the CDI Lite TCK, so there's quite some work to do. I expect that some tests in the CDI Lite TCK are always going to fail due to some improvements we made in ArC and are not willing to give up -- for that reason, I expect we'll have to add a switch for enabling strict spec compliance at the cost of foregoing the improvements. That switch will be off by default, but we'll turn it on to pass the TCK. Users will also be able to turn it on if they so desire.

Ladicek avatar Oct 13 '22 07:10 Ladicek

/cc @manovotn, @mkouba

quarkus-bot[bot] avatar Oct 13 '22 07:10 quarkus-bot[bot]

I have cleaned up my local branch, rebased on current Quarkus main and published it here: https://github.com/Ladicek/quarkus-jakarta-arc This repository only includes ArC, which is where the vast majority of changes are. This makes it much easier to experiment with. There's a tiny amount of changes required in Quarkus (core and the ArC extension) that are not published in that repository (something like 10 or 20 lines of code), which I don't think is a big deal.

Ladicek avatar Nov 03 '22 15:11 Ladicek

FYI @n1hility, this issue nicely captures what we've been talking about

manovotn avatar Nov 03 '22 15:11 manovotn

@Ladicek @manovotn What's the current compliance status?

mkouba avatar Apr 17 '23 12:04 mkouba

Right now there are roughly 48 failing test classes to sort through. An estimate of what we need to work on is:

  • interceptor TCKs (those went pretty much untouched so far)
  • proper implementation of dependent context which the TCK expects
  • tests around circular bean dependencies
  • missing impl of Bean.getInjectionPoints() in Arc

Otherwise, rest of the TCKs are executed with each PR. The current list of exlusions can be seen directly in the code.

manovotn avatar Apr 17 '23 12:04 manovotn

I filed a few issues that we can consider post-CDI 4.0 tasks:

  • #33664
  • #33665
  • #33666
  • #33668

Ladicek avatar May 29 '23 07:05 Ladicek