[
https://issues.apache.org/jira/browse/TAP5-2777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17842568#comment-17842568
]
Ben Weidig commented on TAP5-2777:
----------------------------------
Updating it to the latest working version makes sense, but I remember too that
there were some issues...
If you have v20210505 working for over two years without issues, that should be
the minimum version we should use.
Around June 2022, Java 11 become a prerequisite, which means we should update
to the latest one that works with Java 8 (and Tapestry), and try to update to
the latest in the Jakarta branch.
I've added the version to our applications to see if it works with our setup,
as we have at least one advise/hack thanks to the closure compiler destroying
JS.
Checking out the problematic components, it looks fine so far.
Nevertheless, Google Closure Compiler is always a double-edged sword.
The "important caveats" list in their README.md is long, and it boils down to
"if in doubt, write JS with the compiler in mind, we optimize for our own use
cases".
> Update the closure compiler for better support of modern JavaScript
> -------------------------------------------------------------------
>
> Key: TAP5-2777
> URL: https://issues.apache.org/jira/browse/TAP5-2777
> Project: Tapestry 5
> Issue Type: Task
> Components: tapestry-webresources
> Affects Versions: 5.8.6
> Reporter: Chris Poulsen
> Assignee: Ben Weidig
> Priority: Minor
>
> A couple of years ago we encountered errors related to the closure compiler
> not understanding certain modern JavaScript constructs.
> The details are sort of hazy, but IIRC the newest version(s) of the compiler
> were not just drop-in upgrades (primo 2022). We ended up with "v20210505"
> back then, it allowed our JavaScript to pass through and was still just a
> drop-in upgrade.
> We have been running the following config in production for 2 years (on a
> bunch of installations) without issues, so maybe more people would benefit
> from this upgrade.
> {code:java}
> runtimeOnly("org.apache.tapestry:tapestry-webresources:$tapestryVersion") {
> exclude group: 'com.google.javascript'
> }
> runtimeOnly("com.google.javascript:closure-compiler-unshaded:v20210505")
> runtimeOnly("com.google.javascript:closure-compiler-externs:v20210505")
> {code}
> Ideally the compiler support would be updated to the newest version and kept
> up-to-date, but for a low hanging fruit, this one should be a simple step.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)