You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The size of the exploded Boot LS JAR is getting larger with every release due to many OpenRewrite libs chained to one another via the runtime scope dependencies.
There are libs such as rewrite-csharp, rewrite-kotlin, rewrite-jenkins that hardly have any use in the STS context.
Most of these libs are pulled via rewrite-staticanalysis which goes via rewrite-spring directly or rewrite-migrate-java.
My quick investigation revealed that we can exclude rewrite-static-analysis at the expense of:
3 recipes from upgrade to Java 17 gone:
Instanceof pattern matching ((a instancof A) -> (a instanceof A b))
Text blocks
Add Serial annotation to serial version UID
1 recipe for Java 21
Replace deprecated java.lang.Runtime methods
Copy recipe org.openrewrite.staticanalysis.RemoveUnneededBlock into rewrite commons same named package to get around compile dependency from rewrite-spring on rewrite-static-analysis
Then I can safely exclude rewrite-static-analysis dependency on our side and the LS JAR then is 193.85 MB from 271Mb which is not bad at all.
The problem would arise later, however, if more recipes from rewrite-static-analysis are re-used in rewrite-spring either directly in Java code (compile dependency) or in YAML files (runtime dependency)
@martinlippert shall we try to push those changes in? Or shall we wait and see what to do with OR integration first?
I'm inclined to wait and see what we do with OR integration first post license change... then address the JAR size issue if it still an issue.
We are down to 207 Mb JAR with these changes: 1c64204. Not 193.85Mb that I got initially... Wonder if excluded Rewrite's github-actions, jenkins and lombok at the time. Anyway, I stopped at this and digest this change for a bit before excluding more OR libs.
Activity
BoykoAlex commentedon Dec 11, 2024
My quick investigation revealed that we can exclude
rewrite-static-analysisat the expense of:(a instancof A)->(a instanceof A b))Serialannotation to serial version UIDjava.lang.Runtimemethodsorg.openrewrite.staticanalysis.RemoveUnneededBlockinto rewrite commons same named package to get around compile dependency fromrewrite-springonrewrite-static-analysisThen I can safely exclude
rewrite-static-analysisdependency on our side and the LS JAR then is193.85 MBfrom271Mbwhich is not bad at all.The problem would arise later, however, if more recipes from
rewrite-static-analysisare re-used inrewrite-springeither directly in Java code (compile dependency) or in YAML files (runtime dependency)BoykoAlex commentedon Dec 11, 2024
Opened an issue against OpenRewrite: openrewrite/rewrite-spring#648
BoykoAlex commentedon Jan 20, 2025
@martinlippert shall we try to push those changes in? Or shall we wait and see what to do with OR integration first?
I'm inclined to wait and see what we do with OR integration first post license change... then address the JAR size issue if it still an issue.
BoykoAlex commentedon Jan 22, 2025
We are down to 207 Mb JAR with these changes: 1c64204. Not 193.85Mb that I got initially... Wonder if excluded Rewrite's github-actions, jenkins and lombok at the time. Anyway, I stopped at this and digest this change for a bit before excluding more OR libs.