From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:45814) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i81Vb-00024l-6D for guix-patches@gnu.org; Wed, 11 Sep 2019 08:14:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i81Va-0006uq-1U for guix-patches@gnu.org; Wed, 11 Sep 2019 08:14:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33280) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i81VZ-0006ui-Ts for guix-patches@gnu.org; Wed, 11 Sep 2019 08:14:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i81VZ-0003iV-NV for guix-patches@gnu.org; Wed, 11 Sep 2019 08:14:01 -0400 Subject: [bug#37346] [PATCH] Move diffoscope from package-management to it's own module. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87ftl6cqfc.fsf@yucca> Date: Wed, 11 Sep 2019 14:13:38 +0200 In-Reply-To: <87ftl6cqfc.fsf@yucca> (Vagrant Cascadian's message of "Sun, 08 Sep 2019 16:35:19 -0700") Message-ID: <87woefvxn1.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Vagrant Cascadian Cc: 37346@debbugs.gnu.org Hello! Vagrant Cascadian skribis: > I was having infinite recursion issues importing additional modules such > as android.scm, bootloaders.scm and statistics.scm into > package-management.scm with use-modules calls, along these lines: > > error: googletest: unbound variable > hint: Did you forget a `use-modules' form? Circular module dependencies alone shouldn=E2=80=99t cause these problems. Problems arise when those modules that depend on each other refer to variables exported by one another *at the top level*. That typically happens if, say, in android.scm you=E2=80=99d do: (package (inherit diffoscope) =E2=80=A6) > Moving diffoscope to it's own package module seemed to at least work > around the issue. Diffoscope itself attempts to deal with an arbitrary > and growing number of file types, so pulls in quite a few other package > modules, so at least splitting it into a separate module might limit the > impacts on other modules. > > Attached are two patches attempting the split; comments welcome! The split is a good idea anyhow! > From 352058f2ef002e77df6633c00ba009088bf5e8bd Mon Sep 17 00:00:00 2001 > From: Vagrant Cascadian > Date: Sun, 8 Sep 2019 14:36:33 -0700 > Subject: [PATCH 1/2] gnu: Move diffoscope and trydiffoscope to new > diffoscope.scm. > > * gnu/packages/package-management (diffoscope): Remove variable. > (trydiffoscope): Remove variable. > (use-modules): Remove modules only needed by diffoscope. > Update copyright information. > * gnu/packages/diffoscope.scm: New file. > (diffoscope): Add variable. > (trydiffoscope): Add variable. LGTM. > From c4ef8545514b4d594ab6fc083c954a22eace3786 Mon Sep 17 00:00:00 2001 > From: Vagrant Cascadian > Date: Sun, 8 Sep 2019 15:35:33 -0700 > Subject: [PATCH 2/2] gnu: diffoscope: Add additional test dependencies. > > * gnu/packages/diffoscope (diffoscope)[native-inputs]: Add abootimg, dtc, > and r-minimal. > (use-module): Add android, bootloaders and statistics, respectively. Note that we don=E2=80=99t usually mention =E2=80=98use-module=E2=80=99 cha= nges in commit logs. Anyway, LGTM, thanks! Ludo=E2=80=99.