From: Chris Reffett <creffett@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] rfc: calling all eclass phase functions by default
Date: Mon, 18 Aug 2014 15:37:26 -0400 [thread overview]
Message-ID: <d2221097-0cdf-42a3-a183-a7ef3e399c8c@email.android.com> (raw)
In-Reply-To: <20140818171156.182dd644@pomiot.lan>
On August 18, 2014 11:11:56 AM EDT, "Michał Górny" <mgorny@gentoo.org> wrote:
>Dnia 2014-08-18, o godz. 09:22:46
>Chris Reffett <creffett@gentoo.org> napisał(a):
>
>> On 8/18/2014 8:56 AM, hasufell wrote:
>> > Almost forgot, of course this does not work if you expect
>> > unpacker_src_unpacker() to run:
>> > inherit unpacker games base
>> >
>> > as well as
>> > inherit unpacker base games
>> >
>> > however
>> > inherit games unpacker base
>> >
>> > will work.
>> >
>> > And now... guess why the games herd made it a policy to always
>inherit
>> > games.eclass last. Because of the unpredictability of eclasses and
>that
>> > they may randomly add exported phase functions. It's a bit
>paranoid, but
>> > understandable, since we don't have any real rules here.
>> >
>> > So in the end 3 eclasses all tell you "inherit me last! really!".
>Good
>> > luck with figuring out how to make a gnome game with python and
>multilib
>> > support work together. I can predict the days such a review would
>take
>> > in #gentoo-sunrise. Not less than 3.
>> >
>> Would it be feasible to add a repoman check for situations like this,
>> where the behavior of a phase is dependent on inherit order? If so,
>it
>> seems reasonable to me to require explicit calls to eclass functions
>in
>> these cases to make it clear what's being called when.
>
>Right now, we have no kind of repoman for eclasses. If you have time to
>work on such a thing, please do. Otherwise, all we can do is put more
>checks in ebuilds but that triggers the warning for the wrong people...
I was thinking more ebuild-side. Example: my ebuild inherits both cmake-utils and games eclasses, and I don't explicitly define src_compile, repoman full could pop up a warning like "src_compile is ambiguous between cmake-utils_src_compile and games_src_compile, please explicitly define this phase and call the appropriate eclass function." I imagine that this would pop up a lot of warnings, but I feel like it would improve readability and make it explicit what should be going on where. I concede that it could make a lot more boilerplate code in ebuilds, so that's a potential issue, mostly just throwing out an idea here.
Chris Reffett
next prev parent reply other threads:[~2014-08-18 19:37 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-16 21:54 [gentoo-dev] rfc: calling all eclass phase functions by default William Hubbs
2014-08-16 22:32 ` Kent Fredric
2014-08-16 23:01 ` William Hubbs
2014-08-17 3:11 ` [gentoo-dev] " Duncan
2014-08-17 7:03 ` [gentoo-dev] " Michał Górny
2014-08-17 8:49 ` Kent Fredric
2014-08-17 7:06 ` "Paweł Hajdan, Jr."
2014-08-17 7:18 ` Michał Górny
2014-08-17 7:23 ` "Paweł Hajdan, Jr."
2014-08-16 22:54 ` Michał Górny
2014-08-16 23:30 ` William Hubbs
2014-08-17 6:54 ` Ulrich Mueller
2014-08-17 12:24 ` Rich Freeman
2014-08-18 8:54 ` Sergey Popov
2014-08-18 10:44 ` Rich Freeman
2014-08-18 12:21 ` Sergey Popov
2014-08-18 13:27 ` Rich Freeman
2014-08-18 12:04 ` hasufell
2014-08-18 12:19 ` Sergey Popov
2014-08-18 12:30 ` hasufell
2014-08-18 12:41 ` hasufell
2014-08-18 12:52 ` Michał Górny
2014-08-18 12:56 ` hasufell
2014-08-18 13:22 ` Chris Reffett
2014-08-18 13:27 ` hasufell
2014-08-18 15:11 ` Michał Górny
2014-08-18 19:37 ` Chris Reffett [this message]
2014-08-18 20:08 ` Michał Górny
2014-08-18 20:23 ` hasufell
2014-08-19 7:02 ` Sergey Popov
2014-08-18 14:13 ` Rich Freeman
2014-08-19 6:58 ` Sergey Popov
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=d2221097-0cdf-42a3-a183-a7ef3e399c8c@email.android.com \
--to=creffett@gentoo.org \
--cc=gentoo-dev@lists.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