From: Simon Tournier <zimon.toutoune@gmail.com>
To: Sharlatan Hellseher <sharlatanus@gmail.com>, 68835@debbugs.gnu.org
Cc: dev@jpoiret.xyz, othacehe@gnu.org, ludo@gnu.org, me@tobias.gr,
rekado@elephly.net, guix@cbaines.net
Subject: bug#68835: Resolving package inheritance issue
Date: Thu, 01 Feb 2024 14:27:24 +0100 [thread overview]
Message-ID: <87v878e2mb.fsf@gmail.com> (raw)
In-Reply-To: <87sf2es4cc.fsf@gmail.com>
Hi,
On Wed, 31 Jan 2024 at 01:01, Sharlatan Hellseher <sharlatanus@gmail.com> wrote:
> My rational was to keep golang module in (gnu packages golang-web) and
> the new inherited package providing executable in (gnu packages web)
> which introduced the regression.
As said by Josselin, the manual provides some explanations for this kind
of situations.
https://guix.gnu.org/manual/devel/en/guix.html#Cyclic-Module-Dependencies
Roughly speaking, your proposal for Go language packages breaks because
more or less « Because the ‘inherit’ field is not delayed (thunked), it
is evaluated at the top level at load time, which is problematic in the
presence of module dependency cycles. »
The “fix” would to wrap it using a procedure; as explained in the
manual. Something like:
(define (make-minify)
(package
(inherit go-github-com-tdewolff-minify-v2)
(name "minify")
(arguments
(substitute-keyword-arguments
(package-arguments go-github-com-tdewolff-minify-v2)
((#:install-source? _ #t) #f)
((#:import-path _ "github.com/tdewolff/minify/v2")
"github.com/tdewolff/minify/cmd/minify"))))
Well, then it is not clear for me how the user would access to this
package but somehow that’s another story. :-)x
As Josselin, I would suggest to keep in the same Guile module the
original package and its variants created using ’inherit’; well as the
general rule.
Cheers,
simon
prev parent reply other threads:[~2024-02-01 16:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-31 1:01 bug#68835: Resolving package inheritance issue Sharlatan Hellseher
2024-01-31 10:41 ` Josselin Poiret via Bug reports for GNU Guix
2024-02-12 4:53 ` Maxim Cournoyer
2024-02-01 13:27 ` Simon Tournier [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v878e2mb.fsf@gmail.com \
--to=zimon.toutoune@gmail.com \
--cc=68835@debbugs.gnu.org \
--cc=dev@jpoiret.xyz \
--cc=guix@cbaines.net \
--cc=ludo@gnu.org \
--cc=me@tobias.gr \
--cc=othacehe@gnu.org \
--cc=rekado@elephly.net \
--cc=sharlatanus@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).