[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Need mentor for packaging ruby-did-you-mean (RFP #811484)



Control: retitle -1 ITP: ruby-did-you-mean -- "did you mean?" experience for misspelled code in Ruby.

On Tue, Jan 19, 2016 at 01:43:33PM +0100, Hanno Zulla wrote:
> Hi,
> 
> Sonic Pi (ITP #796550) needs the did_you_mean gem (RFP #811484).
> 
> That gem has been bundled with Ruby 2.3 and now ships with the Debian
> ruby2.3 package.

Note that the ruby2.3 package in Debian does *not* ship did_you_mean. It
will _depend_ on ruby-did-you-mean as soon as it gets in the archive,
though.

> However, Sonic Pi needs to stay compatible with Debian ruby2.1 and
> ruby2.2 (https://github.com/samaaron/sonic-pi/issues/928) and therefore
> I need a Debian package of ruby-did-you-mean that works for 2.1 and 2.2,
> but that won't install if ruby2.3 is used.
> 
> No idea how to achieve that. If anyone on this list would want to help,
> I'd appreciate it.

Hi, after out chat on IRC today I have just uploaded ruby-did-you-mean,
but it is the latest version of did_you_mean, which will not work on
Ruby < 2.3.

However, I went to look at the Sonic Pi source, and not having
did_you_mean is not fatal, as the only place where it is explicitly
mentioned is this (app/server/core.rb, line 43):

begin
  require 'did_you_mean'
rescue LoadError
  warn "Non-critical error: Could not load did_you_mean"
end

So if `require 'did_you_mean'` fails -- and it will fail on Ruby < 2.3
-- Sonic Pi seems to just goes ahead and ignores it.

The solution for having did_you_mean working on Ruby < 2.3 would be to
take version 0.10.0. I tried that, but that would require an extra
dependency (interception), which seems to be obsolete because the newer
did_you_mean does not have that dependency anymore (I imagine the needed
features have been added to Ruby 2.3 itself).

-- 
Antonio Terceiro <terceiro@debian.org>

Attachment: signature.asc
Description: PGP signature


Reply to: