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

Extend CurateOutcomeBuildItem's AppModel to list all present extensions #19497

Closed
knutwannheden opened this issue Aug 19, 2021 · 7 comments · Fixed by #20070
Closed

Extend CurateOutcomeBuildItem's AppModel to list all present extensions #19497

knutwannheden opened this issue Aug 19, 2021 · 7 comments · Fixed by #20070
Assignees
Labels
kind/enhancement New feature or request
Milestone

Comments

@knutwannheden
Copy link
Contributor

Description

I would like to implement an extension which verifies the setup of an application. One part of this verification is to make sure that certain extensions are present or not present. Currently there is no such mechanism offered by Quarkus. There are build items to access the list of capabilities and features, but not for extensions.

Implementation ideas

I propose to add a multi build item for the list of extensions present in the build. This build item would somehow be provided by Quarkus and extensions would not be expected to explicitly produce corresponding build items, only consume it.

@knutwannheden knutwannheden added the kind/enhancement New feature or request label Aug 19, 2021
@aloubyansky
Copy link
Member

I would suggest adding this information to the AppModel instead provided by the CurateOutcomeBuildItem.

@knutwannheden
Copy link
Contributor Author

I would suggest adding this information to the AppModel instead provided by the CurateOutcomeBuildItem.

That sounds like a good idea. That way there is no confusion regarding a "read-only" build item.

@knutwannheden knutwannheden changed the title New build item listing all present extensions Extend CurateOutcomeBuildItem's AppModel to list all present extensions Aug 19, 2021
@gsmet
Copy link
Member

gsmet commented Aug 19, 2021

~~ sorry about the noise ~~

@knutwannheden
Copy link
Contributor Author

@aloubyansky Can you provide me with some hints on how to implement this? I've tried to understand the code and my guess would have been that I need to extend BootstrapAppModelResolver#doResolveModel() to collect all the extensions using the DeploymentInjectingDependencyVisitor and then pass them to the AppModel.Builder. To achieve this I would probably have extended DeploymentInjectingDependencyVisitor#visitExtensionDependency() to also collect all extDep.info.runtimeArtifact elements.

@aloubyansky
Copy link
Member

Pretty much. The DeploymentInjectingDependencyVisitor can add the extension dependencies to the AppModel.Builder directly.

@knutwannheden
Copy link
Contributor Author

Thanks. I will set up my local Quarkus workspace and try to work on this.

@aloubyansky
Copy link
Member

There is also the Gradle side of it, which should be added to the QuarkusModelBuilder. FYI @glefloch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants