guix-devel
[Top][All Lists]
Advanced

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

Re: Trouble with circular module dependencies (Re: 01/02: gnu: Add ncurs


From: Ricardo Wurmus
Subject: Re: Trouble with circular module dependencies (Re: 01/02: gnu: Add ncurses-with-gpm.)
Date: Mon, 24 Jul 2017 08:37:53 +0200
User-agent: mu4e 0.9.18; emacs 25.2.1

Mark H Weaver <address@hidden> writes:

> FWIW, I would like to see us work to eliminate all cyclic module
> dependencies in Guix, by splitting up our package modules as needed so
> that they form a directed acyclic graph.

(Note: this goes off on a tagent, but I think it is still relevant.)

I wonder if maybe having a single module per package might be the way to
go.  It may seem extreme and there’s an unwelcome bit of repetition by
declaring dependent modules *in addition* to declaring packages as
inputs — but it might also allow us to “freeze” or serialize a slice of
the package graph and store it alongside the store items.

What I envision is that you could use a much richer interface (namely
Scheme itself) to explore the package closure *long after* the package
has been installed to the store, instead of having to make do with the
rather poor representation of references in the database.  You would be
able to look at the section of the graph Guix describes that resulted in
the store item(s), untangle the graph in a REPL and even use that as a
starting point to create a package variant right inside the REPL without
having to check out an older version of Guix.

This is made more complicated by the fact that we don’t have a direct
mapping of packages to modules, which means that we don’t have a direct
map from store items to Guile ELF files that could be loaded in a REPL.

If we switched to defining a single package per module, however, I think
we need some syntactic sugar to avoid declaring dependencies more than
once.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net




reply via email to

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