🏗✨ Dynamically generate custom closure compiler runner.jar#23434
🏗✨ Dynamically generate custom closure compiler runner.jar#23434rsimha merged 6 commits intoampproject:masterfrom rsimha:2019-07-19-GenerateRunner
runner.jar#23434Conversation
|
@jridgewell and @estherkim have helped verify that this works on older machines, and machines that have never had to run This is now ready for review. |
|
A few questions:
|
|
@jridgewell answers below
|
|
I don't think this is a good change to make.
That's just unnecessary extra work, though. (And it took 4s on my machine). I understand that it's small compared to overall closure run time, so this isn't a blocker.
Running closure makes my machine usable for ~5min. Running both dist and check-types at the same time would make my machine even more unusable.
This is really only run buy You, Erwin, and myself. I think a checked in bash script to automate this would be better. |
Requiring a bash script to be run manually will prevent the real benefit of this PR from being realized: The ability to automatically test new closure compiler versions on Travis as they are released (via Renovate PRs). Today, upgrading closure compiler is a painstaking manual process that happens only when someone sets out to do so. Dynamically generating
It's a necessary part of enabling the automatic testing of new releases of closure compiler.
This is only a problem on older machines. Running concurrent instances of closure is entirely possible on current macbooks and standard linux workstations, and is a fairly useful workflow if you choose to do so. Dynamically generating |
That's also easily done via a gulp task before running?
Man, I wish Apple would make a decent laptop again. Current gen: https://browser.geekbench.com/v4/cpu/13995682 |
As discussed in person, this isn't possible, since it will result in the need to add a new commit to a Github PR from a Travis build. |
|
@jridgewell I've added commit dd9431d, which generates
Let me know what you think. |
|
@jridgewell @erwinmombay All comments addressed. Third party changes separated out into #23490. PTAL. |
|
just 1 last nit from me. I'll leave it to @jridgewell for final approval since i know he has concerns above |
jridgewell
left a comment
There was a problem hiding this comment.
I still don't like this.
What specifically don't you like? Do you have a better idea that will still allow renovate to upgrade closure compiler? I'm merging this for now. Happy to discuss improvements in a follow up. Edit: Seems like you didn't see #23434 (comment) which prevents a regeneration every time closure is invoked. |
In #23417, we switched from the custom-built
third_party/closure-compiler/compiler.jarto the natively installednode_modules/google-closure-compiler-java/compiler.jar. With this, the coast is clear to dynamically generaterunner.jarinstead of checking in a pre-built copy.PR highlights:
Adds a copy of Apache Ant v1.10.6 toEdit: Moved to 🏗 Add Apache Ant v1.10.6 tothird_party/ant/third_party/ant#23490build-system/runnerincluding the pre-builtrunner.jarbuild-system/tasks/generate-runner.js, which dynamically generatesrunner.jarwhenever agulptask needs to invoke closure compiler (dist,check-types, andnailgun-start)Notes:
runner.jaris written to a subdirectory ofbuild-system/runner/dist/in order to allow for the concurrent running ofgulp distandgulp check-typesrunner.jarwas last generated is written to the directory, so that it is only regenerated when requiredrunner.jarwhile upgrading closure compilerbuild-system/runner/src/org/ampproject/*.javaare automatically applied when you rungulp distorgulp check-typesrunner.jarFixes #22452