Side navigation
#9701 closed bug (wontfix)
Opened June 29, 2011 08:37PM UTC
Closed June 29, 2011 09:19PM UTC
Last modified June 30, 2011 06:36PM UTC
v1.6.1 google closure compile warnings
Reported by: | ryan.pendergast@gmail.com | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | misc | Version: | 1.6.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
When I try to compile jquery v1.6.1 (src) with google closure I get:
./jquery/jquery-1.6.1.js:2460: WARNING - Suspicious code. This code lacks side-effects. Is there a bug?
if ( parent ) {
^
./jquery/jquery-1.6.1.js:2461: WARNING - Suspicious code. This code lacks side-effects. Is there a bug?
parent.selectedIndex;
^
./jquery/jquery-1.6.1.js:2464: WARNING - Suspicious code. This code lacks side-effects. Is there a bug?
if ( parent.parentNode ) {
^
./jquery/jquery-1.6.1.js:2465: WARNING - Suspicious code. This code lacks side-effects. Is there a bug?
parent.parentNode.selectedIndex;
^
./jquery/jquery-1.6.1.js:4300: WARNING - Suspicious code. This code lacks side-effects. Is there a bug?
if ( elem.parentNode ) {
^
./jquery/jquery-1.6.1.js:4301: WARNING - Suspicious code. This code lacks side-effects. Is there a bug?
elem.parentNode.selectedIndex;
^
./jquery/jquery-1.6.1.js:4577: WARNING - Suspicious code. This code lacks side-effects. Is there a bug?
Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;
You can get closure here: http://code.google.com/closure/compiler/
Its very easy to reproduce:
java -jar compiler.jar --js=./jquery/jquery-1.6.1.js --js_output_file=out.js
Attachments (0)
Change History (3)
Changed June 29, 2011 09:19PM UTC by comment:1
component: | unfiled → misc |
---|---|
priority: | undecided → low |
resolution: | → wontfix |
status: | new → closed |
Changed June 29, 2011 09:25PM UTC by comment:2
Also, those are warnings and the lines have hidden side-effects.
Changed June 30, 2011 06:36PM UTC by comment:3
What sideeffects do they have?
jQuery previously used Google Closure Compiler and have since switched to Uglify JS.