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

AsciiDocPropertyReferenceWriter is not reproducible #69

Open
melix opened this issue Mar 10, 2022 · 1 comment
Open

AsciiDocPropertyReferenceWriter is not reproducible #69

melix opened this issue Mar 10, 2022 · 1 comment

Comments

@melix
Copy link
Contributor

melix commented Mar 10, 2022

Given the same inputs, the generated config-properties.adoc file might be different.

While working on refactoring the micronaut-core build, I wrote an utility to check that the generated jar files were the same byte-to-byte before and after the migration. I noticed that it wasn't the case because of 2 files:

  • config-properties.adoc, generated by this project
  • spring-configuration-metadata.json

Here's a file generated in a first round:

++++
<a id="io.micronaut.scheduling.executor.UserExecutorConfiguration" href="#io.micronaut.scheduling.executor.UserExecutorConfiguration">&#128279;</a>
++++
.Configuration Properties for api:io.micronaut.scheduling.executor.UserExecutorConfiguration[]
|===
|Property |Type |Description

| `+micronaut.executors.*.n-threads+`
|java.lang.Integer
|


| `+micronaut.executors.*.type+`
|api:io.micronaut.scheduling.executor.ExecutorType[]
|


| `+micronaut.executors.*.parallelism+`
|java.lang.Integer
|


| `+micronaut.executors.*.core-pool-size+`
|java.lang.Integer
|


| `+micronaut.executors.*.thread-factory-class+`
|java.lang.Class
|


| `+micronaut.executors.*.name+`
|java.lang.String
|Sets the executor name.


| `+micronaut.executors.*.number-of-threads+`
|java.lang.Integer
|Sets the number of threads for {@link io.micronaut.scheduling.executor.ExecutorType#FIXED}. Default value (2 * Number of processors available to the Java virtual machine).


|===
<<<
++++
<a id="io.micronaut.runtime.ApplicationConfiguration.InstanceConfiguration" href="#io.micronaut.runtime.ApplicationConfiguration.InstanceConfiguration">&#128279;</a>
++++
.Configuration Properties for api:io.micronaut.runtime.ApplicationConfiguration.InstanceConfiguration[]
|===
|Property |Type |Description

| `+micronaut.application.instance+`
|api:io.micronaut.runtime.ApplicationConfiguration$InstanceConfiguration[]
|The instance configuration


| `+micronaut.application.instance.id+`
|java.lang.String
|The instance identifier


| `+micronaut.application.instance.group+`
|java.lang.String
|The instance auto scaling group


| `+micronaut.application.instance.zone+`
|java.lang.String
|The instance availability zone


| `+micronaut.application.instance.metadata+`
|java.util.Map
|The metadata to associate with the instance


|===
<<<
++++
<a id="io.micronaut.runtime.ApplicationConfiguration" href="#io.micronaut.runtime.ApplicationConfiguration">&#128279;</a>
++++
.Configuration Properties for api:io.micronaut.runtime.ApplicationConfiguration[]
|===
|Property |Type |Description

| `+micronaut.application.default-charset+`
|java.nio.charset.Charset
|Default value (UTF-8).


| `+micronaut.application.name+`
|java.lang.String
|Set the application name


|===
<<<
++++
<a id="io.micronaut.scheduling.io.watch.FileWatchConfiguration" href="#io.micronaut.scheduling.io.watch.FileWatchConfiguration">&#128279;</a>
++++
.Configuration Properties for api:io.micronaut.scheduling.io.watch.FileWatchConfiguration[]
|===
|Property |Type |Description

| `+micronaut.io.watch.enabled+`
|boolean
|Whether watch is enabled.


| `+micronaut.io.watch.restart+`
|boolean
|Set whether restart is enabled.


| `+micronaut.io.watch.paths+`
|java.util.List
|Sets the watch paths to use.


| `+micronaut.io.watch.check-interval+`
|java.time.Duration
|Sets the interval to wait between file watch polls.


|===
<<<

and the same file generated in another round:

++++
<a id="io.micronaut.scheduling.executor.UserExecutorConfiguration" href="#io.micronaut.scheduling.executor.UserExecutorConfiguration">&#128279;</a>
++++
.Configuration Properties for api:io.micronaut.scheduling.executor.UserExecutorConfiguration[]
|===
|Property |Type |Description

| `+micronaut.executors.*.n-threads+`
|java.lang.Integer
|


| `+micronaut.executors.*.type+`
|api:io.micronaut.scheduling.executor.ExecutorType[]
|


| `+micronaut.executors.*.parallelism+`
|java.lang.Integer
|


| `+micronaut.executors.*.core-pool-size+`
|java.lang.Integer
|


| `+micronaut.executors.*.thread-factory-class+`
|java.lang.Class
|


| `+micronaut.executors.*.name+`
|java.lang.String
|Sets the executor name.


| `+micronaut.executors.*.number-of-threads+`
|java.lang.Integer
|Sets the number of threads for {@link io.micronaut.scheduling.executor.ExecutorType#FIXED}. Default value (2 * Number of processors available to the Java virtual machine).


|===
<<<
++++
<a id="io.micronaut.scheduling.io.watch.FileWatchConfiguration" href="#io.micronaut.scheduling.io.watch.FileWatchConfiguration">&#128279;</a>
++++
.Configuration Properties for api:io.micronaut.scheduling.io.watch.FileWatchConfiguration[]
|===
|Property |Type |Description

| `+micronaut.io.watch.enabled+`
|boolean
|Whether watch is enabled.


| `+micronaut.io.watch.restart+`
|boolean
|Set whether restart is enabled.


| `+micronaut.io.watch.paths+`
|java.util.List
|Sets the watch paths to use.


| `+micronaut.io.watch.check-interval+`
|java.time.Duration
|Sets the interval to wait between file watch polls.


|===
<<<
++++
<a id="io.micronaut.runtime.ApplicationConfiguration.InstanceConfiguration" href="#io.micronaut.runtime.ApplicationConfiguration.InstanceConfiguration">&#128279;</a>
++++
.Configuration Properties for api:io.micronaut.runtime.ApplicationConfiguration.InstanceConfiguration[]
|===
|Property |Type |Description

| `+micronaut.application.instance+`
|api:io.micronaut.runtime.ApplicationConfiguration$InstanceConfiguration[]
|The instance configuration


| `+micronaut.application.instance.id+`
|java.lang.String
|The instance identifier


| `+micronaut.application.instance.group+`
|java.lang.String
|The instance auto scaling group


| `+micronaut.application.instance.zone+`
|java.lang.String
|The instance availability zone


| `+micronaut.application.instance.metadata+`
|java.util.Map
|The metadata to associate with the instance


|===
<<<
++++
<a id="io.micronaut.runtime.ApplicationConfiguration" href="#io.micronaut.runtime.ApplicationConfiguration">&#128279;</a>
++++
.Configuration Properties for api:io.micronaut.runtime.ApplicationConfiguration[]
|===
|Property |Type |Description

| `+micronaut.application.default-charset+`
|java.nio.charset.Charset
|Default value (UTF-8).


| `+micronaut.application.name+`
|java.lang.String
|Set the application name


|===
<<<

Notice that while the contents is the same, the order of sections differ.

@graemerocher
Copy link
Contributor

probably an unsorted set or map being used somewhere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants