all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: <guix-devel@gnu.org>
Cc: Efraim Flashner <efraim@flashner.co.il>
Subject: Use and abuse of ‘computed-origin-method’: the ‘rust-ring’ case
Date: Sat, 14 Dec 2024 23:37:53 +0100	[thread overview]
Message-ID: <87cyhtlwla.fsf@inria.fr> (raw)

Hello Guix,

‘rust-ring-0.16-sources’ & co. are origins that use
‘computed-origin-method’ (the thing that’s internal and undocumented) to
generate object files from assembly source, things like that.

An origin is supposed to represent source code, and clearly, the end
result here is not source by any stretch.

I believe it’s done this way simply because ‘cargo-build-system’ then
embarks that “source” to build leaf package(s) that use ‘rust-ring’,
directly or indirectly; this is where Rust compilation actually takes
place and, IIUC, the reason why a build phase in ‘rust-ring’ would be of
no use.

Anyway, the ‘computed-origin-method’ hack prevents input rewriting from
working as expected because the inputs of that big gexp aren’t visible
by just traversing the package graph.  That’s a problem.

Ideas on how to fix that?

An idea that comes to mind is to turn ‘rust-ring-0.16-sources’ into a
package using ‘trivial-build-system’, though I’m not sure it would work
well with ‘cargo-build-system’.

Ludo’.


             reply	other threads:[~2024-12-14 22:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-14 22:37 Ludovic Courtès [this message]
2024-12-15  8:41 ` Use and abuse of ‘computed-origin-method’: the ‘rust-ring’ case Efraim Flashner
2024-12-15 13:50   ` 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87cyhtlwla.fsf@inria.fr \
    --to=ludo@gnu.org \
    --cc=efraim@flashner.co.il \
    --cc=guix-devel@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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.