Subject: [bug#77093] [PATCH rust-team v3 16/17] import: crate: Add ‘--lockfile’ option.

From: Hilton Chain <[email-masked]>
Date: Wed, 23 Apr 2025 12:12:56 +0800

On Wed, 23 Apr 2025 05:28:17 +0800,
Ludovic Courtès wrote:
>
> Hilton Chain <[email-masked]> writes:
>
> > * guix/scripts/import/crate.scm (%options): Add ‘--lockfile’ option.
> > * guix/scripts/import/crate.scm (show-help): Add it.
> > (guix-import-crate): Use it.
> > * doc/guix.texi (Invoking guix import): Document it.
> > * tests/crate.scm (temp-file): New variable.
> > ("crate-lockfile-import"): New test.
> >
> > Change-Id: I291478e04adf9f2df0bf216425a5e8aeba0bedd9
>
> [...]
>
> > +        (match crates-definitions
> > +          (((define 'rust-adler2-2.0.0
> > +              (crate-source
> > +               "adler2" "2.0.0"
> > +               "09r6drylvgy8vv8k20lnbvwq8gp09h7smfn6h1rxsy15pgh629si"))
>
> Note that this doesn’t actually testwhat you’d like.  For instance, it
> would match:
>
>   ((whatever rust-adler2-2.0.0
>              (nonsense "adler2" "2.0.0"
>                        "09r6drylvgy8vv8k20lnbvwq8gp09h7smfn6h1rxsy15pgh629si"))
>    …)
>
> But the bug is already here in ‘master’, uh.
>
> So you need to quote every symbol that is meant to be matched literally,
> or wrap the pattern in quasiquote, as is done in ‘tests/gem.scm’:
>
>   (match …
>     ((`(define rust-adler2-2.0.0 (crate-source …))) #t))

Thanks!  Changes here are not applied to master yet, they are currently
available in rust-team only.