bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#47375: guix test failure: tests/print


From: Maxime Devos
Subject: bug#47375: guix test failure: tests/print
Date: Thu, 25 Mar 2021 08:55:20 +0100
User-agent: Evolution 3.34.2

On Wed, 2021-03-24 at 20:59 -0700, Chris Marusich wrote:
> [..]
> 
> In guix/import/print.scm, package->code generates the code by invoking
> (origin-method source) to get the origin's "method", and then invoking
> (procedure-name method) on the method thus obtained.  It seems that
> procedure-name returns the name "url-fetch*" (the name used privately in
> the (guix download) module), but it should be returning the name
> "url-fetch" (the public name exported by the (guix download) module).
> 
> I wonder if there is any way to get the public name of the procedure
> programmatically, instead of the private one?

I believe there isn't, and I have spent some time around Guile's module
system.  Note that one could do ...

<start guile code>
(define-module (mod)
  #:export (x y z))

(define (fun) 'stuff)
(define x fun)
(define y fun
(define z fun)
<end guile code>

... in which case there would be more than one "public name".

However, there's a possible work-around.  It is change the procedure name
of a procedure, with the following

(define name (let ((visible-name (lambda () 'stuff))) visible-name))
(procedure-name name) ; -> visible-name

Patch attached (though written against a somewhat outdated tree).
Does this patch fixes the issue? (I'm not in the loop.)

Greetings, Maxime.

Attachment: 0001-guix-Let-the-procedure-name-of-url-fetch-be-what-gui.patch
Description: Text Data

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]