diegoles / closure-library

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

JSC_TYPE_PARSE_ERROR. Bad type annotation. Unknown type goog.debug.ErrorHandler at closure/goog/events/events.js line 896 : 11 #493

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago

What steps will reproduce the problem?
(from discussion)
Here's how to reproduce this problem. First, do checkouts of the library and 
the compiler. I use r2099 of the library, and r2079 of the compiler. Build the 
compiler. Make a file, my-js/mymain.js, in it put the following:

goog.provide("mymain");
goog.require("goog.ui.Component");

Then run the following command:

google-closure-library/closure/bin/build/closurebuilder.py --root my-js --root 
google-closure-library --namespace "mymain" -c 
closure-compiler-read-only/build/compiler.jar --output_mode compiled -f 
"--compilation_level=ADVANCED_OPTIMIZATIONS" -f "--jscomp_error=checkTypes"

This will yield the following error:

google-closure-library/closure/goog/events/events.js:896: ERROR - Bad type 
annotation. Unknown type goog.debug.ErrorHandler
 * @param {goog.debug.ErrorHandler} errorHandler Error handler with which to

What version of the product are you using? On what operating system?
CC: r2079
CL: r2029, r2099

Please provide any additional information below.
Discussed here with possible work around: 
https://groups.google.com/forum/?fromgroups=#!topic/closure-library-discuss/ewno
n-7n97E

The fix seems to be to add the following to events.js:
goog.require('goog.debug.ErrorHandler');

Note: we cannot accept patches without the contributor license agreement
being signed. See http://code.google.com/p/closure-
library/wiki/Contributors for more info.

Original issue reported on code.google.com by Bitwise...@gmail.com on 29 Aug 2012 at 3:07

GoogleCodeExporter commented 8 years ago
And yes, I see what was said in the FAQ, but this seems like a different 
problem.    My compilation includes the everything under closure library, which 
should include the deps.js file, but the error remains.  The require() call is 
missing from this file and the unit test doesn't catch the issue because it has 
the require() call that is missing from events.js.

Original comment by Bitwise...@gmail.com on 29 Aug 2012 at 3:38

GoogleCodeExporter commented 8 years ago
Here's a proposed fix: http://codereview.appspot.com/6506048/

Original comment by Bitwise...@gmail.com on 29 Aug 2012 at 3:51

GoogleCodeExporter commented 8 years ago

Original comment by pall...@google.com on 30 Aug 2012 at 7:49