-
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
Reimplement the extension annotation processor #42141
Commits on Aug 7, 2024
-
Reimplement the extension annotation processor
The idea is the following: - we collect the config properties and dump them into a file that is local to the module - this will help with Develocity caching and a lot of other issues. - ideally the descriptor will be also consumable by IDEs - when generating the documentation, we will gather all the descriptors in the tree and transform them to Asciidoc files. For now, we keep the old way of doing things around for compatibility.
Configuration menu - View commit details
-
Copy full SHA for 96b0d3d - Browse repository at this point
Copy the full SHA 96b0d3dView commit details -
Simplify OptionalInt/... types
This is a small change of behavior compared to current, per discussion with Yoann.
Configuration menu - View commit details
-
Copy full SHA for 1998f19 - Browse repository at this point
Copy the full SHA 1998f19View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2f0b8d4 - Browse repository at this point
Copy the full SHA 2f0b8d4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 124a3ea - Browse repository at this point
Copy the full SHA 124a3eaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 98245a8 - Browse repository at this point
Copy the full SHA 98245a8View commit details -
Only run the annotation processor for the default execution
We don't need the annotation processor when compiling the tests.
Configuration menu - View commit details
-
Copy full SHA for 50b35a1 - Browse repository at this point
Copy the full SHA 50b35a1View commit details -
Configuration menu - View commit details
-
Copy full SHA for e54a4ea - Browse repository at this point
Copy the full SHA e54a4eaView commit details -
Make config annotations kept at runtime
This should allow us to resolve fully the doc model even if we depend on classes or config groups that are outside of the scope of the module. The cost should be negligible and it should simplify things a lot. All the @ConfigMapping-related annotations in SmallRye Config already have a runtime retention so it makes sense to be consitent. Note that we will still need to centralize the Javadoc as obviously the Javadoc is source only.
Configuration menu - View commit details
-
Copy full SHA for 543fb56 - Browse repository at this point
Copy the full SHA 543fb56View commit details -
Work around Quarkus Core and Quarkus Messaging mixing two approaches
Both use traditional config roots AND config mappings at the same time, which won't be supported in the future. For now, we try to be lenient as it's going to be a long and bumpy road to fix it.
Configuration menu - View commit details
-
Copy full SHA for b015c1d - Browse repository at this point
Copy the full SHA b015c1dView commit details -
Now that we keep all the config annotations at runtime, we can fully resolve the model from the classpath. What's missing is the Javadoc but we will collect it in a separate file and when generating documentation, we will get the associated Javadoc from that file.
Configuration menu - View commit details
-
Copy full SHA for 5c1f94d - Browse repository at this point
Copy the full SHA 5c1f94dView commit details -
Write javadoc elements as JSON in a new file
We need more structure than a simple properties. We keep the .properties for now for compatibility but hopefully we will be able to drop it in the future.
Configuration menu - View commit details
-
Copy full SHA for 5fe5b1c - Browse repository at this point
Copy the full SHA 5fe5b1cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3d68d93 - Browse repository at this point
Copy the full SHA 3d68d93View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6d240d3 - Browse repository at this point
Copy the full SHA 6d240d3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 96ae31e - Browse repository at this point
Copy the full SHA 96ae31eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 24076fa - Browse repository at this point
Copy the full SHA 24076faView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1592efd - Browse repository at this point
Copy the full SHA 1592efdView commit details -
Improve named maps config doc for various modules
Noticed thanks to the bug I just fixed.
Configuration menu - View commit details
-
Copy full SHA for e9adc0b - Browse repository at this point
Copy the full SHA e9adc0bView commit details -
Do not ignore fields that are not annotated with @configitem
Personnaly, I would rather ignore them but that's not the current behavior. See OpenShiftConfig for a good example of it.
Configuration menu - View commit details
-
Copy full SHA for b5b998f - Browse repository at this point
Copy the full SHA b5b998fView commit details -
Configuration menu - View commit details
-
Copy full SHA for e029b23 - Browse repository at this point
Copy the full SHA e029b23View commit details -
Strip additional suffixes for extension name
-common and -internal will be in the way so let's strip them too.
Configuration menu - View commit details
-
Copy full SHA for 2532594 - Browse repository at this point
Copy the full SHA 2532594View commit details -
Only check the presence of Javadoc when collecting it
Also be a little less strict: in the case of config groups, we only require a Javadoc if it is not a section.
Configuration menu - View commit details
-
Copy full SHA for 94fc9e6 - Browse repository at this point
Copy the full SHA 94fc9e6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8dd0497 - Browse repository at this point
Copy the full SHA 8dd0497View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6f729ea - Browse repository at this point
Copy the full SHA 6f729eaView commit details -
Configuration menu - View commit details
-
Copy full SHA for c7d0579 - Browse repository at this point
Copy the full SHA c7d0579View commit details -
Also scan @ConfigMapping without @configroot
This is used in Observability Dev Services to share a super interface between several modules.
Configuration menu - View commit details
-
Copy full SHA for 95241fa - Browse repository at this point
Copy the full SHA 95241faView commit details -
Allow generating specific config sections
We use to generate a gazillion of config groups files and most were unused. In the new annotation, we only generate specific files if a section is marked with @ConfigSection(generated = true).
Configuration menu - View commit details
-
Copy full SHA for 2ab5bff - Browse repository at this point
Copy the full SHA 2ab5bffView commit details -
Configuration menu - View commit details
-
Copy full SHA for e4410fb - Browse repository at this point
Copy the full SHA e4410fbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9104607 - Browse repository at this point
Copy the full SHA 9104607View commit details -
Improve how ConfigSections/ConfigRoots are merged
ConfigSections have to be merged inside a given ConfigRoot. Typically, HibernateORMConfig has sections that are both in a simple element and in an unnamed map thus leading to the same section path. As for ConfigRoots, let's not merge them at all at resolution stage, given we already do some merging in the Maven plugin, let's do the merging at the end. Also drops some code related to having ConfigGroups in the model as we don't need them.
Configuration menu - View commit details
-
Copy full SHA for b154fdf - Browse repository at this point
Copy the full SHA b154fdfView commit details -
Also generate section files for Maps
This is useful in the case of gRPC XDS client config.
Configuration menu - View commit details
-
Copy full SHA for f15a1bd - Browse repository at this point
Copy the full SHA f15a1bdView commit details -
Allow saving a ConfigRoot in a specific file
This was introduced for Quarkus CXF but it's now also useful for the very weird core config ConfigRoot.
Configuration menu - View commit details
-
Copy full SHA for b5b8cc9 - Browse repository at this point
Copy the full SHA b5b8cc9View commit details -
Also resolve the name from the extension metadata
And make sure we keep the best name when merging the config roots. This will be useful for the file centralizing all the config doc. Finally, make sure we have a consistent ordering.
Configuration menu - View commit details
-
Copy full SHA for 9008ab7 - Browse repository at this point
Copy the full SHA 9008ab7View commit details -
Disable annotation processors in docs module
We have one in the classpath and we really don't want it to be executed so let's disable them.
Configuration menu - View commit details
-
Copy full SHA for bcc437d - Browse repository at this point
Copy the full SHA bcc437dView commit details -
Reimplement all config generation
Using the new model, it's a lot easier to implement.
Configuration menu - View commit details
-
Copy full SHA for bdccab1 - Browse repository at this point
Copy the full SHA bdccab1View commit details -
Adjust how the Maven plugin is executed and add a skip parameter
While we will use <extensions>true</extensions> in the external projects to simplify the setup, using it in a reactor where the plugin is built generates a warning. While it works file, it's less than ideal to have a warning so we register the plugin manually.
Configuration menu - View commit details
-
Copy full SHA for 41267b0 - Browse repository at this point
Copy the full SHA 41267b0View commit details -
Split Maven plugin generation from extension processor
We should have never used the extension processor infra to generate the Maven plugin reference doc. This commit makes sure we don't use anything from the annotation processor.
Configuration menu - View commit details
-
Copy full SHA for 5c76ea9 - Browse repository at this point
Copy the full SHA 5c76ea9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6461342 - Browse repository at this point
Copy the full SHA 6461342View commit details -
Get rid of all the old annotation processor code
Also port some of the tests to the new infrastructure.
Configuration menu - View commit details
-
Copy full SHA for 11c3181 - Browse repository at this point
Copy the full SHA 11c3181View commit details -
Simplify generated doc directory structure
This should be a lot easier to maintain in the future. Also adapt sync-web-site.sh to the new structure.
Configuration menu - View commit details
-
Copy full SHA for 348ff55 - Browse repository at this point
Copy the full SHA 348ff55View commit details -
Allow not detecting the extension
We actually have some level of support for building an extension with Gradle so we need to make it work. However, at the moment, it's close to impossible to determine the extension we are in in a Gradle extension. So we allow not detecting the extension and disable the config doc generation in this case.
Configuration menu - View commit details
-
Copy full SHA for 9ee3782 - Browse repository at this point
Copy the full SHA 9ee3782View commit details -
Fix new extension annotation processor compatibility with Windows
The annotation processor Filer API doesn't support Windows separators so let's use a plain string.
Configuration menu - View commit details
-
Copy full SHA for ec9ade1 - Browse repository at this point
Copy the full SHA ec9ade1View commit details
Commits on Aug 8, 2024
-
Don't make sections searchable
I think we need to but it wasn't done before and the website is apparently not ready for it. See how https://quarkus.io/version/main/guides/dev-services misbehaves when all the sections are make searchable.
Configuration menu - View commit details
-
Copy full SHA for 1a41c40 - Browse repository at this point
Copy the full SHA 1a41c40View commit details -
Clarify a bit the property path and the mapped path
We need to make sure people will not confuse them in the future.
Configuration menu - View commit details
-
Copy full SHA for 083795b - Browse repository at this point
Copy the full SHA 083795bView commit details