having the "+test" or "+tests" variant propagate causes unexpected builds
Jason Liu
jasonliu at umich.edu
Sun Oct 23 23:58:29 UTC 2022
My own personal opinion has been that +test/+tests and +debug, by default,
should not propagate through the chain of dependencies; and then perhaps
there might be some way to enable propagation (maybe with a command line
option?).
However, if I recall correctly, all variants propagate through the
dependency chain, so it might be difficult to make certain variant keywords
behave differently?
--
Jason Liu
On Sun, Oct 23, 2022 at 1:58 PM Ken Cunningham <
ken.cunningham.webuse at gmail.com> wrote:
> Various ports implement a “test” or “tests” variant to allow extra
> features and deps required for testing to be enabled.
>
> This variant, when requested, will propagate up the chain to all the
> ports, however. There is no real use case where someone would desire the
> test/s variant to propagate up.
>
> This generates needless builds, and often enables features people neither
> need nor want, and then guarantees manual rebuilds, forever, of the
> involved ports.
>
> I recently came back to a massive building project involving clang and
> llvm when I was trying to build “mesa +tests”. Because clang-15 and llvm-15
> also have a “+tests” variant, and had not yet been installed, port was
> building those (and possibly others) with the tests variant rather than use
> the prebuilt binary.
>
> Of course I just aborted the huge llvm/clang-15 build, cleaned them up,
> and installed them separately. But others would probably not know to do
> this.
>
> I had suggested a few years ago we might namespace the test/tests
> variants, by having a convention that the portname be prepended to the test
> variant, to be more specific and avoid this — but not a widely acceptable
> idea at that time. So we’re still in the same situation…
>
> Is it possible that a “test” or “tests” variant might not be propagated up
> the ports chain by base, instead?
>
>
> K
>
>
>
> PS. A similar thing happens with “+debug” variants, another common variant
> that you *usually* don’t want propagated up to *every single port* in the
> chain either.
>
> This one is occasionally something that people would want up their chain,
> but it is so fragile of a plan to rely on variant propagation (ie if you
> have the port installed already, it won’t be reinstalled with the “+debug”
> variant), that such rare users might best install each port they want to be
> installed as “debug” do that specifically. Certainly most of us don’t want
> clang-15 installed with it’s debug variant when you’re trying to debug some
> little port.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20221023/72372c91/attachment.htm>
More information about the macports-dev
mailing list