-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Support extension registry when adding or listing extensions in plugins #10062
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No tests?
I know it's a still draft :-)
devtools/gradle/src/main/java/io/quarkus/gradle/tasks/QuarkusAddExtension.java
Outdated
Show resolved
Hide resolved
devtools/gradle/src/main/java/io/quarkus/gradle/tasks/QuarkusListExtensions.java
Outdated
Show resolved
Hide resolved
devtools/maven/src/main/java/io/quarkus/maven/AddExtensionMojo.java
Outdated
Show resolved
Hide resolved
devtools/maven/src/main/java/io/quarkus/maven/ListExtensionsMojo.java
Outdated
Show resolved
Hide resolved
...-common/src/main/java/io/quarkus/devtools/commands/handlers/CreateProjectCommandHandler.java
Outdated
Show resolved
Hide resolved
devtools/gradle/src/main/java/io/quarkus/gradle/tasks/QuarkusAddExtension.java
Outdated
Show resolved
Hide resolved
I'm trying it out now using https://github.com/maxandersen/registrytest but I'm getting what am I missing ? |
...common/src/main/java/io/quarkus/devtools/commands/handlers/ListExtensionsCommandHandler.java
Outdated
Show resolved
Hide resolved
...common/src/main/java/io/quarkus/devtools/commands/handlers/ListExtensionsCommandHandler.java
Outdated
Show resolved
Hide resolved
For some reason the platform used in your project is detected as 1.5.2.Final, that's why it doesn't show anything. I'm investigating why that is happening |
devtools/gradle/src/main/java/io/quarkus/gradle/tasks/QuarkusListExtensions.java
Outdated
Show resolved
Hide resolved
I don't see anything wrong here. I understand it's a work in progress. |
devtools/maven/src/main/java/io/quarkus/maven/QuarkusProjectMojoBase.java
Outdated
Show resolved
Hide resolved
well goal was to have it in 1.6 behind a feature flag |
could we cut back on that massive registry.json ? dont think we need that big a file to test ;) |
suggestions from call 2020-07-02 👍
|
"No extension found with pattern '%s' while searching in the configured extension registries (using Quarkus Core %s).\n" | ||
+ "Falling back to existing platform extensions", | ||
search, quarkusVersion); | ||
platformExtensions = searchExtensions(invocation, search); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is happening here? What is this fallback about?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we having two sources of extensions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is happening here? What is this fallback about?
Why are we having two sources of extensions?
The fallback happens to make sure that the search is also performed in the platform BOM that is associated to the project. This will likely happen if the specified registry does not list the Quarkus core version used in the project
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fact that they aren't unified is strange to me. Perhaps I'm misunderstood the use-case.
...dent-projects/tools/registry-descriptor/src/main/java/io/quarkus/registry/model/Release.java
Outdated
Show resolved
Hide resolved
...istry-descriptor/src/test/java/io/quarkus/registry/builder/ExtensionRegistryBuilderTest.java
Outdated
Show resolved
Hide resolved
While trying to unify the |
Looks like I managed to sort out the ExtensionManager bugs and also handled the special Extension query cases |
...s/devtools-common/src/main/java/io/quarkus/devtools/project/extensions/ExtensionManager.java
Outdated
Show resolved
Hide resolved
final DependencyManagement managed = project.getModel().getDependencyManagement(); | ||
return managed != null ? managed.getDependencies() | ||
: Collections.emptyList(); | ||
private List<Dependency> getManagedDependencies(MavenArtifactResolver resolver) throws IOException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI @ia3andy this is going to help collect platform BOMs from the parents.
devtools/maven/src/main/java/io/quarkus/maven/QuarkusProjectMojoBase.java
Outdated
Show resolved
Hide resolved
Support ExtensionRegistry in AddExtensions Support multiple registries Introduced registry-descriptor and API Introduced ExtensionPredicate Add Extensions now use ExtensionRegistry.lookup Fixes #9593
This PR introduces support for querying the extension registry compiled from https://github.com/quarkusio/quarkus-extension-catalog.
It will fallback to the original behavior if the registry URL is not specified.
To test:
Make sure to change the Quarkus BOM dependency in the project to a released version which is also present in the registry(eg. 1.5.1.Final)
Maven
Gradle
Fixes #9593