-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Upgrade Closure Compiler to v20171112 #18552
Conversation
d1ef268
to
36d913d
Compare
36d913d
to
600e8f9
Compare
… add comment about jscomp_warning.
@choumx why does compiler-and-tests.jar need to be updated? |
e62defa
to
43de67c
Compare
/to @erwinmombay @rsimha /cc @cramforce |
43de67c
to
84088d2
Compare
ef87609
to
a883acd
Compare
a883acd
to
4569c93
Compare
dd6129e
to
f3c398b
Compare
f033713
to
4c251f9
Compare
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.
Wow. Thanks. LGTM
Merged for you since this could easily get into merge conflicts. |
How hard would it be to upgrade to something actually current? |
Thanks for the merge! It took me two days to upgrade six months with learning curve, so maybe less than a week for another year's worth (11/2017 to 10/2018). |
* Revert "Revert CC upgrade. (#18600)" This reverts commit 6fd3044. * Remove node_modules/ from js_module_root. * Fix swg.js again. * Increase bundle size cap to 82.2. * Inject react-dates bundle post-compile instead of importing in code. * Typecast react-dates imports in amp-date-picker. * Bump bundle-size. * Restore --js_module_root for 1-pass. * Remove obsolete 'erwinmHack'.
* Revert "Revert CC upgrade. (ampproject#18600)" This reverts commit 6fd3044. * Remove node_modules/ from js_module_root. * Fix swg.js again. * Increase bundle size cap to 82.2. * Inject react-dates bundle post-compile instead of importing in code. * Typecast react-dates imports in amp-date-picker. * Bump bundle-size. * Restore --js_module_root for 1-pass. * Remove obsolete 'erwinmHack'.
* Revert "Revert CC upgrade. (ampproject#18600)" This reverts commit 6fd3044. * Remove node_modules/ from js_module_root. * Fix swg.js again. * Increase bundle size cap to 82.2. * Inject react-dates bundle post-compile instead of importing in code. * Typecast react-dates imports in amp-date-picker. * Bump bundle-size. * Restore --js_module_root for 1-pass. * Remove obsolete 'erwinmHack'.
Upgrades CC from 20170409 to 20171112.
google/closure-compiler#2418 enables transpilation of superclass property refs e.g.
super.foo
, which is used byworker-dom
. Earliest version after that PR is 20170626.However, non
goog.module
imports are broken until 20171023 with google/closure-compiler#2641, so upgrade to that instead.However, 20171023 changes "module not found" from warning to error (problematic for
swg.js
), so upgrade to 20171112 which allows demoting them back to warnings via google/closure-compiler#2694.Remaining issues
swg.js
that can't be suppressed for some reason. To fix these, we should generate externs or strip bogus type annotations with relative paths. To unblock, Ichanged the build to not fail on warnings from swg.jssearch/replaced those types to*
via regex. Filed Type paths to missing files in swg.js #18586.Updating Closure Compiler
third_party/closure-compiler/compiler.jar
, download desired binary.compiler-and-tests.jar
, clone closure-compiler and build it manually. Steps to make sure test classes are included:test/
intosrc/
.<scope>test</scope>
in dependencies.<minimizeJar>true</minimizeJar>
inpom-main-shaded.xml
.compiler-and-tests.jar
.ant jar
andant test
. Fix stuff, cross-reference diffs in code search to dig up deprecations etc.