From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id aMRgHekxEmJvHAAAgWs5BA (envelope-from ) for ; Sun, 20 Feb 2022 13:19:53 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id SNM8FukxEmJQgwEAG6o9tA (envelope-from ) for ; Sun, 20 Feb 2022 13:19:53 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1DC132D4FA for ; Sun, 20 Feb 2022 13:19:53 +0100 (CET) Received: from localhost ([::1]:49030 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nLlBw-0002YM-8l for larch@yhetil.org; Sun, 20 Feb 2022 07:19:52 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51906) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nLlBS-0002Wg-0U for guix-devel@gnu.org; Sun, 20 Feb 2022 07:19:22 -0500 Received: from [2a02:1800:110:4::f00:19] (port=34608 helo=laurent.telenet-ops.be) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nLlBO-00087B-1Y for guix-devel@gnu.org; Sun, 20 Feb 2022 07:19:21 -0500 Received: from [172.20.10.9] ([188.188.224.245]) by laurent.telenet-ops.be with bizsmtp id xQKC2600D5JHtyL01QKDB7; Sun, 20 Feb 2022 13:19:13 +0100 Message-ID: <753ba5897ed397b5e95175cd139137975245945b.camel@telenet.be> Subject: Faster "guix pull" by incremental compilation and non-circular modules? From: Maxime Devos To: Ekaitz Zarraga , Ricardo Wurmus Date: Sun, 20 Feb 2022 13:19:07 +0100 In-Reply-To: References: <2067ba1e606855eace261fd0b0ae9721b369bbd5.camel@telenet.be> <878ru5epyv.fsf@elephly.net> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-rKih8q3myBUnyfB07qnn" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1645359553; bh=e5iCtaUtC2wKFk7EfLo0ZzOU6wBBfABPBpRQARIytS8=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=i6JGuSKBzaaKzv/wgo+6qryaA3TQSIYTbqhsr8r9yUkJsZcteJfjQr3LcZgzOYKoR G0eURmw5M7/cBPkhjnbC73CgjQX8LLk//vndKIlIuSm39NDFjuLTGgZX/JoWGDdAej 8buop8XKIpaRl2QZkxZ8XqT8duuH9UHFK9Uk3k22aV24k+HKZcSCrjkGxlCWSCZfZv VDqqkfYPmsFlZfOZY9T+R5mBlYZis9u/hswaOgCW+1FVZf0tyC5WQInI04s2TjBb6W +rawtf5WhK4eviixkad39w72NlKcDM27wDL2BjRFbYwWZhHVKHYP4dHpJcPkdneuCK TCVBmQn0fAnQA== X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a02:1800:110:4::f00:19 (failed) Received-SPF: pass client-ip=2a02:1800:110:4::f00:19; envelope-from=maximedevos@telenet.be; helo=laurent.telenet-ops.be X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1645359593; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=e5iCtaUtC2wKFk7EfLo0ZzOU6wBBfABPBpRQARIytS8=; b=pD1CzWfs/5vw+eBjNzG4/eUxC3GnzauWYP7ERRVurM5frRyK1OI44bhdnasMu0PwM5mf0x OJ0FB0EkTzOQEpci7rBp7AczuiOTeEi7xEEHolti+fZTZLSsT4jfInJ8ewIUIOg6PfzfsL 659rG9YabZRwunCY0ZVdWaCkiZL9BeB79cN5mgxCaBqFlB6npnNrKFdQpdjvu6T/+oAbhg 3/Lb5FCgX2zy/1Cj8cNHxflM1NJ3efDql+n3hlk6hdTkjPrMA3A4eAFnhvF1a+06CX2UUR SQwSXYYnSrAvDATNE16tkVpagZPMcyupvdlR9DPQwsQjhc005Pi8nE/ldZMRvw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1645359593; a=rsa-sha256; cv=none; b=phStNgZ7eFrT24+GEouIofMDizjewfasavt820/HE+wtpqGQN7S7Xs5tykLdWaTxQPmJxl p4cPhVIBIH7EuIRZ9f/CSvemotjT2EKrJG9v6zXGV8Ms9cumPmQxBCURRggoJeKLULJmTo PLQ3bQYmeqqB/1BfE5j5CeD+0cARWwp/EUArLwEXGcBe/be4gHa+38GTlmmGc5L/8fDrmr w9Yt+lYPhC19p8pYozig6SmaOi52+umUVEp3zSNSF3oGDBv6KvTmaXuO23cz0M4zDyAFwW PmIqrvjAveTX0UJgrw0ePetenrk1Qx93DOQdZxnCrXh+E5NO4aHw81D05uVN4g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=telenet.be header.s=r22 header.b=i6JGuSKB; dmarc=pass (policy=none) header.from=telenet.be; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -10.53 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=telenet.be header.s=r22 header.b=i6JGuSKB; dmarc=pass (policy=none) header.from=telenet.be; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 1DC132D4FA X-Spam-Score: -10.53 X-Migadu-Scanner: scn0.migadu.com X-TUID: o37NZavFcthe --=-rKih8q3myBUnyfB07qnn Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Ekaitz Zarraga schreef op zo 20-02-2022 om 11:34 [+0000]: > Making a Guix pull is unpredictable too... An idea for making "guix pull" faster: 1. Make package imports non-circular, breaking up package modules in parts when necessary. 2. Instead of building all of Guix as a single derivation, create a DAG of derivations. More concretely: First read the *.scm files to determine which module imports which modules. Then to compile, say, (gnu packages acl), a derivation taking gnu/packages/acl.scm and its dependencies gnu/packages/attr.go, gnu/packages/base.go, ... is made compiling gnu/packages/acl.scm to a gnu/packages/acl.go. Then to build all of Guix, 'union-build' or 'file-union' is used. The benefit is that if, say, gnu/packages/gnunet.scm is changed, then the old gnu/packages/acl.go will be reused because its derivation doesn't depend on gnu/packages/gnunet.scm (*). The need for non-circular imports can be avoided by computing the strongly-connected components and compiling all the modules in a component as a single unit. Greetings, Maxime. (*) Actually I didn't verify if acl.scm depends on gnunet.scm or not. --=-rKih8q3myBUnyfB07qnn Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYhIxuxccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7unKAP9h06NYw6ZhumMA0DLdU3MnuCDp dksth2rhO2+AQvS2RQEAt+C7JD5t2z/f6OdjHLwhYZrCBgZ677/Zx0PUdu3pgQ4= =Oqk9 -----END PGP SIGNATURE----- --=-rKih8q3myBUnyfB07qnn--