-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Compiler does not work properly after v20201102 #3874
Comments
I checked the versions https://mvnrepository.com/artifact/com.google.javascript/closure-compiler last working version is "closure-compiler-v20201102.jar" all releases after are not working with this plugin (colorbox) anymore. |
I reproduced this and diff'ed the two compiler outputs from
vs.
After stripping away number, this results in:
As something around "LoadedContent" changed, this looks related to me. |
It does look like there is additional inlining occuring. Which might mean it is related to this change: |
Manually reformatting:
vs:
The main thing that I see here is
https://github.com/jackmoore/colorbox/blob/master/jquery.colorbox.js#L801 It seems reasonable that this reordering is the cause of the problem. I'm unclear however if: |
Related internal issue b/117935266 |
I believe I have a fix for this in the ExpressionDecomposer. I'm running the internal tests now
|
This will be part of the next release and should address this issue. |
@Daijobou this should be fixed as of yesterday's release v20211107 |
I use https://github.com/jackmoore/colorbox and my project includes jquery.colorbox.js (as example)
In the past I use a compiler from 2015 with
java -jar compiler.2015.jar --language_out=ECMASCRIPT6 --compilation_level SIMPLE_OPTIMIZATIONS --js jquery.colorbox.js --js_output_file output1.js
Now I updated to compiler version v20210907
java -jar closure-compiler-v20210907.jar --language_out=ECMASCRIPT_2015 --compilation_level SIMPLE --js jquery.colorbox.js --js_output_file output2.js
EDIT: With closure-compiler-v20201102.jar its working
I get no warnings or errors in console, but the demo not working with "output2" but working fine with "output1". Something the compiler is doing is optimizing incorrectly. I get the overlay and box, but no image is included.
output1
output2
The text was updated successfully, but these errors were encountered: