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

Add initializer method validation to ArC #23177

Merged
merged 1 commit into from
Jan 25, 2022

Conversation

Ladicek
Copy link
Contributor

@Ladicek Ladicek commented Jan 25, 2022

Fixes #23174

In addition to #23174, this PR also adds other validations the CDI specification prescribes for initializer methods (i.e., not just producers, but also disposers and observers).

@Ladicek Ladicek requested a review from mkouba January 25, 2022 13:08
@quarkus-bot quarkus-bot bot added the area/arc Issue related to ARC (dependency injection) label Jan 25, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Jan 25, 2022

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building b6e2896

Status Name Step Failures Logs Raw logs
Initial JDK 11 Build Build Failures Logs Raw logs

Failures

⚙️ Initial JDK 11 Build #

- Failing: independent-projects/arc/tests 

📦 independent-projects/arc/tests

Failed to execute goal net.revelc.code:impsort-maven-plugin:1.6.2:check (check-imports) on project arc-tests: Imports are not sorted in /home/runner/work/quarkus/quarkus/independent-projects/arc/tests/src/test/java/io/quarkus/arc/test/validation/InitializerMethodMarkedAsyncObserverTest.java

Copy link
Contributor

@mkouba mkouba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added one minor comment. Otherwise looks perfect. Thanks!

@Ladicek Ladicek force-pushed the arc-initializer-method-validation branch 2 times, most recently from 8794a9f to 67f250c Compare January 25, 2022 14:01
@Ladicek Ladicek force-pushed the arc-initializer-method-validation branch from 67f250c to 124a552 Compare January 25, 2022 14:06
@mkouba mkouba added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Jan 25, 2022
@mkouba mkouba added this to the 2.8 - main milestone Jan 25, 2022
@gsmet
Copy link
Member

gsmet commented Jan 25, 2022

I would like it to bake a bit before we consider backporting it.

@mkouba
Copy link
Contributor

mkouba commented Jan 25, 2022

I would like it to bake a bit before we consider backporting it.

What do you mean "bake a bit"? This PR merely adds some validations that are required by the spec (and are tested by the TCK). No one should ever use this combination of annotations. That said, I don't mind if we postpone backporting after 2.7.0.Final 😉

@mkouba mkouba merged commit 8c1dbd2 into quarkusio:main Jan 25, 2022
@quarkus-bot quarkus-bot bot removed the triage/waiting-for-ci Ready to merge when CI successfully finishes label Jan 25, 2022
@Ladicek Ladicek deleted the arc-initializer-method-validation branch January 26, 2022 08:13
@gsmet gsmet modified the milestones: 2.8 - main, 2.7.1.Final Jan 31, 2022
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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ArC doesn't fail on an initializer method marked @Produces
3 participants