Gentoo Archives: gentoo-dev

From: Georgy Yakovlev <gyakovlev@g.o>
To: Luca Barbato <lu_zero@g.o>, gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH 1/2] eclass/cargo.eclass: add cargo_src_configure
Date: Fri, 12 Jun 2020 19:50:42
Message-Id: 50ffb81d-0359-13ba-d11b-443155db5443@gentoo.org
In Reply to: Re: [gentoo-dev] [PATCH 1/2] eclass/cargo.eclass: add cargo_src_configure by Luca Barbato
1 On 6/12/20 11:59 AM, Luca Barbato wrote:
2 > On 12/06/2020 18:24, Georgy Yakovlev wrote:
3 >> On 6/12/20 4:16 AM, Luca Barbato wrote:
4 >>> On 12/06/2020 11:04, Georgy Yakovlev wrote:
5 >>>> +#     cargo_src_configure --no-default-features
6 >>>
7 >>> Shall we default in not-defaulting so we can spare some boilerplate?
8 >> I don't think so. Let me explain.
9 >>
10 >> First of all, this will force to explicitly micro-manage all the
11 >> features for all the packages in the tree.
12 >>
13 >
14 > The idea is:
15 > - if myfeatures is empty, do not pass --no-default-features.
16 > - if myfeatures has content, automatically pass --no-default-features.
17 >
18 I realized that was the intention after sending the email.
19 That makes more sense, I'll scout toml files a bit and probably will
20 implement it.
21 I certainly remember scenarios where turning off default features is
22 highly undesirable, but toggling extras makes sense.
23 > --no-default-features --features default seems working as intended btw.
24 >
25
26 in that case
27 local myfeatures=(
28 default
29 $(usex flagX featureX '')
30 )
31 -> --no-default-features --features default --features featureX
32
33 looks quite good actually. just need to make sure we pass
34 --no-default-features first in order in that scenario.
35 > lu