Gentoo Archives: gentoo-dev

From: Rich Freeman <rich0@g.o>
To: gentoo-dev <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] Future EAPI Idea: post source hook for eclasses
Date: Sat, 29 Mar 2014 00:08:32
Message-Id: CAGfcS_ndFdVgAtj=WX9x1YQ_2dO1PEn+qo-t_h5Mch2GAxgknA@mail.gmail.com
In Reply to: Re: [gentoo-dev] Future EAPI Idea: post source hook for eclasses by Kent Fredric
1 On Fri, Mar 28, 2014 at 2:57 PM, Kent Fredric <kentfredric@×××××.com> wrote:
2 >
3 > On 29 March 2014 06:12, Ciaran McCreesh <ciaran.mccreesh@××××××××××.com>
4 > wrote:
5 >>
6 >> These look a lot like they're just parameters to an eclass... An
7 >> alternative approach is to make this explicit, rather than having
8 >> zillions of environment variables:
9 >
10 > inherit perl-module [
11 > runtime.requires = [ "Moose", "HTTP::Tiny" ]
12 > ]
13
14 At what point are we basically inventing our own high-level
15 programming language, mostly designed around the
16 limitations/idiosyncrasies of bash?
17
18 I'm all for ditching the GLOBALVAR1=foo ; gosub bar paradigm, for all
19 the reasons everybody else ditched this in the 60s. It just seems
20 painful to try to do it in bash.
21
22 For a sane programming language you'd just write:
23 reqlist.add("Moose")
24 reqlist.add("HTTP::Tiny")
25 inherit perl-module [ runtime.requires=reqlist ]
26
27 Or better still find some way of doing it without passing the
28 parameters on the inherit line. A convenient dynamic syntax would be
29 more useful for cache-safe parameters - an RDEPEND isn't necessarily
30 the best example.
31
32 Mind you, I'm not saying we shouldn't consider the exherbo approach.
33 Without a significant overhaul of the EAPI and ditching bash I doubt
34 we'd improve on it much.
35
36 Rich