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

CDI Lite compliance (CDI 4.0) #28558

Closed
Ladicek opened this issue Oct 13, 2022 · 6 comments · Fixed by #33638
Closed

CDI Lite compliance (CDI 4.0) #28558

Ladicek opened this issue Oct 13, 2022 · 6 comments · Fixed by #33638
Labels
area/arc Issue related to ARC (dependency injection) kind/enhancement New feature or request

Comments

@Ladicek
Copy link
Contributor

Ladicek commented Oct 13, 2022

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.

List of related PRs

@Ladicek Ladicek added kind/enhancement New feature or request area/arc Issue related to ARC (dependency injection) labels Oct 13, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Oct 13, 2022

/cc @manovotn, @mkouba

@Ladicek
Copy link
Contributor Author

Ladicek commented Nov 3, 2022

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.

@manovotn
Copy link
Contributor

manovotn commented Nov 3, 2022

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

@mkouba
Copy link
Contributor

mkouba commented Apr 17, 2023

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

@manovotn
Copy link
Contributor

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.

@Ladicek
Copy link
Contributor Author

Ladicek commented May 29, 2023

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/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants