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

pico runtime services #5750

Merged
merged 118 commits into from
Mar 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
8cbecb3
pico runtime services
trentjeff Dec 22, 2022
fe7155f
pico runtime services
trentjeff Dec 22, 2022
1deb135
pico runtime services - more incremental progress
trentjeff Jan 5, 2023
2216dc4
pico runtime services - more incremental progress
trentjeff Jan 8, 2023
a93db82
pico runtime services - more incremental progress
trentjeff Jan 9, 2023
e3d435f
pico runtime services - more incremental progress
trentjeff Jan 10, 2023
a784a09
pico runtime services - services is mostly code complete
trentjeff Jan 10, 2023
54db78d
pico runtime services - checkpointing tools
trentjeff Jan 18, 2023
e214428
pico runtime services - checkpointing processor
trentjeff Jan 18, 2023
e481539
pico runtime services - processor initially complete
trentjeff Jan 19, 2023
15d84fb
pico runtime services - processor initially complete
trentjeff Jan 19, 2023
1eb511c
pico runtime services - make a dent into checkstyles
trentjeff Jan 19, 2023
1d6405c
pico runtime services - more checkstyle and findbug fixes
trentjeff Jan 20, 2023
405f6f2
pico runtime services - tests (started layout)
trentjeff Jan 22, 2023
5103ae7
pico runtime services - tests partially complete
trentjeff Jan 23, 2023
03104b2
pico runtime services - tests mostly complete
trentjeff Jan 24, 2023
04b6b3e
pico runtime services - tests mostly complete
trentjeff Jan 24, 2023
ec5dcad
pico runtime services - added maven-plugin - testing has 11 test fail…
trentjeff Jan 26, 2023
fdaf377
pico runtime services - added maven-plugin - testing has 9 test failu…
trentjeff Jan 26, 2023
483e5e7
pico runtime services - added maven-plugin - testing has 9 test failu…
trentjeff Jan 26, 2023
eed8fb9
pico runtime services - testing has 5 test failures left that need re…
trentjeff Jan 31, 2023
ed01a83
all tests pass
trentjeff Jan 31, 2023
9261cdc
fix maven-plugin for parallel builds and builds w/o clean; everything…
trentjeff Feb 1, 2023
d07a610
initial cut of config-driven-services
trentjeff Feb 2, 2023
7aea69d
config-driven-services compile. next step is to ensure runtime works …
trentjeff Feb 2, 2023
e64940c
purely cosmetic stuff
trentjeff Feb 2, 2023
4e8a9c6
Addressed issues#5564 - relocating pico-types and pico-builder-config…
trentjeff Feb 4, 2023
9b522c7
checkstyle suppression
trentjeff Feb 4, 2023
cd56054
reactor dependency ordering
trentjeff Feb 6, 2023
d71d4ce
config-driven-services - some testing partially completed.
trentjeff Feb 6, 2023
1746e48
config-driven-services - cleanup and some minor fixes
trentjeff Feb 7, 2023
77b32aa
config-driven-services - better support for PreDestroy and shutdown l…
trentjeff Feb 7, 2023
2c6c432
config-driven-services - testing the bean registry
trentjeff Feb 8, 2023
c82affc
config-driven-services - application testing.
trentjeff Feb 8, 2023
0394e73
config-driven-services - tck tests.
trentjeff Feb 9, 2023
f7819dd
config-driven-services - debugging partially done. parallel builds ar…
trentjeff Feb 10, 2023
56fe725
adding the start of debugging and diagnostics support
trentjeff Feb 10, 2023
0919535
fixing the parallel build issue on the pico maven plugin - introduces…
trentjeff Feb 11, 2023
a10e0c6
fixes a few issues in the CustomAnnotationProcessor
trentjeff Feb 14, 2023
95bdcb9
nima on pico 1
tomas-langer Feb 14, 2023
204ff13
Níma on Pico example.
tomas-langer Feb 14, 2023
f77c9a3
Use strings for annotation types instead of classes.
tomas-langer Feb 15, 2023
3085dfd
Aligned logging levels for clean startup.
tomas-langer Feb 15, 2023
a166854
Moved types to common, as they are used from modules not related to b…
tomas-langer Feb 15, 2023
abacd82
Moved TypeInfo to common types.
tomas-langer Feb 15, 2023
16edb06
Fix copyrights.
tomas-langer Feb 15, 2023
07b85df
Dependency tree changes 1, common-types
tomas-langer Feb 15, 2023
fa52260
DefaultTypeName equals, hashcode, and compareTo
tomas-langer Feb 16, 2023
41bc587
Use constants.
tomas-langer Feb 16, 2023
1438ef5
Tests passing
tomas-langer Feb 16, 2023
7be1ef9
Removed javax and jakarta utilities and dependencies on those libraries.
tomas-langer Feb 16, 2023
a7286a6
Use `value()` method instead of `key()` in ConfigDriven
tomas-langer Feb 17, 2023
1141114
fixed configdirven module names
tomas-langer Feb 17, 2023
6b667a5
Use constants instead of hardcoded strings.
tomas-langer Feb 17, 2023
d1c10f1
Use constants instead of hardcoded strings.
tomas-langer Feb 17, 2023
b90dcba
Pico Examples (starter)
trentjeff Feb 22, 2023
f4376ba
Pico Examples checkstyles
trentjeff Feb 22, 2023
8e89f4f
misc
trentjeff Feb 22, 2023
2d243fa
fix build ordering, and checkstyles
trentjeff Feb 22, 2023
559d4a9
fix HeaderNamesTest
trentjeff Feb 22, 2023
084bb5f
Changing picoModule->Pico$$Module, $$picoActivator->$$Pico$$Activator…
trentjeff Feb 22, 2023
d04e761
Changing Msgr -> Messager and OptNamed -> OptionallyNamed.
trentjeff Feb 22, 2023
a9245ce
Adding PicoServices.realizedServices().
trentjeff Feb 22, 2023
82f3886
address deprecation comments.
trentjeff Feb 22, 2023
91b04ef
fix javadoc in builders
trentjeff Feb 22, 2023
da5d67f
general code cleanup
trentjeff Feb 22, 2023
cd4218b
top level README.md
trentjeff Feb 23, 2023
f4bf066
more readme.md work.
trentjeff Feb 23, 2023
33b6079
more readme.md work.
trentjeff Feb 23, 2023
5443fca
more readme.md work.
trentjeff Feb 23, 2023
20c2f3b
package moves to conform to SPI.
trentjeff Feb 23, 2023
84be992
KIND_ TypeInfo definitions.
trentjeff Feb 23, 2023
8d0c1f2
fix copyright.
trentjeff Feb 23, 2023
00da24e
isNull and nonNull elimination
trentjeff Feb 24, 2023
8d2ae02
rebase, uptake, and some minor changes
trentjeff Feb 27, 2023
6695a72
KIND_ANNOTATION -> KIND_ANNOTATION_TYPE
trentjeff Feb 27, 2023
868ea40
refine common/types tests around toString() usage
trentjeff Feb 27, 2023
bfea14f
replace getAnnotation() with mirrors instead
trentjeff Feb 27, 2023
1badf1c
validate module-info.java for Pico constructs.
trentjeff Feb 28, 2023
08aeb51
validate module-info.java for Pico constructs.
trentjeff Feb 28, 2023
9970991
rename pico -> pico-api and configdriven -> configdriven-api.
trentjeff Feb 28, 2023
bfd417c
params codestyle alignment.
trentjeff Mar 1, 2023
c6c1138
more optimal interceptors
trentjeff Mar 2, 2023
1d2a189
fix merge conflict
trentjeff Mar 2, 2023
65fd56f
fix import order checkstyle
trentjeff Mar 2, 2023
8380007
strip config on config-bean-name suffix
trentjeff Mar 2, 2023
c30e15a
ConfigBean levelType attribute (ROOT and eventually NESTED). This cha…
trentjeff Mar 6, 2023
17694d6
Support for ROOT and NESTED config beans.
trentjeff Mar 8, 2023
d0a3476
Nested config beans support of lists and sets without prefixes
trentjeff Mar 9, 2023
a3d010c
Fix nativeimage mp1 nima pipeline tests.
trentjeff Mar 10, 2023
a97cde6
1. More fixes to get nativeimage mp1 and mp3 and bookstore pipeline t…
trentjeff Mar 10, 2023
803fbbc
address new review comments.
trentjeff Mar 13, 2023
ced048f
Update examples/pico/car/pico/src/main/java/io/helidon/examples/pico/…
trentjeff Mar 14, 2023
cb8e573
address new review comments.
trentjeff Mar 14, 2023
c5d225b
Add more ConfigBean related docs.
trentjeff Mar 14, 2023
08bea47
A few more minor changes.
trentjeff Mar 14, 2023
4775b18
address review comment on requireNonNull()
trentjeff Mar 15, 2023
071e285
Showcases WebServerConfigDrivenTest, plus improves generated comments…
trentjeff Mar 15, 2023
bc22da2
adds unrealizedServices() method
trentjeff Mar 15, 2023
d95f502
adds unrealizedServices() method - additional items.
trentjeff Mar 15, 2023
cbd0e2b
Address more review comments.
trentjeff Mar 17, 2023
dc07cc7
issue# 6382 - add Map<> support
trentjeff Mar 20, 2023
207048c
issue# 6382 - add Map<> support (finishing touches)
trentjeff Mar 20, 2023
87192fa
add more builder and ConfigBean builder docs
trentjeff Mar 20, 2023
dae5c1a
addressing most of tlanger's "now" review comments from today
trentjeff Mar 20, 2023
5a57a83
addressing the remainder of tlanger's "now" review comments from yest…
trentjeff Mar 21, 2023
4a8babb
Change CallingContext to replace maybeCreate()
trentjeff Mar 22, 2023
93d64ab
address some intellij warnings
trentjeff Mar 22, 2023
9e7efc9
a few more review comments being addressed
trentjeff Mar 23, 2023
e77ccf9
a few more review comments being addressed
trentjeff Mar 23, 2023
3d668a5
a few more review comments being addressed
trentjeff Mar 23, 2023
d59fcd9
address a new batch of review comments
trentjeff Mar 27, 2023
d087c3b
address a few more from the new batch of review comments
trentjeff Mar 27, 2023
a2ee5c9
address a few more from the new batch of review comments
trentjeff Mar 27, 2023
33f3a76
address a few more from the new batch of review comments
trentjeff Mar 27, 2023
834d733
a new batch addressed
trentjeff Mar 28, 2023
3e78f11
make config metadata an optional dep
trentjeff Mar 28, 2023
63f889b
remove optional args from ConfigBeanRegistry
trentjeff Mar 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
52 changes: 43 additions & 9 deletions bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,11 @@
<artifactId>helidon-common-task</artifactId>
<version>${helidon.version}</version>
</dependency>
<dependency>
<groupId>io.helidon.common</groupId>
<artifactId>helidon-common-types</artifactId>
<version>${helidon.version}</version>
</dependency>
<dependency>
<groupId>io.helidon.common.testing</groupId>
<artifactId>helidon-common-testing-junit5</artifactId>
Expand Down Expand Up @@ -1405,36 +1410,65 @@
<artifactId>helidon-builder-processor</artifactId>
<version>${helidon.version}</version>
</dependency>
<dependency>
<groupId>io.helidon.builder</groupId>
<artifactId>helidon-builder-config</artifactId>
<version>${helidon.version}</version>
</dependency>
<dependency>
<groupId>io.helidon.builder</groupId>
<artifactId>helidon-builder-config-processor</artifactId>
<version>${helidon.version}</version>
</dependency>

<!-- Pico Core -->
<dependency>
<groupId>io.helidon.pico</groupId>
<artifactId>helidon-pico</artifactId>
<artifactId>helidon-pico-api</artifactId>
<version>${helidon.version}</version>
</dependency>
<dependency>
<groupId>io.helidon.pico</groupId>
<artifactId>helidon-pico-types</artifactId>
<artifactId>helidon-pico-tools</artifactId>
<version>${helidon.version}</version>
</dependency>
<dependency>
<groupId>io.helidon.pico</groupId>
<artifactId>helidon-pico-tools</artifactId>
<artifactId>helidon-pico-processor</artifactId>
<version>${helidon.version}</version>
</dependency>

<!-- Pico Config Builder -->
<dependency>
<groupId>io.helidon.pico.builder.config</groupId>
<artifactId>helidon-pico-builder-config</artifactId>
<groupId>io.helidon.pico</groupId>
<artifactId>helidon-pico-maven-plugin</artifactId>
<version>${helidon.version}</version>
</dependency>
<dependency>
<groupId>io.helidon.pico</groupId>
<artifactId>helidon-pico-testing</artifactId>
<version>${helidon.version}</version>
</dependency>
<dependency>
<groupId>io.helidon.pico.builder.config</groupId>
<artifactId>helidon-pico-builder-config-processor</artifactId>
<groupId>io.helidon.pico</groupId>
<artifactId>helidon-pico-services</artifactId>
<version>${helidon.version}</version>
</dependency>

<!-- Pico Config-Driven related -->
<dependency>
<groupId>io.helidon.pico.configdriven</groupId>
<artifactId>helidon-pico-configdriven-api</artifactId>
<version>${helidon.version}</version>
</dependency>
<dependency>
<groupId>io.helidon.pico.configdriven</groupId>
<artifactId>helidon-pico-configdriven-services</artifactId>
<version>${helidon.version}</version>
</dependency>
<dependency>
<groupId>io.helidon.pico.configdriven</groupId>
<artifactId>helidon-pico-configdriven-processor</artifactId>
<version>${helidon.version}</version>
</dependency>

</dependencies>
</dependencyManagement>
Expand Down
50 changes: 45 additions & 5 deletions builder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The <b>Helidon Builder</b> provides compile-time code generation for fluent builders. It was inspired by [Lombok]([https://projectlombok.org/), but the implementation here in Helidon is different in a few ways:
<ol>
<li>The <i>Builder</i> annotation targets interface or annotation types only. Your interface effectively contains the attributes of your getter as well as serving as the contract for your getter methods.</li>
<li>Generated classes implement your target interface (or annotation) and provide a fluent builder that will always have an implementation of <i>toString(), hashCode(), and equals().</i> implemented</li>
<li>Generated classes implement your target interface (or annotation or abstract class) and provide a fluent builder that will always have an implementation of <i>toString(), hashCode(), and equals().</i> implemented</li>
<li>Generated classes always behave like a <i>SuperBuilder</i> from Lombok. Basically this means that builders can form
a hierarchy on the types they target (e.g., Level2 derives from Level1 derives from Level0, etc.).</li>
<li>Lombok uses AOP while the Helidon Builder generates source code. You can use the <i>Builder</i> annotation (as well as other annotations in the package and <i>ConfiguredOption</i>) to control the naming and other features of what and how the implementation classes are generated and behave.</li>
Expand Down Expand Up @@ -38,7 +38,35 @@ public interface MyConfigBean {
}
```
2. Annotate your interface definition with <i>Builder</i>, and optionally use <i>ConfiguredOption</i>, <i>Singular</i>, etc. Remember to review the annotation attributes javadoc for any customizations.
3. Compile (using the <i>builder-processor</i> in your annotation classpath).
3. Builder (using the <i>builder-processor</i> in your annotation classpath).
```xml
...
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<!-- this path is needed if only requiring the Builder annotation -->
<path>
<groupId>io.helidon.builder</groupId>
<artifactId>helidon-builder-processor</artifactId>
<version>${helidon.version}</version>
</path>
<!-- this path is needed if requiring the ConfigBean annotation (which will automatically bring in the Builder processor transitively) -->
<path>
<groupId>io.helidon.builder</groupId>
<artifactId>helidon-builder-processor</artifactId>
<version>${helidon.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
...
```

The result of this will create (under ./target/generated-sources/annotations):
* MyConfigBeanImpl (in the same package as MyConfigBean) that will support multi-inheritance builders named MyConfigBeanImpl.Builder.
Expand All @@ -49,16 +77,28 @@ The result of this will create (under ./target/generated-sources/annotations):
* Support for attribute validation (see ConfiguredOption#required() and [test-builder](./tests/builder/src/main/java/io/helidon/builder/test/testsubjects/package-info.java)).
* Support for builder interception (i.e., including decoration or mutation). (see [test-builder](./tests/builder/src/main/java/io/helidon/builder/test/testsubjects/package-info.java)).

Also note that the generated code from Helidon Builder processors may add other dependencies that you will need to add (typically in <i>provided</i> scope).
```xml
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
<scope>provided</scope>
<optional>true</optional>
</dependency>
```

## Modules
* [builder](./builder) - provides the compile-time annotations, as well as optional runtime supporting types.
* [processor-spi](./processor-spi) - defines the Builder Processor SPI runtime definitions used by builder tooling. This module is only needed at compile time.
* [processor-tools](./processor-tools) - provides the concrete creators & code generators. This module is only needed at compile time.
* [processor](./processor) - the annotation processor which delegates to the processor-tools module for the main processing logic. This module is only needed at compile time.
* [tests/builder](./tests/builder) - tests that can also serve as examples for usage.
* [builder-config](./builder-config) - extension to the builder to additionally support [Helidon (Common) Config](../common/config) and [@ConfigBean](./builder-config/src/main/java/io/helidon/builder/config/ConfigBean.java).
* [builder-config-processor](./builder-config-processor) - defines the ConfigBean builder.
* [tests](./tests) - tests that can also serve as examples for usage.

## Customizations
## Customizations and Extensibility
To implement your own custom <i>Builder</i>:
* See [pico/builder-config](../pico/builder-config) for an example.
* See [builder-config](../builder-config) serving as an example.

## Usage
See [tests/builder](./tests/builder) for usage examples.
4 changes: 4 additions & 0 deletions builder/builder-config-processor/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# builder-config-processor

This module adds support for <b>ConfigBean</b> annotation.
This module should typically only be used during compile time, in the APT compiler path only.
Original file line number Diff line number Diff line change
Expand Up @@ -19,36 +19,33 @@

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>io.helidon.pico.builder.config</groupId>
<artifactId>helidon-pico-builder-config-project</artifactId>
<groupId>io.helidon.builder</groupId>
<artifactId>helidon-builder-project</artifactId>
<version>4.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>helidon-pico-builder-config-processor</artifactId>

<name>Helidon Pico Builder ConfigBean Processor</name>
<artifactId>helidon-builder-config-processor</artifactId>
<name>Helidon Builder ConfigBean Processor</name>

<dependencies>
<dependency>
<groupId>io.helidon.pico.builder.config</groupId>
<artifactId>helidon-pico-builder-config</artifactId>
<groupId>io.helidon.builder</groupId>
<artifactId>helidon-builder-config</artifactId>
</dependency>
<dependency>
<groupId>io.helidon.builder</groupId>
<artifactId>helidon-builder-processor</artifactId>
</dependency>
<dependency>
<groupId>io.helidon.pico</groupId>
<artifactId>helidon-pico-types</artifactId>
</dependency>
<dependency>
<groupId>io.helidon.pico</groupId>
<artifactId>helidon-pico</artifactId>
<groupId>io.helidon.common</groupId>
<artifactId>helidon-common-types</artifactId>
</dependency>
<!-- IMPORTANT: this entire suite tests the basic functionality, w/o full config or config-driven services -->
<!-- here we are using full config only to set up the unit testing -->
<dependency>
<groupId>io.helidon.common</groupId>
<artifactId>helidon-common-config</artifactId>
Expand Down
Loading