Gentoo Archives: gentoo-dev

From: Ciaran McCreesh <ciaran.mccreesh@××××××××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: EAPI 3 and "nonfatal die"
Date: Mon, 24 Aug 2009 22:17:06
Message-Id: 20090824231658.3224df06@snowmobile
In Reply to: Re: [gentoo-dev] Re: EAPI 3 and "nonfatal die" by Zac Medico
1 On Mon, 24 Aug 2009 15:09:52 -0700
2 Zac Medico <zmedico@g.o> wrote:
3 > > I'd like die to respect nonfatal. People using nonfatal should
4 > > check beforehand that the functions they're calling won't do
5 > > anything stupid if die's are ignored.
6 >
7 > If you're doing that then it might be wise to add an 'assert' helper
8 > that is guaranteed to generate an exception regardless of 'nonfatal'
9 > status.
10
11 Probably not the best choice of name... 'assert' is already in use for
12 checking PIPESTATUS.
13
14 The other problem with doing things that way is that people have to
15 start writing code that does an EAPI check just to be able to force a
16 die. An IGNORE_NONFATAL environment variable, whilst slightly ickier,
17 avoids that issue if we do change the definitions of die and nonfatal.
18
19 *shrug* I still think the way it was originally worded is the best
20 option. Otherwise we'll just replace the "some helpers die, some don't,
21 and no-one knows which" situation with "some eclass functions are
22 nonfatal aware, some aren't, and no-one knows which", with an added
23 side helping of "people need to find out whether any of the callers in
24 any overlay anywhere expect this function to work with nonfatal before
25 changing it".
26
27 --
28 Ciaran McCreesh

Attachments

File name MIME type
signature.asc application/pgp-signature