From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Status: No, score=-2.6 required=3.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, URIBL_BLOCKED shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: unicorn-public@bogomips.org Received: from mail-pa0-f45.google.com (mail-pa0-f45.google.com [209.85.220.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id E5AF62021D for ; Fri, 8 Jan 2016 21:50:49 +0000 (UTC) Received: by mail-pa0-f45.google.com with SMTP id yy13so195835025pab.3 for ; Fri, 08 Jan 2016 13:50:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tenderlovemaking-com.20150623.gappssmtp.com; s=20150623; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=6pwchYCNp32VC5hvlHZxXKThK0OCKpXvruJyUQ09R7M=; b=2Lktbps5aH7T2lzayMSBM0x69680CVwKGJQtxBngVYPbui7Fg5wAGerynx1iLqsFIW 4cFJbui5JvK5E91sJpE9N5ojciQ02MkYf5ml+Po9xVb77VS8ggtOrpAmA1FhBRQ5Qf0B 4i8KXpADX+yF+MPri+VEpLmEJHrsS7entzC/JXEtDSm0sslU4NaOXjVN5b/Zz5rOcDcM fhHoPpbCK/pA2OLRPPBnLenuqnaRz76H0h0t9jd4X3DTebGyI/rcd7kA8VLRov59TlAt LKLJzwUCmU/M01BEOrzrh7YY0j2ToZ067s8U4gIwy+pkyvnUDh0GRAzGlxQCIs5vwCzZ 2vEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=6pwchYCNp32VC5hvlHZxXKThK0OCKpXvruJyUQ09R7M=; b=c6re2hgKQlLW7zeehdL5JraMUK8Z6IbTgDw3rqJNCQodxTcu8FI9oohLZSF/6vlkNk hj+g1kviDWS1VH0V0yUh90g6o6oc7kDmvKN2jKpoeYEA/nE8M7X0JQtHX7LiYeOeWoim lq0K+u7GSvycYV/HFORKHzUX/zf8S97dnTvjfHll0hhUKUUgs8klb1NLyJZESmZ/p0x/ iXxoNTr7rJDQlPIx5yY0dNmTMxejAlBP6E4OZUGVh55vFdr8/H/N7BfbeZhG9sPnZpbn aGOVBAv/94ny419WvgvPE/R0SUJDhGkTAsiGGiVY8KS1tWRPXLuI+g6ojbyQG4+E83/9 wrEg== X-Gm-Message-State: ALoCoQlGvmR41AxlWnQTXeYkRYi+tLAqnmlbjIqxsKdKRmkRLGLlvRmqUd6unn7ugfajhNebKx3IT5e4RmNdVAzuY38mWEQ1+g== X-Received: by 10.66.222.101 with SMTP id ql5mr162721146pac.144.1452289849295; Fri, 08 Jan 2016 13:50:49 -0800 (PST) Received: from TC.local (c-24-56-229-227.customer.broadstripe.net. [24.56.229.227]) by smtp.gmail.com with ESMTPSA id ud10sm169280800pab.27.2016.01.08.13.50.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Jan 2016 13:50:48 -0800 (PST) Sender: Aaron Patterson Date: Fri, 8 Jan 2016 13:50:46 -0800 From: Aaron Patterson To: rack-devel@googlegroups.com Cc: Adam Duke , unicorn-public@bogomips.org Subject: Re: [PATCH] limit rack version for ruby compatibility Message-ID: <20160108215046.GA36373@TC.local> References: <20160108191807.GA30703@dcvr.yhbt.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="IJpNTDwzlM2Ie8A6"; micalg="pgp-sha1"; protocol="application/pgp-signature" Content-Disposition: inline In-Reply-To: <20160108191807.GA30703@dcvr.yhbt.net> User-Agent: Mutt/1.5.23 (2014-03-12) List-Id: --IJpNTDwzlM2Ie8A6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 08, 2016 at 07:18:07PM +0000, Eric Wong wrote: > Adam Duke wrote: > > From: Adam Duke > > Date: Fri, 8 Jan 2016 13:06:31 -0500 > > Subject: [PATCH] limit rack version for ruby compatibility > >=20 > > rack introduced a dependency on ruby 2.2.2 or greater in > > https://github.com/rack/rack/commit/771d94e5dbe53058160a1f8a4cc56384c1d= 2a048 >=20 > Cc-ing rack-devel + Aaron >=20 > Yikes! ruby-core still supports Ruby 2.1 and possibly even 2.0.0 >=20 > And there doesn't seem to be any documentation on why Ruby 2.2.x > is needed in the first place for rack.git > commit a2fe30a5e70371c89c1b29fdc2dc5f8027bc5fe6 >=20 > http://bogomips.org/mirrors/rack.git/patch?id=3Da2fe30a5e70371c8 >=20 > Aaron? The main reason I bumped it up to Ruby 2.2.x is because that will be the minimum version of Ruby I'll be stuck with throughout Rack 2.x's lifetime. IOW, I can't drop Ruby versions in anything but a major release so I'm being conservative and only going with the latest (at the time that was 2.2). I could be convinced to bring down the version number, but I'd like to know why first. :) > > In order to maintain support for ruby versions less than 2.2.2, limit > > the rack dependency to supported versions for the current ruby. > > --- > > unicorn.gemspec | 6 +++++- > > 1 file changed, 5 insertions(+), 1 deletion(-) > >=20 > > diff --git a/unicorn.gemspec b/unicorn.gemspec > > index 1099361..ce7080a 100644 > > --- a/unicorn.gemspec > > +++ b/unicorn.gemspec > > @@ -35,7 +35,11 @@ > > # up/downgrade to any other version, the Rack dependency may be > > # commented out. Nevertheless, upgrading to Rails 2.3.4 or later is > > # *strongly* recommended for security reasons. > > - s.add_dependency(%q) > > + if RUBY_VERSION < '2.2.2' > > + s.add_dependency(%q, '~> 1.6.4') > > + else > > + s.add_dependency(%q) > > + end >=20 > Interesting, I built a gem with RubyGems 2.5.1 and this conditional > was preserved in the gemspec. I tried this in the past (2009/2010?) > and any conditionals written like this got clobbered in the final > gemspec. I wonder if that's true even after you upload to rubygems.org. I'd guess it's not true as they don't want to support arbitrary ruby code for specs. > In other words, conditionals used to be evaluated at "gem build" time, > not "gem install" time. We should check when this improvement was > introduced into RubyGems should we go this route. >=20 > Also, maybe '~> 1.6.4' is too strict, '~> 1.6' could be better in case > a rack 1.7 comes out in parallel to rack 2.0 Agree here. 1.7 may be possible, and I want to make the guarantee that its API is backwards compatible with 1.6. --=20 Aaron Patterson http://tenderlovemaking.com/ --IJpNTDwzlM2Ie8A6 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJWkC82AAoJEJUxcLy0/6/GDDIH/3tzg27dWUi8D7KtVF83Hbvy YVb8d7y6GWxqfhjydW7Ud5zLMJCxiITgGFafJeTpq1YVY/wpQ058Bg76gBqB8kVH bIR6rdtpUQyn7VMNdXd/gm03t5Ww8YyqeExIJk5qzWJtCvDa6wZnbUu/2NuaNG+B 11k/25gIoRu0np6VcrmwHx6ZIPJN6YBTSMhlJxKRSrztWPN9RkcTHUNUjbnpk1mr DGLJPTJu/bR3IiEiU3JOeMeXU83p4bqVmMkMTEnATfFryRXLRcunaaW5CaAUQm90 zD0zGNvCbgmcWvJQiffRNDFv7U1VmRxexePgk5dlPb/Tyn9oSK9Gx+ic2YJ1THg= =LtOr -----END PGP SIGNATURE----- --IJpNTDwzlM2Ie8A6--