-
Notifications
You must be signed in to change notification settings - Fork 157
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
Condense packaged JSON resources during the build phase #2860
Conversation
7c455e1
to
a274aa7
Compare
fhir-tools/src/main/java/com/ibm/fhir/ig/plugin/CondenseAndCopyFileVisitor.java
Outdated
Show resolved
Hide resolved
<artifactId>jakarta.json</artifactId> | ||
<version>2.0.1</version> | ||
<version>1.0.0</version> | ||
</dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about javadocs? no automation update done for that?
In the past, we kept these resources in their condensed / non-pretty format, but that made it hard to review changes and so we recently converted them to their pretty-printed flavor instead. The problem there is that the extra whitespace leads to a noticable size difference for the jars. On my system, removing this excess whitespace during the build reduces the size between 10 and 18%: carin-bb: 933,281 to 766,640 us-core: 1,443,884 to 1,212,573 fhir-registry: 19,585,400 to 17,758,332 Signed-off-by: Lee Surprenant <[email protected]>
a274aa7
to
43afd76
Compare
we don't actually publish the javadoc for fhir-tools, but we still need to build it (at least until its usage is hidden behind a profile) Signed-off-by: Lee Surprenant <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
In #2860 I added the condense-json action to the build section of each project where we want it. The problem with that is it requires everyone to have a built copy of the fhir-tools project in order for our fhir-parent build to be successful. This PR updates the approach by introducing a build profile in fhir-parent (and fhir-examples) for controlling whether to strip the formatting of **all** JSON resources across all modules. Additionally, this PR adds this new profile to a select few of the CI actions *and* our release action (so that the release jars will benefit from the savings). Signed-off-by: Lee Surprenant <[email protected]>
In #2860 I added the condense-json action to the build section of each project where we want it. The problem with that is it requires everyone to have a built copy of the fhir-tools project in order for our fhir-parent build to be successful. This PR updates the approach by introducing a build profile in fhir-parent (and fhir-examples) for controlling whether to strip the formatting of **all** JSON resources across all modules. Additionally, this PR adds this new profile to a select few of the CI actions *and* our release action (so that the release jars will benefit from the savings). Signed-off-by: Lee Surprenant <[email protected]>
I'm closing this in favor of #2864. By moving the
|
In the past, we kept these resources in their condensed / non-pretty
format, but that made it hard to review changes and so we recently
converted them to their pretty-printed flavor instead.
The problem there is that the extra whitespace leads to a noticable size
difference for the jars.
On my system, removing this excess whitespace during the build
reduces the size between 16% and 18% for the IGs and almost 10% for the
fhir-registry that contains the base resources.
carin-bb: 933,281 to 766,640
us-core: 1,443,884 to 1,212,573
fhir-registry: 19,585,400 to 17,758,332
Signed-off-by: Lee Surprenant [email protected]