guix-devel
[Top][All Lists]
Advanced

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

Re: hackage importer


From: Federico Beffa
Subject: Re: hackage importer
Date: Sat, 28 Mar 2015 09:53:52 +0100

On Thu, Mar 26, 2015 at 2:09 PM, Ludovic Courtès <address@hidden> wrote:
> Could you post the actual backtrace you get (?) when running the program
> with LC_ALL=C?

I doesn't backtrace, the function just gives the wrong result. I think
the problem was caused by the character § that I did introduce to mark
some cabal test keywords. I've now changed character and the problem
seems to be solved.

>
> [...]
>
>>> I would expect the conversion of conditional expressions to sexps to be
>>> done in the parsing phase above, such that ‘read-cabal’ returns an
>>> object with some sort of an AST for those conditionals.
>>>
>>> Then this part would focus on the evaluation of those conditionals,
>>> like:
>>>
>>>   ;; Evaluate the conditionals in CABAL according to FLAGS.  Return an
>>>   ;; evaluated Cabal object.
>>>   (eval-cabal cabal flags)
>>>
>>> WDYT?

I'm not sure this can be done, because flags must be declared in the
cabal file itself and the manual is not clear if the flags are
required to be declared before they are used or not (although it would
make sense).

https://www.haskell.org/cabal/users-guide/developing-packages.html#configurations

[...]

> Looks like we’re almost there.  I hope the above makes sense!

To see how this importer (and the haskell-build-system that I've
posted) performs I've now used it with several libraries (for the
moment I've packaged 26 libraries). While it runs nicely with most of
them, a couple posed problems resulting in package definitions with
some fields empty and 1 caused a backtrace. (Once I fixed the package
manually, the build-system worked fine for all of them.)

Before working further on improving the interface, I want first to
understand what are the root causes of the errors (especially the one
causing the backtrace) and fix them.

Thanks for all your comments! I think they make sense to me and will
try to accommodate them.

Regards,
Fede



reply via email to

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