GNU bug report logs - #54752
import: hackage: `elif` conditionals not supported

Previous Next

Package: guix;

Reported by: "Philip Munksgaard" <philip <at> munksgaard.me>

Date: Wed, 6 Apr 2022 16:21:01 UTC

Severity: normal

Done: Lars-Dominik Braun <lars <at> 6xq.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 54752 in the body.
You can then email your comments to 54752 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#54752; Package guix. (Wed, 06 Apr 2022 16:21:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Philip Munksgaard" <philip <at> munksgaard.me>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Wed, 06 Apr 2022 16:21:01 GMT) Full text and rfc822 format available.

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

From: "Philip Munksgaard" <philip <at> munksgaard.me>
To: bug-guix <at> gnu.org
Subject: import: hackage: `elif` conditionals not supported
Date: Wed, 06 Apr 2022 18:19:49 +0200
Since Cabal 2.2 conditional blocks support the `elif` construct [0], but our hackage importer does not currently support such expressions. This causes importing packages like `raaz` [1] to fail.

0: https://cabal.readthedocs.io/en/latest/cabal-package.html?highlight=elif#conditional-blocks
1: https://hackage.haskell.org/package/raaz




Information forwarded to bug-guix <at> gnu.org:
bug#54752; Package guix. (Sat, 14 May 2022 13:54:01 GMT) Full text and rfc822 format available.

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

From: Lars-Dominik Braun <lars <at> 6xq.net>
To: Philip Munksgaard <philip <at> munksgaard.me>
Cc: bug-guix <at> gnu.org
Subject: Re: import: hackage: `elif` conditionals not supported
Date: Sat, 14 May 2022 15:53:36 +0200
[Message part 1 (text/plain, inline)]
Hi Philip,

> Since Cabal 2.2 conditional blocks support the `elif` construct [0], but our hackage importer does not currently support such expressions. This causes importing packages like `raaz` [1] to fail.
attached patch series fixes the import for `raaz` by adding support for
elif and other minor adjustments. There still is syntax we do not support,
most importantly mixed indentation, which is already documented as xfail
via a testcase. I’m adding a few more.

Could you have a look please if these make sense?

Cheers,
Lars

[0001-import-cabal-Support-elif-statement.patch (text/plain, attachment)]
[0002-import-cabal-Allow-curly-brackets-in-more-positions.patch (text/plain, attachment)]
[0003-import-cabal-Allow-properties-without-space-between-.patch (text/plain, attachment)]
[0004-import-cabal-Allow-curly-bracket-before-else-stateme.patch (text/plain, attachment)]
[0005-import-cabal-Document-failing-syntax-through-tests.patch (text/plain, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#54752; Package guix. (Mon, 16 May 2022 19:09:01 GMT) Full text and rfc822 format available.

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

From: "Philip Munksgaard" <philip <at> munksgaard.me>
To: "Lars-Dominik Braun" <lars <at> 6xq.net>
Cc: John Kehayias <bug-guix <at> gnu.org>
Subject: Re: import: hackage: `elif` conditionals not supported
Date: Mon, 16 May 2022 21:08:09 +0200
Hi Lars 

On Sat, 14 May 2022, at 15:53, Lars-Dominik Braun wrote:
> attached patch series fixes the import for `raaz` by adding support for
> elif and other minor adjustments. There still is syntax we do not support,
> most importantly mixed indentation, which is already documented as xfail
> via a testcase. I’m adding a few more.
>
> Could you have a look please if these make sense?
>

Looks like it works! Unfortunately, building raaz still fails (first because of the description, then because some internal libraries are added as external dependencies, and then for... other reasons I haven't figured out. But all of those are separate issues.




Information forwarded to bug-guix <at> gnu.org:
bug#54752; Package guix. (Sun, 22 May 2022 09:56:01 GMT) Full text and rfc822 format available.

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

From: Lars-Dominik Braun <lars <at> 6xq.net>
To: Philip Munksgaard <philip <at> munksgaard.me>
Cc: 54752 <at> debbugs.gnu.org
Subject: Re: import: hackage: `elif` conditionals not supported
Date: Sun, 22 May 2022 11:55:00 +0200
Hi Philip,

thank you!

> Unfortunately, building raaz still fails (first because of the description, then because some internal libraries are added as external dependencies, and then for... other reasons I haven't figured out. But all of those are separate issues.

You’re right, it fails with this error for me, which indicates haskell-build-system has a bug _somewhere_.

---snip---
starting phase `register'
running "runhaskell Setup.hs" with command "register" and parameters ("--gen-pkg-config=/gnu/store/8m0w1688syvcmhjr2ym1max430jmwjag-ghc-raaz-0.3.6/ghc-raaz-0.3.6.conf")
error: in phase 'register': uncaught exception:
system-error "fport_read" "~A" ("Is a directory") (21)
phase `register' failed after 6.9 seconds
Backtrace:
          11 (primitive-load "/gnu/store/jpf2lwn33nq08nkqrkr5q232c51…")
In guix/build/gnu-build-system.scm:
    906:2 10 (gnu-build #:source _ #:outputs _ #:inputs _ #:phases . #)
In ice-9/boot-9.scm:
  1752:10  9 (with-exception-handler _ _ #:unwind? _ # _)
In srfi/srfi-1.scm:
    634:9  8 (for-each #<procedure 7ffff2048e20 at guix/build/gnu-b…> …)
In ice-9/boot-9.scm:
  1752:10  7 (with-exception-handler _ _ #:unwind? _ # _)
In guix/build/gnu-build-system.scm:
   927:23  6 (_)
In guix/build/haskell-build-system.scm:
   244:23  5 (register #:name _ #:system _ #:inputs _ #:outputs _)
In ice-9/ports.scm:
   433:17  4 (call-with-input-file _ _ #:binary _ #:encoding _ # _)
In ice-9/rdelim.scm:
   160:18  3 (read-string _)
In unknown file:
           2 (read-char #<input: /gnu/store/8m0w1688syvcmhjr2ym1max4…>)
In ice-9/boot-9.scm:
  1685:16  1 (raise-exception _ #:continuable? _)
  1685:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
In procedure fport_read: Is a directory
---snap---

Cheers,
Lars





Information forwarded to bug-guix <at> gnu.org:
bug#54752; Package guix. (Thu, 02 Jun 2022 09:55:01 GMT) Full text and rfc822 format available.

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

From: "Philip Munksgaard" <philip <at> munksgaard.me>
To: "Lars-Dominik Braun" <lars <at> 6xq.net>
Cc: 54752 <at> debbugs.gnu.org
Subject: Re: import: hackage: `elif` conditionals not supported
Date: Thu, 02 Jun 2022 11:54:31 +0200
On Sun, 22 May 2022, at 11:55, Lars-Dominik Braun wrote:
> Hi Philip,
>
> thank you!
>
>> Unfortunately, building raaz still fails (first because of the description, then because some internal libraries are added as external dependencies, and then for... other reasons I haven't figured out. But all of those are separate issues.
>
> You’re right, it fails with this error for me, which indicates 
> haskell-build-system has a bug _somewhere_.
>

Yes, I don't think that should hold back these patches from going into wip-haskell.




Reply sent to Lars-Dominik Braun <lars <at> 6xq.net>:
You have taken responsibility. (Mon, 06 Jun 2022 11:32:02 GMT) Full text and rfc822 format available.

Notification sent to "Philip Munksgaard" <philip <at> munksgaard.me>:
bug acknowledged by developer. (Mon, 06 Jun 2022 11:32:02 GMT) Full text and rfc822 format available.

Message #22 received at 54752-done <at> debbugs.gnu.org (full text, mbox):

From: Lars-Dominik Braun <lars <at> 6xq.net>
To: Philip Munksgaard <philip <at> munksgaard.me>
Cc: 54752-done <at> debbugs.gnu.org
Subject: Re: import: hackage: `elif` conditionals not supported
Date: Mon, 6 Jun 2022 13:31:39 +0200
Hi,

fix pushed to master in commit 2c5d18e421e6c06f4a969f98585ec41aae8eb2e4.

Cheers,
Lars





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 05 Jul 2022 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 293 days ago.

Previous Next


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