-
Notifications
You must be signed in to change notification settings - Fork 570
closure compiler #134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Post Scriptum: I tried setting the level to WHITESPACE_ONLY and discovered that the line where the error occurs is in the deadlock detection ( if (goroutine.asleep&&!rescheduled) {
$awakeGoroutines--;
if ($awakeGoroutines === 0 && $totalGoroutines !== 0 && $checkForDeadlock)
console.error("fatal error: all goroutines are asleep - deadlock!")
} |
Can you give me more information on how to change the output to be compatible with the closure compiler? |
Stale issue. Feel free to reopen. |
You'd need to start here: https://developers.google.com/closure/compiler/docs/limitations#restrictions-for-all-optimization-levels The big one I can think of is that exported functions have to be referenced by string instead of normal function name: obj = {}
obj.foo = function() {};
// becomes
obj['foo'] = function() {};
// ... if you want .foo to be accessible outside of the scope of the compiler ClojureScript does rely heavily on this compiler to:
|
I was experimenting with trying to get the size of pages down by using the ClosureCompiler and hoping to compile my pages with gopherjs first, then use closure to compile the result plus jquery into a single, smaller js file.
It appears that either gopherjs or the combination of gophers + jquery is doing something too aggressive for closure. Here are the report steps (it dies inside what appears to be some part the gopherjs runtime).
And this is the simple go file:
Here is the closure command (using the java-based command line tool):
java -jar $CLOSURE_JAR --compilation_level ADVANCED_OPTIMIZATIONS --js bugrep.js /path/to/js/static/fixed/jquery-2.1.1.js --js_output_file=bugrep.js.compiled
. The problem seems to also occur if the optimization level isSIMPLE_OPTIMIZATIONS
.Anybody gotten this to work?
thanks
ian
The text was updated successfully, but these errors were encountered: