|
From: | Laurent Julliard |
Subject: | Re: [FR-devel] Managing Ruby extensions and FreeRIDE |
Date: | Mon, 16 Sep 2002 09:41:15 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826 |
Rich Kilmer wrote:
FreeRIDE team, I have been thinking about coming up with a standard way to wrap Ruby extension libraries (site_ruby stuff) as plugins (such as log4r, rexml, fxruby, etc). In order to do this we need to control the ruby path ($:). The concept is something along these lines (path names are examples) Ruby path ($:) is reduced to:$: = ["c:/ruby/lib/ruby/1.7", "c:/ruby/lib/ruby/1.7/i386-mswin32", "."] Notice there are no references to the site_ruby directory. Then, as aplugin is loaded its directory is added to the Ruby path: c:/freeride/plugins/rexml2.4.0/plugin.xml .../rexml_plugin.rb .../rexml/(all rexml files) After this plugin is loaded, the new path looks like: $: = ["c:/freeride/plugins/rexml2.4.0", "c:/ruby/lib/ruby/1.7", "c:/ruby/lib/ruby/1.7/i386-mswin32", "."] So, if in your code you added the dependency on REXML then you would not load without it, and to access rexml you would still just have: require 'rexml/document' # or whatever... This would mean that EVERY library that is used in FreeRIDE would have to be packaged as a plugin...the upside is FreeRIDE/FreeBASE plugins have (or will have ;-) version capability and dependency management. The actual "packaging" is brain-dead simple. Just copy what would be in the site_ruby/1.7 directory into the plugin directory (with the .so files in the root of the plugin's directory. This packaging of libraries as plugins is the way the Eclipse project works (in Java) for the exact same reason.
Your idea goes one step beyond what we have where all extensions library that we use is supposed to be in freeride\redist. By the way do we have to move everything in freeride/plugins or can we keep things in redist. I like the idea of making the distinction between FR plugins and extension plugins
I also want to add into FreeBASE the ability to specify the platform that the plugin runs on...that way we could have Linux plugins and Win32 plugins (and OS X plugins...some day :-) all sitting on the same machine, but those compiled for other platforms would never load.
This is a must have!!
We could do this on an existing Ruby installation by chopping everything except the core library directories out of the $: path upon FreeRIDE loading, or distributing our own version of Ruby with FreeRIDE. Thoughts?
I can not agree more, Given the nightmare I have gone through over the last days trying to make the FR Debugger run on Win32 I think it is almost obligatory that we distribute Ruby with FR. Ruby 1.7.x on mswin32 seems to be too unstable to let the users use their own version.
This being said may be we don't need to package Ruby to start with just point to a zip version that we keep somewhere which is known to work. It would save some space and make the FR application smaller to download especially in the development phase.
Laurent
-Rich _______________________________________________ Freeride-devel mailing list address@hidden http://mail.freesoftware.fsf.org/mailman/listinfo/freeride-devel
-- Laurent JULLIARD - Xerox R&T/SSTC/XPA - Open Source team >> Host your Xerox Software project on CodeX: http://codex.xerox.com >> address@hidden community: http://xww.linux.world.xerox.com
[Prev in Thread] | Current Thread | [Next in Thread] |