thanhlong203 / closure-library

Automatically exported from code.google.com/p/closure-library
0 stars 0 forks source link

closurebuilder.py's -f flags don't work in Windows #164

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
If you run closurebuilder.py and try to specify compiler args via -f in Windows 
(at least w/ Python 2.5.4), the compiler fails due to the way the argument is 
passed. Here's an example of a command and the error I'm seeing  when I try 
passing in a compiler flag:

---------

closurebuilder.py --root [...] -c X -o compiled -f "-D 
goog.userAgent.ASSUME_GECKO"
...
Compiling with the following command: java -jar ... -D 
goog.userAgent.ASSUME_GECKO ...
"-D goog.userAgent.ASSUME_GECKO" is not a valid option

---------

I've attached a simple patch that fixes this for Windows. It assumes that there 
won't be any spaces in the argument value. I didn't test on Mac / Linux.

Original issue reported on code.google.com by amat...@gmail.com on 11 Jun 2010 at 10:39

Attachments:

GoogleCodeExporter commented 8 years ago
Apologies for the extra noise, but I realized that there are a few parameters 
that'd be useful to pass to the compiler that have spaces in them (namely, 
externs). Adding a 1 as the second argument of the flag.split will allow those 
spaces through.

Original comment by amat...@gmail.com on 11 Jun 2010 at 11:53

GoogleCodeExporter commented 8 years ago
This remains a bug in the latest version

Original comment by amat...@gmail.com on 4 Mar 2011 at 4:11

GoogleCodeExporter commented 8 years ago

Original comment by nn...@google.com on 25 Apr 2011 at 11:09

GoogleCodeExporter commented 8 years ago

Original comment by nn...@google.com on 23 Apr 2012 at 9:52

GoogleCodeExporter commented 8 years ago

Original comment by chrishe...@google.com on 15 May 2012 at 10:57