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

Enable more config providers for code generators except those found in the root app module #28538

Merged
merged 1 commit into from
Oct 13, 2022

Conversation

aloubyansky
Copy link
Member

Currently the config passed to the code generators is missing a lot of config sources compared to the original config built for the application. This change enables most of them except config providers found in the root application module because those haven't been compiled yet when running in dev mode.
This change also makes sure the Config instance is created once for all the providers and source paths, instead of number of providers * number of source paths.

Fixes quarkiverse/quarkus-openapi-generator#131

@quarkus-bot quarkus-bot bot added area/core area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins labels Oct 12, 2022
@@ -169,6 +171,47 @@ public static boolean trigger(ClassLoader deploymentClassLoader,
});
}

public static Config getConfig(ApplicationModel appModel, LaunchMode launchMode, Properties buildSystemProps,
QuarkusClassLoader deploymentClassLoader) throws CodeGenException {
// Config instance that is returned by this method should be as close to the one built in the ExtensionLoader as possible
Copy link
Member Author

Choose a reason for hiding this comment

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

@radcortez I tried to keep it as close to the ExtensionLoader one as I could

Copy link
Member

Choose a reason for hiding this comment

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

Sounds good!

@aloubyansky aloubyansky changed the title Enable more config sources for code generators except those found in the root app module Enable more config providers for code generators except those found in the root app module Oct 12, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Oct 12, 2022

Failing Jobs - Building 902e8e9

Status Name Step Failures Logs Raw logs
✔️ JVM Tests - JDK 11
✔️ JVM Tests - JDK 17
JVM Tests - JDK 17 MacOS M1 Set up runner ⚠️ Check → Logs Raw logs
✔️ JVM Tests - JDK 18
Native Tests - Spring Build ⚠️ Check → Logs Raw logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/gradle Gradle area/maven
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Yaml configuration not honored.
3 participants