RC-Paves3-build / plovr

Automatically exported from code.google.com/p/plovr
0 stars 0 forks source link

spaces not allowed in goog.require #37

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. use plovr build on a file containing "goog.require( 'goog.dom' );"
2. compare to "goog.require('goog.dom');" NOTE: no spaces!

What is the expected output? What do you see instead?
EXPECTED: <javascript>
ACTUAL:
JSC_MISSING_PROVIDE_ERROR. required "goog.dom" namespace never provided at 
hello.js line 2 : 12
BUILD FAILED: 1 Errors, 0 Warnings

What version of the product are you using? On what operating system?
plovr-0744c5209a34.jar
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)
tested on Windows XP 64-bit and Windows 7 64-bit

Please provide any additional information below.
I describe problem and workaround in detail here:
http://stackoverflow.com/questions/5614752/why-a-jsc-missing-provide-error-in-he
llo-world-plovr-example

Original issue reported on code.google.com by jwfe...@gmail.com on 11 Apr 2011 at 5:39

Attachments:

GoogleCodeExporter commented 8 years ago
OK, I will fix this. It looks like Google's own build scripts account for 
spaces. (See _BASE_REGEX_STRING in 
http://code.google.com/p/closure-library/source/browse/trunk/closure/bin/build/s
ource.py.)

Though this may not be important to you, code written using all those spaces is 
unlikely to pass the Closure Linter checks: 
http://code.google.com/p/closure-linter/

Original comment by bolinf...@gmail.com on 11 Apr 2011 at 1:37

GoogleCodeExporter commented 8 years ago
Too bad spaces are bad, I find it makes code more readable.  Funny you should 
mention closure-linter, that's next on my list to set up.  Does plovr have an 
option to run the linter too?  Thanks for the quick response.

Original comment by jwfe...@gmail.com on 11 Apr 2011 at 2:22

GoogleCodeExporter commented 8 years ago
And you're right about Google's scripts: the code with spaces, built by hand 
with calcdeps.py et al, compiles with no errors using the versions of 
closure-library and closure-compiler I downloaded two days ago.

Original comment by jwfe...@gmail.com on 11 Apr 2011 at 2:25

GoogleCodeExporter commented 8 years ago
plovr doesn't run the linter yet, though it's on my list. I think I want to use 
Jython (http://www.jython.org/) so that users can avoid installing the Python 
runtime to use plovr. Installing Python can be a pain point for Windows users.

Original comment by bolinf...@gmail.com on 11 Apr 2011 at 2:26

GoogleCodeExporter commented 8 years ago
Jython sounds like a good solution, would you add that to the plovr bundle?  I 
like the fact that plovr is a single .jar file.  For anyone experiencing 
"Python pain" now, I can recommend the ActiveState Python distros because they 
come with a Windows installer.

Original comment by jwfe...@gmail.com on 11 Apr 2011 at 3:24

GoogleCodeExporter commented 8 years ago
I forgot to mention, ActivePython 
(http://www.activestate.com/activepython/downloads) is free.

Original comment by jwfe...@gmail.com on 11 Apr 2011 at 3:25

GoogleCodeExporter commented 8 years ago
Fixed in 1950:b76f03f139b5

Original comment by bolinf...@gmail.com on 24 Apr 2011 at 2:27