unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: c4t0 <c4t0@riseup.net>, Guix Devel <guix-devel@gnu.org>
Subject: Re: guix import hackage fails with errors, and failed tests
Date: Wed, 24 Mar 2021 22:12:38 +0100	[thread overview]
Message-ID: <86o8f8b6ih.fsf@gmail.com> (raw)
In-Reply-To: <874kh07317.fsf@riseup.net>

Hi,

On Wed, 24 Mar 2021 at 16:41, c4t0 <c4t0@riseup.net> wrote:
> zimoun <zimon.toutoune@gmail.com> writes:

> yes! I don't know if is really related with
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=35743 and is a layout
> problem or it doesn't know how to parse 'common'.

I have not read carefully the bug report you mention, neither the
parser.  I guess the parser does not know how to parse ’common’.


> running
> $cabal format package.cabal

You can do that that locally.  Well, currently all the importers via
“guix import” should be considered as helpers to ’import’, not as
bullet-proof ’converters’.


> I think it might be a good idea to run 'cabal format package.cabal' some
> how, before parsing. That will give us a consistent format that might
> address the #35743 bug also, and remove formatting variance that a
> package mantainer may introduce to make things more legible to him.

The «somehow» cannot be using Guix.  Otherwise, it means that Guix would
depend partly on Haskell ecosystem.  That’s why there is a Cabal parser
written with Guile.  Somehow. :-)


> Also is easiest than propagate a set of default options to other
> targets, but I think the best argument is the former.
>
> maybe modify cabal.scm::read-cabal to make a temporary file with the
> input port, run 'cabal format tmp-file' and then change the port to use
> that temp file?

The issue with this is that Guix would somehow depend on Haskell.  And
it would not happen: GHC is not bootstrappable, is huge, etc.


> If it's ok, I'll give it a try, for now touching the parser it's a
> little out of my reach.

Well, if your aim is to produce the Guix definition of ghc-dec, you can
try to run your trick locally.  As said, “guix import” are importers and
not converters, which means it helps to produce a Guix package
definition from a <Foo> package definition i.e., it is not a
bullet-proof converting all the cases; cases probably without a clean
<Foo> grammar.

In other words, to resolve the issue you are pointing, the fix is to
improve the Guix parser of cabal, IMHO.  I hope that this does not
prevent you to contribute by adding ghc-events. :-)


Cheers,
simon


  reply	other threads:[~2021-03-24 21:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-23 22:54 guix import hackage fails with errors, and failed tests c4t0
2021-03-24 15:13 ` c4t0
2021-03-24 16:58 ` zimoun
2021-03-24 19:41   ` c4t0
2021-03-24 21:12     ` zimoun [this message]
2021-03-25 19:23       ` c4t0
2021-03-26  4:37         ` zimoun
2021-03-26 20:21           ` c4t0
2021-03-26 22:37             ` zimoun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86o8f8b6ih.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=c4t0@riseup.net \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).