[txmt-dev] Re: Yosemite breaks some bundles

Attila Györffy attila.gyorffy at gmail.com
Tue Jun 17 16:08:23 UTC 2014


Thanks for the reply Allan.

I think you are right and the ‘Current’ symlink is indeed there on previous versions of Mac OS X. (Just checked it on Lion).

Having said that, I’d like to know what’s stopping us from using that Ruby interpreter (let it be 1.8 or 2.0 or anything further) in Bundles? I’m a little bit unsure about the benefits of bundling an old and retired version of Ruby (EOL last year) with TextMate itself in case we can write the bundles in such ways that they will work on both interpreters.

Assuming that the migration work to update the code to work on 2.0 (as well as 1.8) is relatively seamless, what’s stopping us from relying on the Bundled system Ruby?

Cheers,

— Attila

-- 
Attila Györffy
Sent with Airmail

From: Allan Odgaard mailinglist at textmate.org
Reply: TextMate developers textmate-dev at lists.macromates.com
Date: 14 Jun 2014 at 13:13:25
To: TextMate developers textmate-dev at lists.macromates.com
Subject:  [txmt-dev] Re: Yosemite breaks some bundles  

On 4 Jun 2014, at 23:18, Attila Györffy wrote:

Sorry about the late reply.

I know this is a little bit early to start talking about the new OS X but I’m an early adopter and try to fix issues that arise prior to the final release so the time most people upgrade, tools that mean a lot to me (like TextMate itself) can be used without having to worry a lot.

Appreciated — Not yet on 10.10 myself.

[…] 1.8 is gone and has been replaced with a ‘Current’ symlink that (as of writing) points to version 2.0 (I guess this could be Apple’s move to support new default Rubies later on in a consistent manner.)

I believe the Current symlink has always existed.

So we have these options:

Include our own ruby 1.8 (for 10.10 users) and update all shebangs to find that.

Include our own ruby 2.0 (for 10.7 & 10.8) and update all shebangs plus code to run on 2.0.

Use Current and ensure all code works on both 1.8 and 2.0.

For a quick fix I am leaning toward option #1. Long-term we should do #2.

I think option #3 is a little painful and will require testing against RUBY_VERSION for some code.

Allan, how can I start working on this?

Step One

We need to create a new bundle and package ruby 1.8 into that bundle’s Support folder. The binary should be named ruby18 (or similiar distinctive name).

The bundle should then include a setting that sets PATH to $PATH:$TM_BUNDLE_SUPPORT/ruby18/bin.

All ruby shebangs then need to be updated to use #!/usr/bin/env ruby18.

Step Two

Add ruby 2.0 to the same bundle and to the PATH as well.

Step Three

Update ruby code in the bundle-support bundle to work on both 1.8 and 2.0. This will be required unless we migrate all commands at once.

Step Four

Update other ruby code to work on 2.0 and update the shebang to #!/usr/bin/env ruby20.

_______________________________________________  
textmate-dev mailing list  
textmate-dev at lists.macromates.com  
http://lists.macromates.com/listinfo/textmate-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate-dev/attachments/20140617/6e361b95/attachment.html>


More information about the textmate-dev mailing list