[MacRuby-devel] Compiled Ruby files

Robert Rice rice.audio at pobox.com
Tue Nov 9 12:47:42 PST 2010


Hi Laurent:

Did you decide not to make this change? I just tested it and my subdirectory *.rb files did not compile.

Thanks,
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/20101109/452cb4c4/attachment.html>


More information about the MacRuby-devel mailing list