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: allow putting bean enablement annotations on stereotypes #37302

Merged
merged 1 commit into from Nov 28, 2023

Conversation

Ladicek
Copy link
Contributor

@Ladicek Ladicek commented Nov 24, 2023

It would probably be best to write this algorithm in a lazy fashion (driven by the annotation transformation demands), but that would require breaking an extension API (specifically, it wouldn't be possible to produce BuildTimeConditionBuildItem). Hence, this commit enhances the eager algorithm for bean enablement scanning to also scan stereotypes, relying on subclass information in the Jandex index to support @Inherited stereotypes.

Fixes #37117

@quarkus-bot quarkus-bot bot added the area/arc Issue related to ARC (dependency injection) label Nov 24, 2023
@Ladicek
Copy link
Contributor Author

Ladicek commented Nov 24, 2023

I just realized I forgot to add something to the documentation. Will fix next week.

EDIT: done.

@quarkus-bot

This comment has been minimized.

@Ladicek Ladicek force-pushed the bean-enablement-on-stereotypes branch 2 times, most recently from 0a93546 to 7766662 Compare November 27, 2023 16:41
@quarkus-bot quarkus-bot bot added this to To do in Quarkus Documentation Nov 27, 2023
@Ladicek
Copy link
Contributor Author

Ladicek commented Nov 27, 2023

I removed the support for custom stereotypes from this PR, which likely isn't a big deal, and it avoids a build step cycle.

Copy link

github-actions bot commented Nov 27, 2023

🙈 The PR is closed and the preview is expired.

@quarkus-bot

This comment has been minimized.

Copy link
Contributor

@manovotn manovotn left a comment

Choose a reason for hiding this comment

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

Just one small comment, otherwise looks good.
Also, thumbs up for good test coverage!

Quarkus Documentation automation moved this from To do to Reviewer approved Nov 28, 2023
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 like the new usage of EquivalenceKey! And the tests are nice too ofc.

It would probably be best to write this algorithm in a lazy fashion
(driven by the annotation transformation demands), but that would
require breaking an extension API (specifically, it wouldn't be
possible to produce `BuildTimeConditionBuildItem`). Hence, this commit
enhances the eager algorithm for bean enablement scanning to also
scan stereotypes, relying on subclass information in the Jandex index
to support `@Inherited` stereotypes.
@Ladicek Ladicek force-pushed the bean-enablement-on-stereotypes branch from 7766662 to c197f41 Compare November 28, 2023 15:44
@Ladicek
Copy link
Contributor Author

Ladicek commented Nov 28, 2023

@mkouba comments addressed.

@mkouba mkouba added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Nov 28, 2023
@mkouba mkouba added this to the 3.7 - main milestone Nov 28, 2023
@quarkus-bot
Copy link

quarkus-bot bot commented Nov 28, 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.

@mkouba mkouba merged commit f0c48e1 into quarkusio:main Nov 28, 2023
54 checks passed
Quarkus Documentation automation moved this from Reviewer approved to Done Nov 28, 2023
@quarkus-bot quarkus-bot bot added kind/enhancement New feature or request and removed triage/waiting-for-ci Ready to merge when CI successfully finishes labels Nov 28, 2023
@Ladicek Ladicek deleted the bean-enablement-on-stereotypes branch November 29, 2023 08:29
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/documentation kind/enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

@IfBuildProfile cannot be used in a stereotype
3 participants