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 fixes for spec compatibility, round 8 #33051

Merged
merged 6 commits into from
May 15, 2023
Merged

Conversation

Ladicek
Copy link
Contributor

@Ladicek Ladicek commented May 2, 2023

Related to #28558

  • add a context object for the @Dependent pseudo-scope
  • disable interceptors/decorators without @Priority in strict mode
    • in the default mode, they have an implicit priority of 0, so they are never disabled
  • fix order of BeanManager.resolveInterceptors() and resolveDecorators()
    • this has a few more fixes for decorators that probably deserve extra attention, see the commit message
  • treat interceptor bindings at runtime properly
    • this includes actually transferring the full set of interceptor bindings to runtime
  • validate managed beans whose declaring class is generic
    • they must be @Dependent
  • add links to TCK challenges to some test exclusions

@Ladicek Ladicek added the area/arc Issue related to ARC (dependency injection) label May 2, 2023
@Ladicek Ladicek requested review from mkouba and manovotn May 2, 2023 12:34
@quarkus-bot

This comment has been minimized.

@quarkus-bot

This comment has been minimized.

@mkouba mkouba added the triage/waiting-for-ci Ready to merge when CI successfully finishes label May 11, 2023
@quarkus-bot

This comment has been minimized.

Ladicek added 6 commits May 15, 2023 12:36
…tors()

Additionally, if a delegate injection point has no qualifiers,
ArC doesn't generate an implementation of `getDelegateQualifiers()`,
which means that the generated class implementing `Decorator` cannot
be loaded. This commit adds a `default` implementation of that method
to `InjectableDecorator`, returning the set of "implicit" qualifiers
(`@Any` and `@Default`), just like `InjectableBean.getQualifiers()`.

Finally, this commit allows finding a decorator instance by `String` ID
(using `ArcContainer.bean(String)`), just like beans and interceptors.
First and foremost, this entails transferring the full set of bindings
from build time to runtime (through `ComponentsProvider`). This means
that custom interceptor bindings (not annotated `@InterceptorBinding`)
are known at runtime.

This commit uses that runtime information to make the `BeanManager`
behave as specified: the `isInterceptorBinding()` method works properly,
and the `resolveInterceptors()` method does proper input validation.
They must be `@Dependent` per the specification. We already have similar
validation for producers, this commit adds it for managed beans.
@quarkus-bot
Copy link

quarkus-bot bot commented May 15, 2023

✔️ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

@manovotn manovotn merged commit 65bd73a into quarkusio:main May 15, 2023
@quarkus-bot quarkus-bot bot removed the triage/waiting-for-ci Ready to merge when CI successfully finishes label May 15, 2023
@quarkus-bot quarkus-bot bot added this to the 3.1 - main milestone May 15, 2023
@Ladicek Ladicek deleted the arc-fixes branch May 16, 2023 06:42
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) area/rest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants