[Prototype-core] Playing with Google's Closure Compiler and got a message for Prototype 1.7.0.0

2011-05-17 Thread Richard Quadling
Hi. Using Google Maps API with Prototype. Playing putting it into Google Closure Compiler. Got a message ... Number of warnings: 1 JSC_USELESS_CODE: Suspicious code. This code lacks side-effects. Is there a bug? at line 4437 character 3 in prototype.js

Re: [Prototype-core] Playing with Google's Closure Compiler and got a message for Prototype 1.7.0.0

2011-05-17 Thread Andrew Dupont
I had to look it up, because that's part of Sizzle [1], but accessing that property does have a side effect, apparently. It makes the `selected` property work correctly when something is selected by default. That strikes me as a spurious thing for GCC to warn about — you wouldn't typically

Re: [Prototype-core] Playing with Google's Closure Compiler and got a message for Prototype 1.7.0.0

2011-05-17 Thread Rick Waldron
Andrew, Richard Not sure if this helps, but I figured it was worth the mention... jQuery no longer uses GCC for min/compression... but when we did, we had the warn level set to quiet: https://github.com/jquery/jquery/commit/d503845d0cf45632c0d7c3542ffd1b19257a8e5e#L0L104 Hopefully that's

Re: [Prototype-core] Playing with Google's Closure Compiler and got a message for Prototype 1.7.0.0

2011-05-17 Thread Nicolás Sanguinetti
I like that it warns about *lack* of side effects. I mean, any functional programmer would think that's a great warning to have :) -foca On Tue, May 17, 2011 at 3:24 PM, Rick Waldron waldron.r...@gmail.com wrote: Andrew, Richard Not sure if this helps, but I figured it was worth the mention...