GNU bug report logs - #77093
[PATCH rust-team 00/18] New Rust packaging workflow based on lockfile importer.

Previous Next

Package: guix-patches;

Reported by: Hilton Chain <hako <at> ultrarare.space>

Date: Tue, 18 Mar 2025 07:18:02 UTC

Severity: normal

Tags: patch

Full log


Message #260 received at 77093 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Hilton Chain <hako <at> ultrarare.space>
Cc: Josselin Poiret <dev <at> jpoiret.xyz>, 77093 <at> debbugs.gnu.org,
 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>,
 Simon Tournier <zimon.toutoune <at> gmail.com>, Mathieu Othacehe <othacehe <at> gnu.org>,
 Tobias Geerinckx-Rice <me <at> tobias.gr>, Efraim Flashner <efraim <at> flashner.co.il>,
 Steve George <steve <at> futurile.net>,
 Divya Ranjan Pattanaik <divya <at> subvertising.org>,
 Christopher Baines <guix <at> cbaines.net>
Subject: Re: [bug#77093] [PATCH rust-team v3 16/17] import: crate: Add
 ‘--lockfile’ option.
Date: Tue, 22 Apr 2025 23:28:17 +0200
Hilton Chain <hako <at> ultrarare.space> 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))

Ludo’.




This bug report was last modified 14 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.