Subject: Re: [PATCH rust-team v3 00/17] New Rust packaging workflow based on lockfile importer.

From: Hilton Chain <[email-masked]>
Date: Sat, 12 Apr 2025 19:20:36 +0800

On Sat, 05 Apr 2025 10:53:33 +0800,
Hilton Chain wrote:
>
> On Sun, 23 Mar 2025 15:23:04 +0800,
> Hilton Chain wrote:
> >
> I'll apply this series (except the documentation change, which will be tracked
> here separately) to rust-team when I have checked an initial set of packages.
>
> In case it's useful, I'm using this script to get a list of unstaged crates to
> look through:
> --8<---------------cut here---------------start------------->8---
> for i in $(git diff gnu/packages/rust-crates.scm | grep -E '^\+\(define rust-' | cut -f2 -d' ')
> do
>     guix build -e "(@@ (gnu packages rust-crates) $i)" -v0
> done
> --8<---------------cut here---------------end--------------->8---

Adjusted this script to open editor automatically until all files have been
opened:
--8<---------------cut here---------------start------------->8---
for i in $(git diff gnu/packages/rust-crates.scm | grep -E '^\+\(define rust-' | cut -f2 -d' ')
do
    file="$(guix build -e "(@@ (gnu packages rust-crates) $i)" -v0 2>/dev/null)"
    if [[ -n $file ]]; then
        $EDITOR $file
    fi
done
--8<---------------cut here---------------end--------------->8---

I use this script for an extra check, after addressing files reported by
check-for-pregenerated-files phase first.

The phase can't check source, a large number of pregenerated bindings exist and
are included as before.  Some crates are specificially made for this purpose as
well, I think we should have a clear policy for them.

I'll set a deadline (1 year?) to remove #:cargo-inputs support from
cargo-build-sytem.  Here're remaining users in our codebase:
--8<---------------cut here---------------start------------->8---
$ git grep -wc '#:cargo-.*inputs' gnu/packages
gnu/packages/bioinformatics.scm:3        wait python-team merge
gnu/packages/crates-apple.scm:84         dependencies
gnu/packages/crates-audio.scm:68         ...
gnu/packages/crates-check.scm:42         ...
gnu/packages/crates-compression.scm:115  ...
gnu/packages/crates-crypto.scm:355       ...
gnu/packages/crates-database.scm:80      ...
gnu/packages/crates-graphics.scm:346     ...
gnu/packages/crates-gtk.scm:348          ...
gnu/packages/crates-io.scm:5234          ...
gnu/packages/crates-shell.scm:51         ...
gnu/packages/crates-tls.scm:130          ...
gnu/packages/crates-vcs.scm:429          ...
gnu/packages/crates-web.scm:404          ...
gnu/packages/crates-windows.scm:146      ...
gnu/packages/crypto.scm:3                ...
gnu/packages/machine-learning.scm:11     wait python-team merge
gnu/packages/python-compression.scm:1    ...
gnu/packages/python-crypto.scm:1         ...
gnu/packages/python-science.scm:1        ...
gnu/packages/python-web.scm:1            ...
gnu/packages/python-xyz.scm:8            ...
gnu/packages/rust-apps.scm:96            TODO
gnu/packages/sequoia.scm:46              TODO
--8<---------------cut here---------------end--------------->8---

I have rebased rust-team to a recent master, this issue (#77093) will be an
extra blocker for merging the branch.

Don't keep too many changes to rust-crates.scm locally :)