guix-devel
[Top][All Lists]
Advanced

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

Re: Dependency cycle issues when using a Gexp-based snippet


From: Maxim Cournoyer
Subject: Re: Dependency cycle issues when using a Gexp-based snippet
Date: Mon, 14 Sep 2020 12:55:10 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Hello Ludovic,

[...]

>> What is the difference between delayed and thunked? Would a thunked
>> capture the closure of its environment while delayed not?  Is the
>> closure useful to access record-bound values such as the version field
>> of a package?
>
> ‘Thunk’ uses an actual thunk (zero-argument procedure) that’s called
> each time the field is accessed; ‘delayed’ uses a promise, which is
> similar except that the result is memoized (info "(guile) Delayed
> Evaluation").

Thanks for the explanation!  Now I wonder why delayed should not always
be preferable to thunks?  Is there a reason to offer thunked as well?

[...]

> What would be interesting is a comparison of the performance of
> ‘package-derivation’, which can be done with something like:
>
>   time guix build -d --no-grafts libreoffice pandoc
>
> For memory consumption, try:
>
>   GUIX_PROFILING=gc guix build -d --no-grafts libreoffice pandoc

Thanks for these "benchmarking" tips :-).  Unfortunately, making the
'snippet' field either thunked or delayed causes 'guix build' to stop
working entirely, peaking the CPU and slowy eating RAM away (looks like
a typical dependency cycle).

I'm at a lost as to how this can be debugged.

That's unfortunate, because as it stands, Gexp-based snippets don't seem
very usable.

Thank you,

Maxim



reply via email to

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