> I've had this issue for a while now, while adding some packages, I'll
> create a loop in the package graph, which causes Guix to just loop
> infinitely when trying to generate derivations.
this is a great initiative. I’ve been having this issue in the past as
well, and I’d really like Guix to be a little smarter about it.
> I'm not particularly fond of the implementation, because the
> package-derivation function is called from expand-input called from
> bag->derivation, the information about the part of the graph that has
> been traversed is passed through each function.
> The seen-package-list argument could be removed, but the ordering
> information is really useful when printing out the error message. I
> think it should be still possible to generate this after finding the
> issue by searching through the graph of packages, which would allow
> removing this one argument.
> One other thought I had is that this could be extracted to something in
> guix lint, which would at least allow finding these problems, without
> touching the core derivation related code.
I’d be in favour of keeping it out of the core and stash it away in a
separate tool. Not sure if that should be “guix lint” (what about “guix
graph”?), but I would prefer that over having the code run all the time.
GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC