You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Patrick Mueller <pm...@gmail.com> on 2012/03/22 21:58:15 UTC

landed [CB-280] Improve layout of cordova-js scripts

What this means is you should pull the incubator-cordova-js git repo to get
the latest changes.

If you have a commit you've been working on for a while, but hadn't
committed, your merge is going to be a little icky because most of the
files in lib/ have moved.

I managed to run mobile-spec for iOS, but not Android.  Eclipse AND adb
were both pissy this morning, couldn't get adb to attach to emulators, and
didn't otherwise know how to install an .apk I had on my disk.

Let me know if you have any issues with the pkg/cordova.<platform>.js files
(that you're building)!

-- 
Patrick Mueller
http://muellerware.org

Re: landed [CB-280] Improve layout of cordova-js scripts

Posted by Patrick Mueller <pm...@gmail.com>.
On Thu, Mar 22, 2012 at 17:21, <gt...@gmail.com> wrote:

> Dude!
>
> +100000000000000
>

Yes, you are one of the lucky few to get to use REAL Web Inspector for your
platform, so this >should< help you.  As I recently commented on the
html5rocks blog post, //@sourceurl support has been spotty over the years.
 I think it's currently broken on desktop Safari, fer instance, or at least
was in a recent-ish release.

Good news for you, if it's b0rken on playbook, you should be able to find
someone to fix it for you ;-)

-- 
Patrick Mueller
http://muellerware.org

Re: landed [CB-280] Improve layout of cordova-js scripts

Posted by gt...@gmail.com.
Dude!

+100000000000000
Sent on the TELUS Mobility network with BlackBerry

-----Original Message-----
From: Patrick Mueller <pm...@gmail.com>
Date: Thu, 22 Mar 2012 17:17:01 
To: callback-dev<ca...@incubator.apache.org>
Reply-To: callback-dev@incubator.apache.org
Subject: Re: landed [CB-280] Improve layout of cordova-js scripts

One of the things you'll notice when you do a build in
incubator-cordova-js, is that we build "debug" versions of all the
platforms.  This is intended as an aid for debugging.  See [1]  and [2]
(the //@sourceurl bits, not the sourcemap bits).  We don't need to ship
these, but these might help you out if you want to, and can, debug for your
platform.  You'll see the individual files in the debugger instead of the
big concatenated mess.  The debug versions will also quickly show you what
the components of the concatenated files are, since it's one module per
line.

Browserify makes use of the same trick.

And, turns out, this helps out with debugging 'jake test' as well.  Totally
blew my mind, as I was getting some exceptions in there yesterday, but the
stack traces were total crap [3].  I tried using the 'debug' version of the
'test' platform and - whoa - all the stack traces had real file names and
line numbers!  Turns out, internally, even v8 takes advantage of the
//@sourceurl "pragma".

I think I noticed the line numbers were one or two off; need to remove the
extra \n chars in the modules we're generating, or something.  Will fix
later.

[1]
http://pmuellr.blogspot.com/2011/11/debugging-concatenated-javascript-files.html
[2] http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/
[3] https://gist.github.com/2146664

-- 
Patrick Mueller
http://muellerware.org


Re: landed [CB-280] Improve layout of cordova-js scripts

Posted by Patrick Mueller <pm...@gmail.com>.
One of the things you'll notice when you do a build in
incubator-cordova-js, is that we build "debug" versions of all the
platforms.  This is intended as an aid for debugging.  See [1]  and [2]
(the //@sourceurl bits, not the sourcemap bits).  We don't need to ship
these, but these might help you out if you want to, and can, debug for your
platform.  You'll see the individual files in the debugger instead of the
big concatenated mess.  The debug versions will also quickly show you what
the components of the concatenated files are, since it's one module per
line.

Browserify makes use of the same trick.

And, turns out, this helps out with debugging 'jake test' as well.  Totally
blew my mind, as I was getting some exceptions in there yesterday, but the
stack traces were total crap [3].  I tried using the 'debug' version of the
'test' platform and - whoa - all the stack traces had real file names and
line numbers!  Turns out, internally, even v8 takes advantage of the
//@sourceurl "pragma".

I think I noticed the line numbers were one or two off; need to remove the
extra \n chars in the modules we're generating, or something.  Will fix
later.

[1]
http://pmuellr.blogspot.com/2011/11/debugging-concatenated-javascript-files.html
[2] http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/
[3] https://gist.github.com/2146664

-- 
Patrick Mueller
http://muellerware.org

Re: landed [CB-280] Improve layout of cordova-js scripts

Posted by Filip Maj <fi...@adobe.com>.
>I managed to run mobile-spec for iOS, but not Android.  Eclipse AND adb
>were both pissy this morning, couldn't get adb to attach to emulators, and
>didn't otherwise know how to install an .apk I had on my disk.

Ran mobile-spec with the new android file, 758 passed out of 772 on a
Galaxy Nexus running 4.0.2. Looking good :)