unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludovic.courtes@inria.fr>
To: 53127@debbugs.gnu.org
Subject: bug#53127: [PATCH RFC] Turning Rust/Cargo inputs into “regular” inputs?
Date: Sat, 08 Jan 2022 18:57:34 +0100	[thread overview]
Message-ID: <87sfty3yb5.fsf@inria.fr> (raw)

Hello!

I’m opening this issue to discuss the possibility of changing
#:cargo-inputs and #:cargo-development-inputs to regular inputs, as a
followup to:

  https://issues.guix.gnu.org/51845#10

I have a preliminary patch for ‘guix style’ and (guix build-system
cargo), but there’s a couple of stumbling blocks.

First, after the hacky patch in the discussion above, I attempted to
turn #:cargo-inputs into ‘propagated-inputs’ (instead of ‘inputs’),
because that seemed to be somewhat more logical.  That cannot work
though, because then those packages would propagate to non-Rust
packages; for example, librsvg would depend on the “build output” of
rust-* instead of just depending on its source.  Anyway, I’m back to
‘inputs’.

Second, until now, these two things would have a different meaning:

  #:cargo-inputs (list rust-cargo)

vs.

  (inputs (list rust-cargo))

In the latter case, the package depends on the build result of
‘rust-cargo’; in the former case, the package depends on the source of
‘rust-cargo’.  (See ‘rav1e’ for an example where this happens.)

If we turn all #:cargo-inputs into ‘inputs’, how can we distinguish
these two cases?  A package like ‘rust-cargo’ is sometimes depended on
for its source, sometimes for its build result; thus, we cannot just
annotate the ‘rust-cargo’ package itself.

Last, the change to ‘inputs’ would introduce a few cycles at the
<package> level.  Those cycles vanish when we lower to bags and
derivations.  However, because of these cycles, things like ‘guix
refresh -l’ may not work; there might be other unexpected and undesired
side effects.

Some of these cycles could in theory be removed.  For instance,
‘rust-cfg-if’ has an optional dependency on ‘rust-compiler-builtins’,
which leads to a cycle, but Cargo won’t let us actually remove that
dependency, even though it’s optional.

In short: it’s complicated!

Thoughts?  Is status quo a lesser evil, after all?…

Ludo’.

PS: I guess you already knew all this Efraim but I’m kinda
    (re)discovering it and now experiencing frustration firsthand.  :-)




             reply	other threads:[~2022-01-08 17:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-08 17:57 Ludovic Courtès [this message]
2022-01-08 19:47 ` bug#53127: [PATCH RFC] Turning Rust/Cargo inputs into “regular” inputs? Liliana Marie Prikler
2022-01-10  8:58   ` Ludovic Courtès
2022-01-10 20:24     ` Liliana Marie Prikler
2022-01-11 10:11       ` Ludovic Courtès

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=87sfty3yb5.fsf@inria.fr \
    --to=ludovic.courtes@inria.fr \
    --cc=53127@debbugs.gnu.org \
    /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).