Narwhal Spins a Long Time

18 views
Skip to first unread message

Keary Suska

unread,
May 2, 2017, 1:32:51 PM5/2/17
to objec...@googlegroups.com
Is there any way to put narwhal in a verbose state to find out what it may be choking on? I have the following in my console:

5/2/17 11:07:35.698 AM XcodeCapp[47463]: Task launched: /Users/aksuska/narwhal/bin/objj
(
"--xml",
"-I",
"/Users/aksuska/Dropbox/Repositories/CERTS/Frameworks/Debug",
"/Users/aksuska/Dropbox/Repositories/CERTS/AppController.j"
)

It has so far been running on that single file for about 25 minutes now. I think it may eventually stop but usually I just quit XcodeCapp.

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"

Martin Carlberg

unread,
May 3, 2017, 3:01:10 AM5/3/17
to objec...@googlegroups.com
Hi!

The first thing that comes into my mind is that when we compile Objective-J code we load everything into the runtime. This means that any code that is on the base level in a Objective-J file will be executed.

So if you type "while (true);" on a line outside of functions and class declarations (for example on the first line of the file) the compiler will just loop. It does not need to be this obvious as you can have any javascript code that will be executed. The narwhal process should spends 100% cpu when it is running as I guess it is.

Try to temporary remove any code that is outside functions and class declarations and check if it will not choke.

You can also add ”print” statements on the base level inside the file to see how far the compilation has progressed. For example: 'print(”Martin was here”);’


- Martin

--
You received this message because you are subscribed to the Google Groups "Cappuccino & Objective-J" group.
To unsubscribe from this group and stop receiving emails from it, send an email to objectivej+...@googlegroups.com.
To post to this group, send email to objec...@googlegroups.com.
Visit this group at https://groups.google.com/group/objectivej.
For more options, visit https://groups.google.com/d/optout.

Keary Suska

unread,
May 4, 2017, 12:58:10 PM5/4/17
to objec...@googlegroups.com

> On May 3, 2017, at 1:01 AM, Martin Carlberg <mar...@oops.se> wrote:
>
> Hi!
>
> The first thing that comes into my mind is that when we compile Objective-J code we load everything into the runtime. This means that any code that is on the base level in a Objective-J file will be executed.
>
> So if you type "while (true);" on a line outside of functions and class declarations (for example on the first line of the file) the compiler will just loop. It does not need to be this obvious as you can have any javascript code that will be executed. The narwhal process should spends 100% cpu when it is running as I guess it is.

It has not, actually. Never exceeded around a few percent.

> Try to temporary remove any code that is outside functions and class declarations and check if it will not choke.
>
> You can also add ”print” statements on the base level inside the file to see how far the compilation has progressed. For example: 'print(”Martin was here”);’

I ran it via the command line and it appears to be a bug in XcodeCapp bug. It completed fine but carped about a large number of missing identifiers (just needed @global defines). For whatever reason, XcodeCapp is not reporting these errors at all as it spans numerous source files I have been actively working on without a single message. I will file a bug.
Reply all
Reply to author
Forward
0 new messages