From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id C13F113877A for ; Sun, 17 Aug 2014 08:49:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C690CE0993; Sun, 17 Aug 2014 08:49:39 +0000 (UTC) Received: from mail-qa0-f52.google.com (mail-qa0-f52.google.com [209.85.216.52]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D9DF9E0983 for ; Sun, 17 Aug 2014 08:49:38 +0000 (UTC) Received: by mail-qa0-f52.google.com with SMTP id j15so3364013qaq.25 for ; Sun, 17 Aug 2014 01:49:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=1Qd3nBfpB8wB2lo1z0QaXCbdH7Mc9//BNt13YXBhcUU=; b=aUTJNI2R005tj6uko8hWOCB3w7+CbzZqyfaT0KEnQ4AF5lJhef42g/S1zL/N5/Goow YFn013ZgqXYLibiFvX9Gmz8sHtxvDD6DKF1+P6hbIQoilgjhbTR6cTu1GgJxLq9jAvVU okRxkG57BxGmREJetvW66RIAx9XA4b0ZIS0H8vw2RPpQra+OgoXgerBiBiDHV2Y/mN9p f7UsAp+mD/mthxW4bVEJmiZ5eAi8nepuyl8qYVIPrN6yg08X433ISQ1l+NBW9cts1BbF g/mRfaCjSKUtpr0Ym3IWglOAXjwOZFD4zKd8uV7GJC0ciXybCXhFzlKn8a7xA2MpIoqH gB0w== Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 X-Received: by 10.229.191.2 with SMTP id dk2mr44373028qcb.8.1408265377993; Sun, 17 Aug 2014 01:49:37 -0700 (PDT) Received: by 10.140.44.34 with HTTP; Sun, 17 Aug 2014 01:49:37 -0700 (PDT) In-Reply-To: <20140817090344.7cb7010a@pomiot.lan> References: <20140816215428.GA6773@linux1> <20140817090344.7cb7010a@pomiot.lan> Date: Sun, 17 Aug 2014 20:49:37 +1200 Message-ID: Subject: Re: [gentoo-dev] rfc: calling all eclass phase functions by default From: Kent Fredric To: =?UTF-8?B?TWljaGHFgiBHw7Nybnk=?= Cc: gentoo-dev@lists.gentoo.org Content-Type: multipart/alternative; boundary=001a1133979e9adc000500cf551f X-Archives-Salt: 3b1a2446-42f4-4126-9f52-a96426f95dce X-Archives-Hash: a8a4bbdcbfd383ef2d1c7c3f2fb2b1ae --001a1133979e9adc000500cf551f Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 17 August 2014 19:03, Micha=C5=82 G=C3=B3rny wrote: > > > So if you could sculpt it to be broader by default and have less scope > for > > developer error, that'd be an improvement. > > > > --- code start -- > > ECLASS_EXCLUDE=3D"foo_src_unpack bar_src_unpack" > > inherit foo bar baz > > > > > > --- code end --- > > > > here, src_unpack would be baz_src_unpack *regardless* of composition > order > > because "foo" and "bar" were barred from being used, and baz took > > precedence as a result. > > Wow, so you suggest replacing a solution where you have to re-declare > all the phases with one in which you have to opt-out of all phases of > all eclasses... > > This thread spreads more great ideas every minute. Soon enough, we will > ban eclasses and require every ebuild to write everything inline just > to be sure. Preferably using kernel calls from assembly to avoid as much > middleware as possible, and make ebuilds as verbose as possible. Indeed, I think I shall recall my suggestion, because the number of times you *ever* want to express that in eclasses is rare and none. Either you want to expressly say "I want these phases to run in this order, regardless of the import ordering", or "I want some sensible default to take place based on import ordering" Saying "I want this subset of possible phases to not happen, but we might anticipate that somebody creates a function later that breaks our class and that be ok" Who ever does that. Seriously. You would literally be enumerating ( @INHERITED - THEONEIWANT ) every time when you could simply declare the one you want by doing " function(){ THEONEIWANT }". In short, "Just override the function if you need to" is about as simple and straight forward and not mental gymnastics as you're going to get. Otherwise we're just paving a superhighway with good-intention-tiles. --=20 Kent *KENTNL* - https://metacpan.org/author/KENTNL --001a1133979e9adc000500cf551f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

= On 17 August 2014 19:03, Micha=C5=82 G=C3=B3rny <mgorny@gentoo.org>= wrote:

> So if you could sculpt it to be broader by default and have less scope= for
> developer error, that'd be an improvement.
>
> --- code start --
> ECLASS_EXCLUDE=3D"foo_src_unpack bar_src_unpack"
> inherit foo bar baz
>
>
> --- code end ---
>
> here, src_unpack would be baz_src_unpack *regardless* of composition o= rder
> because "foo" and "bar" were barred from being use= d, and baz took
> precedence as a result.

Wow, so you suggest replacing a solution where you have to re-declare=
all the phases with one in which you have to opt-out of all phases of
all eclasses...

This thread spreads more great ideas every minute. Soon enough, we will
ban eclasses and require every ebuild to write everything inline just
to be sure. Preferably using kernel calls from assembly to avoid as much middleware as possible, and make ebuilds as verbose as possible.


Indeed, I think I shall re= call my suggestion, because the number of times you *ever* want to express = that in eclasses is rare and none.

Either you want to expressly say "= ;I want these phases to run in this order, regardless of the import orderin= g", or "I want some sensible default to take place based on impor= t ordering"

Saying "I want this subset of pos= sible phases to not happen, but we might anticipate that somebody creates a= function later that breaks our class and that be ok"

Who ever = does that. Seriously.

You would literally be enumerating=C2= =A0 ( @INHERITED - THEONEIWANT=C2=A0 ) every time when you could simply dec= lare the one you want by doing " function(){ THEONEIWANT }".
<= br>
In short, "Just override the function if yo= u need to" is about as simple and straight forward and not mental gymn= astics as you're going to get.

Otherwise we're just paving a= superhighway with good-intention-tiles.
--001a1133979e9adc000500cf551f--