guix-devel
[Top][All Lists]
Advanced

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

Re: Quicklisp importer bug in tarball->extract->parse


From: Pierre Neidhardt
Subject: Re: Quicklisp importer bug in tarball->extract->parse
Date: Thu, 11 Apr 2019 16:31:06 +0200

Hi!

I've had time to look at it a little.

If you want to debug, you can, for instance, put a breakpoint in
guess-requirements-from-source, then enter the following in your guile
prompt:

  ,backtrace #:full? #t

or shorter

  ,bt #:full? #t

That will print the backtrace will all local variables.


There is nothing wrong with find-files: the "dir" directory is empty.
This is because the extraction failed: 
check the exit-code of system* before proceeding, you'll see what
happens ;)

--8<---------------cut here---------------start------------->8---
(system* "tar" "xf" tarball "-C" dir file-name)
--8<---------------cut here---------------end--------------->8---

The above will error out if "file-name" is not found.  For 1am:

Queried file-name:

  "1am.asd"

Tarball actual file:

  "1am-20141106-git/1am.asd"

I don't think we can predict the root folder, and more generally
projects have different trees.
So I suggest we extract the whole tarball and proceed from there.  So
your code should work by just removing "file-name":

--8<---------------cut here---------------start------------->8---
(system* "tar" "xf" tarball "-C" dir)
--8<---------------cut here---------------end--------------->8---

Makes sense?

Unrelated comment: If I'm not mistaken, you are fetching the meta-file
and the index-file on every query.  I suggest you keep those in memories
as soon as possible (memoize them), this will allow you to iterate much
faster when developing.

It seems that you are on the right track, great job!

-- 
Pierre Neidhardt
https://ambrevar.xyz/

Attachment: signature.asc
Description: PGP signature


reply via email to

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