Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Closure Compiler and version 0.23
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  9 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Billy  
View profile  
 More options Feb 21 2011, 5:10 pm
From: Billy <mattmwhee...@gmail.com>
Date: Mon, 21 Feb 2011 14:10:19 -0800 (PST)
Local: Mon, Feb 21 2011 5:10 pm
Subject: Closure Compiler and version 0.23
I just checked out the sample project and changed the app.build.js
optimize property to "closure".  I then went to the webapp/scripts
directory and ran ..\..\requirejs\build\buildj.bat app.build.js and I
get the following error (in the "Tracing dependencies for : jquery"
phase):

js: uncaught JavaScript runtime exception: TypeError: Cannot call
method "invoke
" of undefined

However, it works if I set the optimize property to "uglify" or
comment it out (which should of course be tthe same thing).

Debugging through the optimize.js file, I noticed that
JSSourceFilefromCode is undefined, so return
JSSourceFilefromCode.invoke(null, [filename, content]); fails.  It
also appears that the call to initialize JSSourceFilefromCode -
java.lang.Class.forName('com.google.javascript.jscomp.JSSourceFile').getMet hod('fromCode',
[java.lang.String, java.lang.String]); throws a
java.lang.ClassNotFoundException.

However it appears that JSSourceFile is in the closure.jar and appears
to be the same number of bytes as the one in my older version of
require, telling me that it probably did not change.  Anyway, has
anyone else run into this, and if so, does anyone have any ideas on
what the root cause might be?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Billy  
View profile  
 More options Feb 21 2011, 5:30 pm
From: Billy <mattmwhee...@gmail.com>
Date: Mon, 21 Feb 2011 14:30:41 -0800 (PST)
Local: Mon, Feb 21 2011 5:30 pm
Subject: Re: Closure Compiler and version 0.23
Also, I forgot to mention, I am running on Windows XP (and don't say
"well there is the problem right there" - I have already heard that :)
with Java 1.6.

On Feb 21, 3:10 pm, Billy <mattmwhee...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Burke  
View profile   Translate to Translated (View Original)
 More options Feb 22 2011, 2:26 am
From: James Burke <jrbu...@gmail.com>
Date: Mon, 21 Feb 2011 23:26:16 -0800
Local: Tues, Feb 22 2011 2:26 am
Subject: Re: [requirejs] Closure Compiler and version 0.23

On Mon, Feb 21, 2011 at 2:10 PM, Billy <mattmwhee...@gmail.com> wrote:
> I just checked out the sample project and changed the app.build.js
> optimize property to "closure".  I then went to the webapp/scripts
> directory and ran ..\..\requirejs\build\buildj.bat app.build.js and I
> get the following error (in the "Tracing dependencies for : jquery"
> phase):

> js: uncaught JavaScript runtime exception: TypeError: Cannot call
> method "invoke
> " of undefined

Thanks for the report! There is definitely a bug. I did some Windows
testing before release, but unfortunately it was with no optimization
or with uglify. I am not passing the closure.jar in the batch scripts,
and it looks like there is a logger error too. I'll work on a fix, I
plan on getting it done tomorrow (may be tomorrow evening, Pacific
time).

James


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Burke  
View profile   Translate to Translated (View Original)
 More options Feb 23 2011, 1:25 am
From: James Burke <jrbu...@gmail.com>
Date: Tue, 22 Feb 2011 22:25:00 -0800
Subject: Re: [requirejs] Closure Compiler and version 0.23

On Mon, Feb 21, 2011 at 2:10 PM, Billy <mattmwhee...@gmail.com> wrote:
> js: uncaught JavaScript runtime exception: TypeError: Cannot call
> method "invoke
> " of undefined

This is fixed in this commit:
https://github.com/jrburke/requirejs/commit/739e980e421e5d5030cf54e12...

I uploaded a new zip of the jquery sample project with this change, it
is available here (will go away at some point, probably after the 0.24
release):
http://requirejs.org/temp/jquery-require-sample.zip

Thank you very much for the error report. It turns out I broke closure
minifying on all systems. This change fixes it for all systems.

James


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Billy  
View profile  
 More options Feb 23 2011, 11:51 am
From: Billy <mattmwhee...@gmail.com>
Date: Wed, 23 Feb 2011 08:51:45 -0800 (PST)
Local: Wed, Feb 23 2011 11:51 am
Subject: Re: Closure Compiler and version 0.23
Thank you, for such a quick fix and for an awesome product!

On Feb 22, 11:25 pm, James Burke <jrbu...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chintan Desai  
View profile  
 More options Jul 23 2012, 2:32 pm
From: Chintan Desai <cd.chin...@gmail.com>
Date: Mon, 23 Jul 2012 11:32:42 -0700 (PDT)
Local: Mon, Jul 23 2012 2:32 pm
Subject: Re: Closure Compiler and version 0.23

I am seeing the same error "TypeError: Cannot call method "invoke" of
undefined" when changing the *optimize* option to *closure. *It works fine
with the default option which I believe is using "UglifyJS"? Correct me if
I am wrong.

I am using requiresjs 2.0.2 with r.js from jquery-requirejs sample project.

Please advise

Thanks


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Burke  
View profile  
 More options Jul 24 2012, 7:57 pm
From: James Burke <jrbu...@gmail.com>
Date: Tue, 24 Jul 2012 16:57:20 -0700
Local: Tues, Jul 24 2012 7:57 pm
Subject: Re: [requirejs] Re: Closure Compiler and version 0.23
Hmm, I just tried this too in the require-jquery project, and got a
similar error. I wonder if I need to update the interface I use to
closure compiler. I filed this bug to track a fix for 2.0.5:

https://github.com/jrburke/r.js/issues/238

Feel free to add any more details to that bug, or even just the
version of closure compiler in use. I'm wondering if the interface
changed.

A workaround for now would be to run closure compiler separately and
directly, after r.js runs.

James


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chintan Desai  
View profile  
 More options Jul 26 2012, 2:12 am
From: Chintan Desai <cd.chin...@gmail.com>
Date: Wed, 25 Jul 2012 23:12:12 -0700 (PDT)
Local: Thurs, Jul 26 2012 2:12 am
Subject: Re: [requirejs] Re: Closure Compiler and version 0.23

Thanks for the reply James

I used the compiler.jar included in the project and also the latest jar
from closure project which was " compiler-20120710.zip". I updated the bug
with this information too.

I am little confused about the workaround that you mentioned. Do you mean I
should run r.js with default optimize option first and then do the same by
running closure compiler?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Burke  
View profile  
 More options Jul 26 2012, 2:50 am
From: James Burke <jrbu...@gmail.com>
Date: Wed, 25 Jul 2012 23:50:58 -0700
Local: Thurs, Jul 26 2012 2:50 am
Subject: Re: [requirejs] Re: Closure Compiler and version 0.23

On Wed, Jul 25, 2012 at 11:12 PM, Chintan Desai <cd.chin...@gmail.com> wrote:
> I used the compiler.jar included in the project and also the latest jar from
> closure project which was " compiler-20120710.zip". I updated the bug with
> this information too.

Thanks.

> I am little confused about the workaround that you mentioned. Do you mean I
> should run r.js with default optimize option first and then do the same by
> running closure compiler?

Sorry, I meant use optimize: 'none' to skip minification in r.js, then
do the closure compiler pass after r.js completes. Of course if you
are OK with the default minifier, uglifyjs, then you can leave out any
optimize: option in the build options to get that.

James


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »