Guile-gi fails a few tests on core-updates-frozen

  • Done
  • quality assurance status badge
Details
2 participants
  • Tobias Geerinckx-Rice
  • Vivien Kraus
Owner
unassigned
Submitted by
Vivien Kraus
Severity
normal

Debbugs page

Vivien Kraus wrote 3 years ago
(address . bug-guix@gnu.org)
53663564cd4371ba520861d7480a8e2bc037243b.camel@planete-kraus.eu
Dear guix,

For my program, I depend on guile-gi. However, the test/string.scm test
contains some characters that are not recognized by guile (I suggest
using (call-with-input-string "<the character>" read-char) instead of
#\<the character>), and once that’s fixed, more tests fail, for which I
have no solution.

Best regards,

Vivien
Vivien Kraus wrote 3 years ago
[PATCH] Re: bug#51447: guile-gi source code has a placeholder for a combining character
(address . 51447@debbugs.gnu.org)
87k0hqwjry.fsf@planete-kraus.eu
The string failure is due to a dotted circle as a basis for the
combining character, that may have been inserted by a clever source code
editor. Replacing it with the hex value for the character itself, the
test passes.

Vivien
From 308bd116d75861c70f7540890a514b0eb487c2f7 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Tue, 2 Nov 2021 18:19:03 +0100
Subject: [PATCH] guile-gi: fix a source code encoding error

* gnu/packages/guile-xyz.scm (guile-gi) [phases]: remove the default dotted
circle from the combining character that is tested in test/string.scm.
---
gnu/packages/guile-xyz.scm | 4 ++++
1 file changed, 4 insertions(+)

Toggle diff (17 lines)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 3c93779209..6a401cda45 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -3145,6 +3145,10 @@ (define-public guile-gi
(ice-9 rdelim))
#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'workaround-guile-reader-failure
+ (lambda* _
+ (substitute* "test/string.scm"
+ (("#\\\\◌̀") "#\\x0300"))))
(add-after 'unpack 'patch-references-to-extension
(lambda* (#:key outputs #:allow-other-keys)
(let ((effective (read-line
--
2.33.1
Vivien Kraus wrote 3 years ago
Re: bug#51447: there’s no other test failing than string.scm
(address . 51447@debbugs.gnu.org)
87fssewjny.fsf@planete-kraus.eu
It turns out that the other failures only happen in a guix shell, not as
a package build in guix.

Vivien
Vivien Kraus wrote 3 years ago
Re: [PATCH] Re: bug#51447: guile-gi source code has a placeholder for a combining character
(address . 51447@debbugs.gnu.org)
87a6imwjim.fsf@planete-kraus.eu
Vivien Kraus <vivien@planete-kraus.eu> writes:
Toggle quote (5 lines)
> The string failure is due to a dotted circle as a basis for the
> combining character, that may have been inserted by a clever source code
> editor. Replacing it with the hex value for the character itself, the
> test passes.

Sorry, the phase name is not good, because it’s not a problem with the
guile reader but a problem with the source code. So, this should be
better.

Vivien
From ce832d8593413f4a812211f2fbd98ab5086fe2a2 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Tue, 2 Nov 2021 18:19:03 +0100
Subject: [PATCH] guile-gi: fix a source code encoding error

* gnu/packages/guile-xyz.scm (guile-gi) [phases]: remove the default dotted
circle from the combining character that is tested in test/string.scm.
---
gnu/packages/guile-xyz.scm | 4 ++++
1 file changed, 4 insertions(+)

Toggle diff (17 lines)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 3c93779209..8fc37d2069 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -3145,6 +3145,10 @@ (define-public guile-gi
(ice-9 rdelim))
#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'remove-dotted-circle-from-combining-character
+ (lambda* _
+ (substitute* "test/string.scm"
+ (("#\\\\◌̀") "#\\x0300"))))
(add-after 'unpack 'patch-references-to-extension
(lambda* (#:key outputs #:allow-other-keys)
(let ((effective (read-line
--
2.33.1
Vivien Kraus wrote 3 years ago
More explanations for the fix
(address . 51447@debbugs.gnu.org)
875yt9wl1h.fsf@planete-kraus.eu
I was told that this issues gives headaches, so I added a short comment
explaining it.

Vivien
From 93224afab672465f3e8e1a6be00def0d5507bb76 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Tue, 2 Nov 2021 18:19:03 +0100
Subject: [PATCH] guile-gi: fix a source code encoding error

* gnu/packages/guile-xyz.scm (guile-gi) [phases]: remove the default dotted
circle from the combining character that is tested in test/string.scm.
---
gnu/packages/guile-xyz.scm | 10 ++++++++++
1 file changed, 10 insertions(+)

Toggle diff (23 lines)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 3c93779209..1ef872ffe1 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -3145,6 +3145,16 @@ (define-public guile-gi
(ice-9 rdelim))
#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'remove-dotted-circle-from-combining-character
+ ;; The test/string.scm files contain ◌̀, which is a dotted circle
+ ;; (U+25cc) followed by an upper combining character (U+0300). The
+ ;; old guile 3.0.2 reader incorrectly ignores the dotted circle,
+ ;; and parses it as the combining character alone, but the new
+ ;; guile reader does not.
+ ;; See https://github.com/spk121/guile-gi/issues/112
+ (lambda* _
+ (substitute* "test/string.scm"
+ (("#\\\\◌̀") "#\\x0300"))))
(add-after 'unpack 'patch-references-to-extension
(lambda* (#:key outputs #:allow-other-keys)
(let ((effective (read-line
--
2.33.1
Tobias Geerinckx-Rice wrote 3 years ago
(name . Vivien Kraus)(address . vivien@planete-kraus.eu)
87tugt78n2.fsf@nckx
Vivien,

Vivien Kraus via Bug reports for GNU Guix 写道:
Toggle quote (4 lines)
> I was told that this issues gives headaches, so I added a short
> comment
> explaining it.

Thanks, I feel a better already. Pushed as
6c39c131b74651e3019cd199061fcfc3607ba198.

Kind regards,

T G-R
-----BEGIN PGP SIGNATURE-----

iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCYYJ5gQ0cbWVAdG9iaWFz
LmdyAAoJEA2w/4hPVW15xTUA/03dePl0P+Dapv17zFqy9R+Z4VTvtPQlKYt82Uef
coJUAP918dOp2llfG1UweQ9s2rLovIvxz+WGGIQY920wGGv4DQ==
=MwaR
-----END PGP SIGNATURE-----

?
Your comment

This issue is archived.

To comment on this conversation send an email to 51447@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 51447
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help