GNU bug report logs - #66268
Guix makes invalid assumptions regarding guile-git guarantees leading to guix pull failing

Previous Next

Package: guix;

Reported by: Tomas Volf <~@wolfsden.cz>

Date: Fri, 29 Sep 2023 16:54:02 UTC

Severity: important

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: Tomas Volf <~@wolfsden.cz>
Cc: wolf <wolf <at> wolfsden.cz>, 66268 <at> debbugs.gnu.org
Subject: bug#66268: Guix makes invalid assumptions regarding guile-git guarantees leading to guix pull failing
Date: Tue, 01 Apr 2025 09:53:29 +0200
Hi,

Tomas Volf <~@wolfsden.cz> skribis:

> However on my first (and second) reading of the documentation I did not
> get it, and expected eq? in the below snippet to return #f (since the
> pointer being wrapped does equal? to itself).  So maybe I am missing
> something else as well.
>
> scheme@(guile-user)> ,use (system foreign)
> scheme@(guile-user)> ,use (system foreign-library)
> scheme@(guile-user)> (define-wrapped-pointer-type foo foo? wrap-foo unwrap-foo #t)
> scheme@(guile-user)> (define-wrapped-pointer-type bar bar? wrap-bar unwrap-bar #t)
> scheme@(guile-user)> (define open* (foreign-library-function #f "open"))
> scheme@(guile-user)> (wrap-foo open*)
> $8 = #<foo 7fec7aac1010>
> scheme@(guile-user)> (wrap-bar open*)
> $9 = #<bar 7fec7d3dd510>
> scheme@(guile-user)> (eq? $8 $9)
> $10 = #f
> scheme@(guile-user)> (equal? open* open*)
> $12 = #t

<foo> and <bar> are different data types, so no wonder $8 and $9 are not
eq?.

What this means is that, given a pointer P, (eq? (wrap-foo p) (wrap-foo p))
is always true.

HTH!

Ludo’.




This bug report was last modified 29 days ago.

Previous Next


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