[MacRuby-devel] Compiled Ruby files

Robert Rice rice.audio at pobox.com
Fri Nov 5 13:43:59 PDT 2010


Hi Laurent:

Thanks.

The other problem I ran into trying to use blue folders was that XCODE would not compile .XIB files into .NIB files for subdirectories of the Resources folder. Could I change this behavior?

MacRuby has become stable and fast but if I have a program error that loops, it will consume memory until the Finder crashes (requiring a reboot). Would it be possible to set a limit on the call stack depth to generate an error before the system crashes?

Bob Rice


On Nov 3, 2010, at 5:42 PM, Laurent Sansonetti wrote:

> Hi Robert,
> 
> At a glance, it will only compile .rb files in the Resources directory itself, not subdirectories.
> 
>   def compile_files
>     Dir.glob(File.join(@app_bundle, 'Contents/Resources/*.rb'))
>   end
> 
> I guess we could change it to
> 
>     Dir.glob(File.join(@app_bundle, 'Contents/Resources/**/*.rb'))
> 
> without breaking anything, and without the need to add an option to the tool.
> 
> Laurent
> 
> On Nov 3, 2010, at 2:35 PM, Robert Rice wrote:
> 
>> Hi Laurent:
>> 
>> Does macruby_deploy have an option to compile .rb files in subdirectories of the Resources directory? For a large project some of us may want to better organize our source files.
>> 
>> Thanks,
>> Bob Rice
>> 
>> 
>> On Nov 2, 2010, at 4:25 AM, Laurent Sansonetti wrote:
>> 
>>> Hi Larry,
>>> 
>>> Indeed, the Ruby standard library is not entirely compiled, so you will find .rb files if the MacRuby framework is embedded into the application's bundle. We don't compile the whole standard library for historical reasons, as the AOT compiler wasn't stable enough to work on everything, but we may finally turn the switch on in the upcoming release.
>>> 
>>> However, your application's code should be compiled, and .rb files should be removed from the .app bundle for you, by macruby_deploy. If you still do find .rb files that belong to your project in the .app bundle, then there is a bug somewhere.
>>> 
>>> To confirm, yes it is okay to delete .rb files when there is a .rbo file in the same directory. More generally, MacRuby's #require will always pick .rbo files in priority over .rb files.
>>> 
>>> Laurent
>>> 
>>> On Nov 1, 2010, at 9:33 PM, Larry Wilson wrote:
>>> 
>>>> I've been poking around in the directories of a MacRuby-based app (that has been compiled via macruby-deploy) in the usr/lib/ruby subdirectories.  Why is there not an .rbo file for every .rb source file?  
>>>> 
>>>> Is it safe to delete the .rb files if there is a .rbo equivalent?
>>>> 
>>>> -Larry
>>>> 
>>>> _______________________________________________
>>>> MacRuby-devel mailing list
>>>> MacRuby-devel at lists.macosforge.org
>>>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>> 
>>> _______________________________________________
>>> MacRuby-devel mailing list
>>> MacRuby-devel at lists.macosforge.org
>>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>> 
>> _______________________________________________
>> MacRuby-devel mailing list
>> MacRuby-devel at lists.macosforge.org
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> 
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20101105/b3992112/attachment.html>


More information about the MacRuby-devel mailing list