Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: Austin English <wizardedit@g.o>
Cc: gentoo-dev@l.g.o, toolchain@g.o
Subject: Re: [gentoo-dev] [PATCH 2/2] eclass/toolchain-funcs: add clang version functions
Date: Tue, 05 Jul 2016 05:01:11
Message-Id: 20160705070045.393ea130.mgorny@gentoo.org
In Reply to: Re: [gentoo-dev] [PATCH 2/2] eclass/toolchain-funcs: add clang version functions by Austin English
1 On Mon, 4 Jul 2016 19:16:55 -0500
2 Austin English <wizardedit@g.o> wrote:
3
4 > On 07/01/2016 03:02 PM, Michał Górny wrote:
5 > > On Mon, 27 Jun 2016 17:04:41 -0500
6 > > Austin English <wizardedit@g.o> wrote:
7 > >
8 > >> From ec0be3d1a808ea0c5bdd081a4bb935f86bf78d44 Mon Sep 17 00:00:00 2001
9 > >> From: Austin English <wizardedit@g.o>
10 > >> Date: Mon, 27 Jun 2016 16:58:07 -0500
11 > >> Subject: [PATCH 2/2] eclass/toolchain-funcs: add clang version functions
12 > >
13 > > Why do you even ask for review if you can't wait till the weekend
14 > > before committing?
15 >
16 > There's no set time limit that I could find anywhere. I checked with my
17 > mentor first, who said a few days was enough (as there were no comments
18 > by anyone).
19 >
20 > > I've already told you twice that I'm opposed to adding version querying
21 > > functions for clang, especially for the use case you proposed. You
22 > > should check for features, and not keep a huge list of supported gcc,
23 > > clang, pathcc, icc... versions. With every random compiler pretending
24 > > to be a random version of every other compiler.
25 >
26 > I did not use in the original intended case, however I think that these
27 > helpers are still useful. Why do we allow gcc version checks then?
28
29 Because the ebuilds are full of that nonsense, and developers using
30 them don't help you remove it.
31
32 If we committed every single thing someone thought someone else might
33 find useful one day, the eclass would be huge hogs full of useless code
34 that is only used because someone noticed the function and suddenly
35 came to conclusion it's a good idea to use it because someone added it.
36
37 Now let's add 4 additional functions for every single compiler that
38 someone may decide to support one day. I'm even strongly opposed to
39 adding functions that are used only theoretically.
40
41 > There's no deprecated comment for these functions. By that logic, you
42 > should not have added tc-is-{gcc,clang}, 2 weeks ago in
43 > 6984a5b149a215dd96a9759d3d1f251354faf38f. You should be testing for
44 > compiler features directly, not keep a list of what compilers are
45 > supported in the code...
46
47 Yes, I can revert this if you insist. And don't mind that all those
48 horribly broken ebuilds checking gcc versions will suddenly fail with
49 clang.
50
51 > The point of eclasses is to share code and make ebuild maintenance
52 > easier. I don't see how allowing version checks for GCC only, when clang
53 > is supported by a lot of ebuilds, makes that easier. Again, if you're so
54 > opposed to compiler specific checks, then please remove them from
55 > ebuilds using them and from toolchains-funcs.eclass (or at least mark
56 > them as deprecated).
57
58 How does ebuild maintenance become easier when you have to test a dozen
59 of versions of different compilers to figure out which one is
60 supported?
61
62 --
63 Best regards,
64 Michał Górny
65 <http://dev.gentoo.org/~mgorny/>

Replies