[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Use and abuse of ‘computed-origin-method’: the ‘rust-ring’ case
From: |
Ludovic Courtès |
Subject: |
Use and abuse of ‘computed-origin-method’: the ‘rust-ring’ case |
Date: |
Sat, 14 Dec 2024 23:37:53 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
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’.
- Use and abuse of ‘computed-origin-method’: the ‘rust-ring’ case,
Ludovic Courtès <=