Closure Compiler problem, it fails to run

108 views
Skip to first unread message

Wayne Fulton

unread,
May 18, 2023, 1:08:58 AM5/18/23
to Closure Compiler Discuss
I posted here about 3 weeks into Feb 2023 with the same problem as now.  Then the problem had lasted several months.    I got no response, and it was never posted, which is OK because the problem was about immediately corrected, and it was very nice again.  So someone here is interested. and I really appreciated the correction.

But the last few days, the same problem has come back, hopefully maybe someone is still interested.  Seems a real shame to let it go on.  I use it a lot with a couple dozen programs, so I do know how it used to work.  I love it,  it's great, when it runs.

Running the free version if that matters, the problem is that clicking to run the Closure Compiler essentially always fails. It is rare that is not true.  After about a 40 second time out, it returns a dialog box saying Error -1, and seems to repeat my source, but encoded so I cannot read it.  It continually repeats that, so it seems no way one click is going to work.  I would think that would be widely noticed.    I found then that I could click twice to start it (not a double click, but two distinct clicks separated by a fraction of a second) and that was not failsafe, but it was much better, taking only a few more retries to get it done.   I had to get the first fairly quick, because there was a second coming that fails.    And then it was quickly fixed, and became real nice again.  Really pleasant.

But the last several days on, the same problem has come back.  It is persistent again.   A single click still always fails, but now it usually only takes 2 or 3 double click tries now, which is about bearable, but it seems a rather serious issue, so I thought someone would want to know.  In my case, it is 100% repeatable, both during busy USA workday hours, or on Sunday afternoon.

When I have a syntax error in the Javascript, it fails legitimately very much faster, so the issue is further down the pipe.   Hopefully the fix can be restored again.  Thank you.

John

unread,
May 18, 2023, 1:12:34 AM5/18/23
to Closure Compiler Discuss
It sounds like you are using the closure-compiler.appspot.com website.  Is that what you are talking about?  If so, We really encourage folks to use the command-line version for anything more that playing around.    Is that an option for you?

Wayne Fulton

unread,
May 18, 2023, 11:43:45 AM5/18/23
to Closure Compiler Discuss
Yes, I am using https://closure-compiler.appspot.com/ website.
 I find a mention that command line is a Java based app, but don't see a link to find it.
I will try to find that, but am going to regret adding Java to my computer.  The web app sure is convenient, and it does wonderful things, and  it does seem like Google would prefer their apps to actually run. Very puzzling why this is not a huge thing for everyone.
Thanks for the reply.

John

unread,
May 18, 2023, 11:50:03 AM5/18/23
to Closure Compiler Discuss
Unless you have an unusual system you can do without java, you should be able to use the standard npm as per https://github.com/google/closure-compiler#getting-started 

We have been including "native-image" builds for linux, mac and windows for a few years now that can run without any other runtimes (such as java).   You do have the option of using Java if the native images don't work for some reason.    If you have large compilations (that take more than a minute to compile) the Java version will perform better (https://github.com/facebookarchive/nailgun can help with the warmup typically associated with restarting java processes)

Wayne Fulton

unread,
May 18, 2023, 2:36:07 PM5/18/23
to Closure Compiler Discuss
Sorry, I think there may be no help for me.  :)  I am a retired programmer (years ago), and thought I knew a few things, but  I had a really hard time deciphering the Google instructions to use the Closure Compiler, until I finally figured out the one line I needed,  which was:   "Put into the Javascript a line: 
    window["called_name"] = function_name; for every function that will be externally called. Strikes me that is the single instruction needed, but it was well hidden, and a big mystery for a long time. :)

But you said npm, so I tried clicking whatever that is, and guessed CLI or Commander, but nothing I find there mentions a Windows Closure Compiler app. I'm afraid all the Google terms have no meaning for me.
Reply all
Reply to author
Forward
0 new messages