unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Use and abuse of ‘computed-origin-method’: the ‘rust-ring’ case
@ 2024-12-14 22:37 Ludovic Courtès
  2024-12-15  8:41 ` Efraim Flashner
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2024-12-14 22:37 UTC (permalink / raw)
  To: guix-devel; +Cc: Efraim Flashner

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’.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-12-15 13:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-14 22:37 Use and abuse of ‘computed-origin-method’: the ‘rust-ring’ case Ludovic Courtès
2024-12-15  8:41 ` Efraim Flashner
2024-12-15 13:50   ` Ludovic Courtès

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).