Discouraging variants [was: Re: port install efficiency issue]

C. Florian Ebeling florian.ebeling at gmail.com
Wed Mar 25 01:42:17 PDT 2009


On Wed, Mar 25, 2009 at 5:51 AM, Ryan Schmidt <ryandesign at macports.org> wrote:
>
> On Mar 24, 2009, at 23:05, Shreevatsa R wrote:
>
>> This would be a good starting point to mention my pet peeve with
>> MacPorts, which is the excessive use of variants.
>>
>> Ideally, all ports would enable by default all the features that users
>> might want, and only leave as variants those features which are
>> *definitely* undesirable to significantly many people (and definitely
>> desirable for significantly many). Instead, some ports try to make
>> every feature a separate variant. This is entirely unnecessary: disk
>> space is cheap and shouldn't be considered a cost of enabling the
>> feature by default.
>>
>> It is important to remember that with N variants, there are 2^N
>> potential versions to test -- such combinatorial explosion is hard to
>> maintain and introduces many bugs. There will be situations where
>> variants are absolutely necessary, but if there can be consensus
>> against variants, and if the Guide (etc.) could suggest to maintainers
>> that variants should only be used when necessary, I hope it will lead
>> to some improvement.
>
> I am constantly telling people on the mailing list to use variant sparingly,
> only when absolutely necessary.
>
> Variants frequently don't get tested when ports are updated, so things break
> without the maintainer realizing it.
>
> Are there any specific ports you can point out that have more variants than
> you think they need?

Maybe a guidelining positive list would be helpful, with
reasons that usually warrant a variant. And if your
reason is not on the list either collapse the variant
into the main port or seperate it out into a port altogether.

One problem with variants is that in the beginning it makes
you feel like your a good citizen when you provide many.
Misunderstood 'Mimize Coupling' thinking probably.

Are there maybe better alternatives for any case
where variants are used today?

Florian

-- 
Florian Ebeling
Twitter: febeling
florian.ebeling at gmail.com


More information about the macports-dev mailing list