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 |