From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Woodcroft Subject: Re: [PATCH] Add rubygems updater. Date: Sun, 3 Jan 2016 10:50:07 +1000 Message-ID: <5688703F.80707@uq.edu.au> References: <56863869.6080501@uq.edu.au> <20160101092803.GA19934@thebird.nl> <5686609E.80309@uq.edu.au> <87fuyhgo5u.fsf@gnu.org> <568715B9.5060803@uq.edu.au> <87mvsnya6e.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45585) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aFWsI-0000iJ-KW for guix-devel@gnu.org; Sat, 02 Jan 2016 19:50:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aFWsF-00020k-EF for guix-devel@gnu.org; Sat, 02 Jan 2016 19:50:22 -0500 In-Reply-To: <87mvsnya6e.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: =?UTF-8?Q?Ludovic_Court=c3=a8s?= Cc: "guix-devel@gnu.org" On 03/01/16 06:54, Ludovic Court=C3=A8s wrote: > Ben Woodcroft skribis: > >> On 02/01/16 04:17, Ludovic Court=C3=A8s wrote: >>> Ben Woodcroft skribis: >>> >>>> On 01/01/16 19:28, Pjotr Prins wrote: >>>>> On Fri, Jan 01, 2016 at 06:27:21PM +1000, Ben Woodcroft wrote: >>>>>> It seems there's 30 packages to be updated, out of the 107 in >>>>>> ruby.scm. Going through each of these individually seems a little >>>>>> tedious, can we do them in bulk somehow or do they have to be >>>>>> committed individually? Building and testing all packages that >>>>>> require these packages would be a start - is there any way to list >>>>>> all dependent packages? >>>>>> >>>>>> gnu/packages/ruby.scm:2807:13: ruby-cutest would be upgraded from >>>>>> 1.2.2 to 1.2.3 >>>>>> gnu/packages/ruby.scm:333:13: ruby-rspec-mocks would be upgraded >>>>>> from 3.2.1 to 3.4.0 >>>>> (etc) >>>>> >>>>> I don't think it is a good idea to automatically update >>>>> packages. Reason being that packages should be updated by someone w= ho >>>>> is actively using that new version. Automated tests are one thing, >>>>> real user feedback another. Not to mention that many gems don't hav= e >>>>> tests ;). >>>> I think we should update the package definitions so that more have >>>> tests, and failing that import the library so we know it can at leas= t >>>> be loaded, like this: >>>> >>>> + `(#:phases >>>> + (modify-phases %standard-phases >>>> + (replace 'check >>>> + (lambda _ >>>> + (zero? (system* "ruby" "-Ilib" "-r" "ansi"))))))) >>> The only case where this would make a difference is for leaf packages= , >>> no? In all the other cases, building dependent packages will ensure >>> that the package at hand works as expected. >> Sure, but even in the case where they aren't leaf packages at least >> the build error gets thrown when building the package at >> fault. There's also the important difference that it makes the >> packager feel less bad about the disappointing lack of tests or the >> necessity of disabling them because of circular dependencies. > Right. The only downside I can think of is if packagers have to copy > the above 4 lines in each and every package. Can you think of a way > that would avoid that? I have only been adding these in cases where testing is impossible, but=20 we could make it a wider policy. We could bake it into the build system, by adding an optional argument=20 #:import so that you could do (build-system ruby-build-system) (arguments `(#:import "ansi" #:tests? #f)) ; tests require circular dependencies Probably in that case makes sense to have a new phase 'check-import so=20 that more complex cases can be handled, rather than replacing 'check.=20 There's no way to run this phase with the native-inputs disappeared is=20 there so it more closely mirrors a user's experience? We could even default this to the expected name of the library guessed=20 from the name of the package when #:import is not given. However, this=20 would unfortunately break packages that have been written outside of=20 Guix, so I imagine you don't feel this is a good idea. WDYT? Thanks, ben