Make it possible to mark beans as unremovable via MP config. #10007
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #9941
Since we already have
UnremovableBeanBuildItem
concept that builds customPredicate<BeanInfo>
exclusion formulas, I thought we could just add new config and register it in a similar way. The downside is that we cannot really reuseArcProcessor#initClassPredicates()
because that needs to producePredicate<ClassInfo>
.But maybe I am just missing a way to simplify that? I don't mind implementing it differently, this just seemed as the easiest way to me :-)
Also, do we need to mind producers and synthetic beans? Because in such case a package/class based expression in config won't do the trick. Or we would need to state that class based expression applies also to any declared producers inside that class. @loicmathieu @mkouba WDYT?