From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Sassmannshausen Subject: Re: Trouble with circular module dependencies (Re: 01/02: gnu: Add ncurses-with-gpm.) Date: Wed, 26 Jul 2017 09:30:09 +0200 Message-ID: <87h8xzd5a6.fsf@gmail.com> References: <20170715081544.12288.82778@vcs0.savannah.gnu.org> <20170715081545.DB2A022E4F@vcs0.savannah.gnu.org> <877eyyyes0.fsf_-_@netris.org> <87y3renq4j.fsf@gnu.org> <87d18o6wah.fsf@elephly.net> Reply-To: alex.sassmannshausen@gmail.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59589) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1daGlt-0000S5-Ip for guix-devel@gnu.org; Wed, 26 Jul 2017 03:30:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1daGlp-0005YH-KC for guix-devel@gnu.org; Wed, 26 Jul 2017 03:30:17 -0400 In-reply-to: <87d18o6wah.fsf@elephly.net> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ricardo Wurmus Cc: guix-devel@gnu.org Ricardo Wurmus writes: > Ludovic Courtès skribis: > >> Mark H Weaver skribis: >> >>> 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. >> >> This seems hard to achieve, unless we use one file per package. > > Are there drawbacks to using one file per package other than it’s a bit > “heavy” due to all the boilerplate of license headers and module > definitions? I have two thoughts that are related to this: - languages like Perl, which have tons of modules on CPAN, a great number of which are incredibly simple and small: we are literally talking about adding 100s of files. This is quite different from adding a "program", such as Emacs, a larger, well-defined definition. I don't think the Perl example is a stopper, but perhaps something to consider in terms of performance/implementation. - If we take this direction, perhaps we should aim to have a helper commandline script to which you can pass the dependencies, and which takes care of writing the boilerplate as well as importing the appropriate modules? Alex