public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Rich Freeman <rich0@gentoo.org>
To: gentoo-dev <gentoo-dev@lists.gentoo.org>,
	"Michał Górny" <mgorny@gentoo.org>
Subject: Re: [gentoo-dev] rfc: eclass issues
Date: Sun, 17 Aug 2014 13:29:09 -0400	[thread overview]
Message-ID: <CAGfcS_nuF0=Md4bdho0-nTUNSk=HvTyAZ4Bruj=N7u3HRGgEcA@mail.gmail.com> (raw)
In-Reply-To: <20140817153854.GA22840@linux1>

On Sun, Aug 17, 2014 at 11:38 AM, William Hubbs <williamh@gentoo.org> wrote:
>
> The other concern he mentioned was indirectly inherited eclasses being
> able to override phase functions.
>

So, while I'm not sure whether getting rid of the ability to inherit
phase functions is practical/good/etc, I do think we need to think
hard on just what the purpose of an eclass is.

This is painting with broad strokes, but I do think there is a case
for distinguishing between eclasses used to simplify a large number of
closely-related packages (kde/x11/etc), and one used to provide
general support to a broad colleciton of packages (python, perl, etc -
just about anything named after a language for starters).

For the specialized case the inheritance usually isn't a problem,
since the packages that inherit it are well-controlled, and while I'm
not sure why multiple inheritance is really needed for phase
functions, it probably won't be problematic since the use is so well
controlled.

For eclasses that are broadly used, I think that even inheritance of
one layer of phase functions is problematic, let alone multiple ones.
What if the same eclass gets pulled in multiple times, etc?

Heck, we didn't even want to override things when implementing user
patches - we agreed to put it in the default function, and require it
to be called when it is overridden, but we didn't aim to automatically
call it when it is overriden because of the risk of problems.

Why do we need multiple inheritance of phase functions at all?  I can
see the convenience of allowing one layer, but I think we should
consider it a best-practice to avoid it in broadly-used eclasses,
unless there is a really good reason not to.

Rich


  reply	other threads:[~2014-08-17 17:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-17 15:38 [gentoo-dev] rfc: eclass issues William Hubbs
2014-08-17 17:29 ` Rich Freeman [this message]
2014-08-18 12:12 ` hasufell
2014-08-18 13:18   ` Rich Freeman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAGfcS_nuF0=Md4bdho0-nTUNSk=HvTyAZ4Bruj=N7u3HRGgEcA@mail.gmail.com' \
    --to=rich0@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    --cc=mgorny@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox