From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id sCaDN3vU5WSHSgAASxT56A (envelope-from ) for ; Wed, 23 Aug 2023 11:42:20 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id sKmINnvU5WRdPQEAG6o9tA (envelope-from ) for ; Wed, 23 Aug 2023 11:42:19 +0200 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 7043642671 for ; Wed, 23 Aug 2023 11:42:19 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=YjLjlrt0; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1692783739; 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:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=0wx6mti9qOpQZNEM1pj4fFtWEPAIy49Ewl/5ebj5m98=; b=CUgdmGvEEVrfiXY/qVLwImaqwWqV6qcJ29s8Ne8PnTMdHpURTI205CuSy0CNG83SObHn4l 6b6qOrlU7+iDPy5TQifPKwcGhSxjEqoqFhO7Ape7IAJ3tz5+xRbqWXnGymESU7ca+EedwI UQMvCEo6UbwAMDjW+qFiYPTvEK0PC9LE6WAqLsD6LeDcKVFBXK8AJYmivpDCiFG33PJSnI 4U6yjdoQYzdGo8WUag675gIJB9qRbb84JtXCo0YCKFGkmngxIB0ft+lOkUEmQ1+7DkE4HS 0vH8F/LGbYiAHs3lXXOjQmD9cd4xJWSmTzK05cRklExPSgy36Yky6z1bSYdIEg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=YjLjlrt0; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1692783739; a=rsa-sha256; cv=none; b=shkIMNzKondoWLcTw7aHIwlL8BIjPfpcP6cc3hVEZxoCbRVz092P5ynQO8NXrzM1XXkGVQ SFQ92O0a9pm5aLy/Ys0+7bqtwyxeYZZlgR4Biz2SNemqP7KXkk4NoRxRciI2L7XBcHmNKU opp6wL6vC5r8uU8A0+o+MM7exHEPVhaJDLCLDNT/zCvF2BjuJAhJlADFuadpy/zWmwwt6d S+3LvPyJRXPWN24vgVmX/ojMLq+QrTMIZplHLWrkgPd26RTiczmT9QLg86Y+sngBVsRyL6 8zoznfKsczlFy2ysx3l/RkHXut7wByiaVxKpiMNK2kiEEUdz728Tb5a7xEe1yg== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qYkNE-0001IX-Dg; Wed, 23 Aug 2023 05:42:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qYkND-0001IJ-70 for bug-guix@gnu.org; Wed, 23 Aug 2023 05:41:59 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qYkNC-0000cy-Vb for bug-guix@gnu.org; Wed, 23 Aug 2023 05:41:58 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qYkNF-0002wL-Uu for bug-guix@gnu.org; Wed, 23 Aug 2023 05:42:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#65456: [PATCH v4] self: Build directories in chunks of max 25 files at a time. Resent-From: Janneke Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 23 Aug 2023 09:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65456 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Josselin Poiret , Tobias Geerinckx-Rice , Simon Tournier , Mathieu Othacehe , 65456@debbugs.gnu.org, Ricardo Wurmus , Christopher Baines Received: via spool by 65456-submit@debbugs.gnu.org id=B65456.169278371311271 (code B ref 65456); Wed, 23 Aug 2023 09:42:01 +0000 Received: (at 65456) by debbugs.gnu.org; 23 Aug 2023 09:41:53 +0000 Received: from localhost ([127.0.0.1]:32838 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qYkN7-0002vj-4r for submit@debbugs.gnu.org; Wed, 23 Aug 2023 05:41:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37276) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qYkN1-0002vQ-Uj for 65456@debbugs.gnu.org; Wed, 23 Aug 2023 05:41:52 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qYkMr-0000by-1N; Wed, 23 Aug 2023 05:41:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=0wx6mti9qOpQZNEM1pj4fFtWEPAIy49Ewl/5ebj5m98=; b=YjLjlrt0k9ohEEg3Hc5V p9M33cXYFQCJ0HiBs7a2Fkm//JrU6P5mMxnSNaOlBJ8FmWDIjYOo31LmV+QL3cXGI9hZEgsDMu7u3 VyQVEbfyzUQ6h0Vrvq2TpzSDDrbZD88DUNLLqfDb7PNzj6cj5ptfg8t1tcc1Q84vwPtOhqjziMQI1 eiWXXAlwFq4UOq7NK3JWPPfmgUgN///23Bm1z3kMAoeZFILycb1xczcBIS+umFeMnlEBIR0OiIV9X DJkxQrPt44kKo3AzySzT9WmJTarsviCpJod+Lk9wVoaQ1B9ENrpyhQVwBQp5Raip/t++qTt3iLxDu OH1LUNogOLi/Iw==; From: Janneke Nieuwenhuizen Organization: AvatarAcademy.nl References: <887d53ad5bee76b33d765e744c50e94e063b1ab8.1692723764.git.janneke@gnu.org> <87pm3e3fuu.fsf_-_@gnu.org> <871qfu8erx.fsf_-_@gnu.org> X-Url: http://AvatarAcademy.nl Date: Wed, 23 Aug 2023 11:41:31 +0200 In-Reply-To: <871qfu8erx.fsf_-_@gnu.org> (Janneke Nieuwenhuizen's message of "Wed, 23 Aug 2023 08:16:18 +0200") Message-ID: <87h6oq6qpg.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx2.migadu.com X-Migadu-Spam-Score: -5.41 X-Spam-Score: -5.41 X-Migadu-Queue-Id: 7043642671 X-TUID: HBo/CB/w3lJU --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Janneke Nieuwenhuizen writes: Hi! > Ludovic Court=C3=A8s writes: >> Janneke Nieuwenhuizen skribis: >> [..] > it still has the "gnu/packages" directory name hardcoded here. (I even > believe this was kind-of intentional, meaning not to split-up builds of > other directories...). The result is, of course, that partition always > produces an empty result for any '("guix/foo.scm") files! > > It is fixed by doing > > (cute string-append "^" directory "/" <>) Well, almost...In my test script it worked, but directory is "." in the actual self.scm. So with v3 no .go files get built at all...and then a naive `guix build hello' seems to work!; `guix shell' for example fails. Comparing the list of files from `find /gnu/store/...-guix-20230823.08 -follow' is also helpful. I realised that there's no need to use the name-based splitting hack that Makefile.am uses and changed the creation of chunks to simply use a maximum chunk length of 25 files. New version attached. Greetings, Janneke --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=v4-0001-self-Build-directories-in-chunks-of-max-25-files-.patch Content-Transfer-Encoding: quoted-printable >From ad94f06620e53fcc1495a2e2479dfc627177047c Mon Sep 17 00:00:00 2001 Message-ID: From: Janneke Nieuwenhuizen Date: Thu, 22 Jun 2023 08:30:25 +0200 Subject: [PATCH v4] self: Build directories in chunks of max 25 files at a time. Similar to split build of make-go in Makefile.am, this breaks-up building directories into chunks of max 25 files. Also force garbage collection. * guix/self.scm (compiled-modules)[process-directory]: Split building of directories into chunks of max 25 files. --- guix/self.scm | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/guix/self.scm b/guix/self.scm index 81a36e007f..fc2dfd8131 100644 --- a/guix/self.scm +++ b/guix/self.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2017-2023 Ludovic Court=C3=A8s ;;; Copyright =C2=A9 2020 Martin Becze +;;; Copyright =C2=A9 2023 Janneke Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -1210,7 +1211,8 @@ (define* (compiled-modules name module-tree module-fi= les '((guix build compile) (guix build utils))) #~(begin - (use-modules (srfi srfi-26) + (use-modules (srfi srfi-1) + (srfi srfi-26) (ice-9 match) (ice-9 format) (ice-9 threads) @@ -1244,12 +1246,23 @@ (define* (compiled-modules name module-tree module-= files (force-output)) =20 (define (process-directory directory files output) - ;; Hide compilation warnings. - (parameterize ((current-warning-port (%make-void-port "w"))) - (compile-files directory #$output files - #:workers (parallel-job-count) - #:report-load report-load - #:report-compilation report-compilation))) + (let* ((size 25) ;compile max 25 files a = time + (chunks (unfold + (lambda (seed) (< (length seed) size)) ;p + (cute take <> size) ;f + (cute drop <> size) ;g + files ;seed + list))) ;tail + (for-each + (lambda (chunck) + ;; Hide compilation warnings. + (parameterize ((current-warning-port (%make-void-port "w"= ))) + (compile-files directory output chunck + #:workers (parallel-job-count) + #:report-load report-load + #:report-compilation report-compilation)) + (gc)) + chunks))) =20 (setvbuf (current-output-port) 'line) (setvbuf (current-error-port) 'line) base-commit: f4d0d0bd5e7d0e67281d84d81068f7fd5eb480ea --=20 2.41.0 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Janneke Nieuwenhuizen | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar=C2=AE https://AvatarAcade= my.com --=-=-=--