Gentoo Archives: gentoo-dev

From: Georgy Yakovlev <gyakovlev@g.o>
To: gentoo-dev@l.g.o, Kent Fredric <kentnl@g.o>
Subject: Re: [gentoo-dev] [PATCH 1/2] eclass/cargo.eclass: add cargo_src_configure
Date: Fri, 12 Jun 2020 16:29:51
Message-Id: 24c599c2-2017-31a0-12ed-1a84d66d22f8@gentoo.org
In Reply to: Re: [gentoo-dev] [PATCH 1/2] eclass/cargo.eclass: add cargo_src_configure by Kent Fredric
1 On 6/12/20 6:03 AM, Kent Fredric wrote:
2
3 I've replied privately by mistake, replying to the list again.
4 > On Fri, 12 Jun 2020 02:04:51 -0700
5 > Georgy Yakovlev <gyakovlev@g.o> wrote:
6 >
7 >> +# cargo_src_configure --no-default-features
8 >
9 > Looking at the source, I don't see how this is passed from this command to anything.
10 yeah I caught it later, will just pass it as
11
12 readonly ECARGO_FEATURES=( ${myfeatures[@]/#/--features } ${@} )
13
14 >
15 >> + # transform array from simple feature list
16 >> + # to multiple cargo args:
17 >> + # --features feature1 --features feature2 ...
18 >> + readonly ECARGO_FEATURES=( ${myfeatures[@]/#/--features } )
19 >
20 > Is this really necessary?
21 >
22 >> cargo --features "feature1 feature2"
23 >
24 > is perfectly legal.
25 >
26 cargo is very picky about how multiple features are quoted in your example.
27 like REALLY picky, and it breaks depending on how array is passed.
28 I had that initially but found that just not worth it because it may break.
29 multiple toggles is perfectly legal way to pass features as well and is
30 more robust in this situation IMO.