GNU bug report logs - #75851
Don't add propagated-inputs for all outputs

Previous Next

Package: guix-patches;

Reported by: 宋文武 <iyzsong <at> envs.net>

Date: Sun, 26 Jan 2025 04:09:02 UTC

Severity: normal

Done: 宋文武 <iyzsong <at> envs.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 75851 in the body.
You can then email your comments to 75851 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#75851; Package guix-patches. (Sun, 26 Jan 2025 04:09:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to 宋文武 <iyzsong <at> envs.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 26 Jan 2025 04:09:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: 宋文武 <iyzsong <at> envs.net>
To: guix-patches <at> gnu.org
Cc: guix-devel <at> gnu.org
Subject: Don't add propagated-inputs for all outputs
Date: Sat, 26 Aug 2023 19:35:55 +0800
[Message part 1 (text/plain, inline)]
Hello, we have a TODO for "extend `propagated-inputs` with support for
multiple outputs".  I try to do it for a while, but unable to find a
clear way, since add a new syntax for specify output in
propagated-inputs require changes in too many places..

Think about the intention, what we want is to avoid unwanted
propagated-inputs for building a package or user profiles, and
propagated-inputs is mostly used for development packages which
requiring headers/libraries from its inputs.  It seems I can hardcode
the choice here to the "dev" output (if a package have both "dev" and
"out", its "out" should considered be an application) or the "out"
output (a library/development package).


Then the change is straight:

[0001-packages-Don-t-propagate-inputs-for-non-development-.patch (text/x-patch, inline)]
From 98a8666a0cbf33e24efff615243b98144a92c950 Mon Sep 17 00:00:00 2001
Message-ID: <98a8666a0cbf33e24efff615243b98144a92c950.1693047369.git.iyzsong <at> member.fsf.org>
From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong <at> member.fsf.org>
Date: Sat, 26 Aug 2023 18:27:09 +0800
Subject: [PATCH] packages: Don't propagate inputs for non-development package
 outputs.

* guix/packages.scm (transitive-inputs): Only include propagated inputs from a
package for its "dev" output, or its "out" output if the package doesn't have
a "dev" one.
---
 guix/packages.scm | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/guix/packages.scm b/guix/packages.scm
index ba98bb0fb4..435d55de71 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -1143,7 +1143,13 @@ (define (transitive-inputs inputs)
            (loop rest result propagated first? seen)
            (loop rest
                  (cons input result)
-                 (cons (package-propagated-inputs package) propagated)
+                 ;; Only add propagated inputs for PACKAGE:dev, or PACKAGE:out
+                 ;; when PACKAGE doesn't have a "dev" output.
+                 (if (if (member "dev" (package-outputs package))
+                         (member "dev" outputs)
+                         (or (null? outputs) (member "out" outputs)))
+                     (cons (package-propagated-inputs package) propagated)
+                     propagated)
                  first?
                  (vhash-consq package outputs seen))))
       ((input rest ...)

base-commit: eeb71d778f149834015858467fbeeb1276d96d1d
-- 
2.41.0

[Message part 3 (text/plain, inline)]

Not much benifits now, but i think it will helps when we have more
mulitple outputs packages.  Also how about add a slimming team aiming to
reduce the closure size of packages and system, anyone interested?

Thanks. 🥳

Information forwarded to guix-patches <at> gnu.org:
bug#75851; Package guix-patches. (Tue, 04 Feb 2025 05:19:02 GMT) Full text and rfc822 format available.

Message #8 received at 75851 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: 宋文武 <iyzsong <at> envs.net>
Cc: guix-devel <at> gnu.org, 75851 <at> debbugs.gnu.org
Subject: Re: bug#75851: Don't add propagated-inputs for all outputs
Date: Tue, 04 Feb 2025 14:18:35 +0900
Hi,

宋文武 <iyzsong <at> envs.net> writes:

> Hello, we have a TODO for "extend `propagated-inputs` with support for
> multiple outputs".  I try to do it for a while, but unable to find a
> clear way, since add a new syntax for specify output in
> propagated-inputs require changes in too many places..
>
> Think about the intention, what we want is to avoid unwanted
> propagated-inputs for building a package or user profiles, and
> propagated-inputs is mostly used for development packages which
> requiring headers/libraries from its inputs.  It seems I can hardcode
> the choice here to the "dev" output (if a package have both "dev" and
> "out", its "out" should considered be an application) or the "out"
> output (a library/development package).
>
>
> Then the change is straight:
>
>>From 98a8666a0cbf33e24efff615243b98144a92c950 Mon Sep 17 00:00:00 2001
> Message-ID: <98a8666a0cbf33e24efff615243b98144a92c950.1693047369.git.iyzsong <at> member.fsf.org>
> From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong <at> member.fsf.org>
> Date: Sat, 26 Aug 2023 18:27:09 +0800
> Subject: [PATCH] packages: Don't propagate inputs for non-development package
>  outputs.
>
> * guix/packages.scm (transitive-inputs): Only include propagated inputs from a
> package for its "dev" output, or its "out" output if the package doesn't have
> a "dev" one.
> ---
>  guix/packages.scm | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/guix/packages.scm b/guix/packages.scm
> index ba98bb0fb4..435d55de71 100644
> --- a/guix/packages.scm
> +++ b/guix/packages.scm
> @@ -1143,7 +1143,13 @@ (define (transitive-inputs inputs)
>             (loop rest result propagated first? seen)
>             (loop rest
>                   (cons input result)
> -                 (cons (package-propagated-inputs package) propagated)
> +                 ;; Only add propagated inputs for PACKAGE:dev, or PACKAGE:out
> +                 ;; when PACKAGE doesn't have a "dev" output.
> +                 (if (if (member "dev" (package-outputs package))
> +                         (member "dev" outputs)
> +                         (or (null? outputs) (member "out" outputs)))
> +                     (cons (package-propagated-inputs package) propagated)
> +                     propagated)

That seems a heuristic that is bound to fail in surprising ways (and
with no easy recourse).  I think it's best to not merge this; perhaps
close it to focus on other ways to get rid of propagated inputs, like
that GCD you've submitted that would help in the GTK/KDE worlds.

What do you think?

-- 
Thanks,
Maxim




Reply sent to 宋文武 <iyzsong <at> envs.net>:
You have taken responsibility. (Tue, 04 Feb 2025 11:52:02 GMT) Full text and rfc822 format available.

Notification sent to 宋文武 <iyzsong <at> envs.net>:
bug acknowledged by developer. (Tue, 04 Feb 2025 11:52:02 GMT) Full text and rfc822 format available.

Message #13 received at 75851-done <at> debbugs.gnu.org (full text, mbox):

From: 宋文武 <iyzsong <at> envs.net>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 75851-done <at> debbugs.gnu.org
Subject: Re: bug#75851: Don't add propagated-inputs for all outputs
Date: Tue, 04 Feb 2025 19:54:43 +0800
Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:

> [...]
>> * guix/packages.scm (transitive-inputs): Only include propagated inputs from a
>> package for its "dev" output, or its "out" output if the package doesn't have
>> a "dev" one.
>
> That seems a heuristic that is bound to fail in surprising ways (and
> with no easy recourse).  I think it's best to not merge this; perhaps
> close it to focus on other ways to get rid of propagated inputs, like
> that GCD you've submitted that would help in the GTK/KDE worlds.
>
> What do you think?

Yes, I agree it's too risky.  Close now, thank you!




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 04 Mar 2025 12:24:13 GMT) Full text and rfc822 format available.

This bug report was last modified 157 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.