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

Fix missing configuration properties in generated docs #223

Merged
merged 1 commit into from
Nov 9, 2021

Conversation

melix
Copy link
Contributor

@melix melix commented Nov 9, 2021

This commit fixes the generated documentation possibly missing
configuration properties files. To fix it, it now applies a
configuration properties plugin to Micronaut modules. This plugin
is responsible for creating tasks which will process the configuration
properties file (for each module) and generate an outgoing configuration
which carries those artifacts.

This makes it possible for the "main" project (the aggregating one) to
depend on those configurations in order to get the generated asciidoc
files. This effectively decouples the producer side from the consumer side,
making it less brittle and less likely to break.

It's worth noting that the same technique should be used
in other parts of the docs plugin, but this will be done later.
Basically there are many tasks which do not declare their inputs
and should be replaced with proper tasks instead. As an example,
the zipDocs task didn't declare any input: the consequence is
that it may, or may not contain the right docs depending on what
is called before. This is currently fixed by adding an explicit
dependency, but it should be replaced by implicit task dependencies.

Another benefit is that now all configuration properties tasks are
cacheable, which should make the build faster once we enable the
build cache.

This commit fixes the generated documentation possibly missing
configuration properties files. To fix it, it now applies a
configuration properties plugin to Micronaut modules. This plugin
is responsible for creating tasks which will process the configuration
properties file (for each module) and generate an _outgoing configuration_
which carries those artifacts.

This makes it possible for the "main" project (the aggregating one) to
depend on those configurations in order to get the generated asciidoc
files. This effectively decouples the producer side from the consumer side,
making it less brittle and less likely to break.

It's worth noting that the same technique should be used
in other parts of the docs plugin, but this will be done later.
Basically there are many tasks which do not declare their inputs
and should be replaced with proper tasks instead. As an example,
the `zipDocs` task didn't declare any input: the consequence is
that it may, or may not contain the right docs depending on what
is called before. This is currently fixed by adding an explicit
dependency, but it should be replaced by implicit task dependencies.

Another benefit is that now all configuration properties tasks are
cacheable, which should make the build faster once we enable the
build cache.
@melix melix added the bug Something isn't working label Nov 9, 2021
@melix melix added this to the 4.2.5 milestone Nov 9, 2021
@melix melix self-assigned this Nov 9, 2021
@jameskleeh jameskleeh merged commit 1d4d1aa into master Nov 9, 2021
@jameskleeh jameskleeh deleted the cc/fix-processprops branch November 9, 2021 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants