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 ms5.migadu.com with LMTPS id GAi2C4uDYmPQfwAAbAwnHQ (envelope-from ) for ; Wed, 02 Nov 2022 15:49:47 +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 gFKRCouDYmPF5wAAG6o9tA (envelope-from ) for ; Wed, 02 Nov 2022 15:49:47 +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 E59FF2DEC1 for ; Wed, 2 Nov 2022 15:49:45 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oqF39-0004wc-IU; Wed, 02 Nov 2022 10:49:03 -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 1oqF36-0004wP-VE for guix-devel@gnu.org; Wed, 02 Nov 2022 10:49:00 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oqF34-0006ki-R4 for guix-devel@gnu.org; Wed, 02 Nov 2022 10:49:00 -0400 Received: by mail-wr1-x42c.google.com with SMTP id j15so24911714wrq.3 for ; Wed, 02 Nov 2022 07:48:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Qd7fL7e2LJ+6vjqOZRJ2+oTC3j99kkNDDEgVTk4evLk=; b=DzzwWvtC4UhC4UePUXgmKDyl95KU25SmNU0SY4cY6JiWzvcuhShBlqd3b8FDDyB7cW cjeXQ0ng5DuBFYsKZ/00YWG86efXJ15c1N59SU1m6bVbVScixN0NA0AHfMEyT6fZpTfp uDferw6fqhVAcPIH5ZivA86gLkdaTb36cHFal5cjwnoYf98RsnIrWA3OQdACQajIPrtj yf8yWsoV0BZj4Lb0l+YYx80Ilm8yf9quFItU3d8u7rvggs+IFSmcx/NovsKJDZIUsmOj kYyEyS/T/I/wVSoHQjupG6UgId/OT2i08PTggGMuyMX1rnkd/NUOsxk6jKed/0zQzEqK LNTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:to:from:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=Qd7fL7e2LJ+6vjqOZRJ2+oTC3j99kkNDDEgVTk4evLk=; b=hkajKWbxCDtfS2ZilnJD3YeLVoiP/vFs1pOvz8r3WZQNxv40Remumu3HVxFjIqaOuU muw+qf3N18eKn6BjQ0EBx7aSUz+UTYfDXLqwiJmJ+kFPCB2hXSt/C9ixT41rTTT79f6p t3aBWeQKCbXmcV7RbIy3+qKbC+lZBHrroRAKB35LjXVbaID05nOVKrOj+5lL3AVRWhf0 LVaBXp2aRIDRZBi6hwtMgg93J/XnRCMadp+H/t+dee96Cg3CbWid4VfNRTpP4Fz6+Gas Gy6FrYDmtMSPAH9erI17mSsIRAj7vtXGY9mZ2YF8Nd3rXToy8BQ+UVTshH4OYXNMIgoU blSQ== X-Gm-Message-State: ACrzQf1R7+TGtahuBtSNGs7dS18Eo7AmUvlvw83f4Sx/yCkED3EmWylX sfyTmI7Ay5gv4XFUemnE9Em1XpYvXt4= X-Google-Smtp-Source: AMsMyM4uFKEIW0uXI3GniexUY58F+5mYZ2I3a80Cb8TwFfzQxJRLtvUm7M8R+SdlwdO2S4oh/wuKVw== X-Received: by 2002:adf:e911:0:b0:236:73b7:e668 with SMTP id f17-20020adfe911000000b0023673b7e668mr15360640wrm.96.1667400537232; Wed, 02 Nov 2022 07:48:57 -0700 (PDT) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id s12-20020a5d6a8c000000b002364c77bcacsm12977257wru.38.2022.11.02.07.48.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Nov 2022 07:48:56 -0700 (PDT) From: zimoun To: Csepp , guix-devel@gnu.org Subject: Re: splitting up and sorting commits? In-Reply-To: <87cza65i1z.fsf@riseup.net> References: <87cza65i1z.fsf@riseup.net> Date: Wed, 02 Nov 2022 15:43:59 +0100 Message-ID: <87cza5e7rk.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=zimon.toutoune@gmail.com; helo=mail-wr1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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: , Sender: "Guix-devel" Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org 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=1667400587; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=Qd7fL7e2LJ+6vjqOZRJ2+oTC3j99kkNDDEgVTk4evLk=; b=rSagr7TC+kHnlonAC7toceMHDVN3NZA2oI5433rz6OTpXrY8LsK/YJ4P70PZ5mP6FKxz5W olWNz+PoKyie+TIBxHl9tU4kpF4SDr/GUkHPJynnmE0sJh2D5Fhxb9mkehsMIuytMWaPCa EYKlGFV4gojmPnLKFyjSo1t1lV/7GYIMFerp4O87pJoPRp7gaZg/ykxFVZzyoimRWNSMc/ 4Qq8aTty14XyKLYkKKXMDUKqE8H1mY9dGFvu19+3yipMK82ptTrgikSunDWOrabCmpJF3b jhttCZrp/WaTFMq1hLtEw8GFzmVNrn1ei3zSLJ3oiA0kplszvepL3baekPGudw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667400587; a=rsa-sha256; cv=none; b=B3LGk8tTgSgYNZ9yI0nQJSDqHGy/yCxHK5Ay/GFOB6TMdL8YwRlW+PSGF6GtSui1VF7jkV qhGuzZ/Ph9zOaylrXOoAYNl8pneSZ05k8c7spjdcWkQUeyDy1ZWSmdyztnr34SJorI1H8b UIwG7fYj9Q61y2tHF1cp9EyW9guqnYq1Cq/ACYYVwQGaZ5ykWmbh6qMWCgi11xaHfwndbu CW6iZEIuDKogJYzqQOKk9sFUA0/LWbt4yyeQWGeJJ0GhKG1heYwRT8NtzUFawqYlalhfKp /0hXOOJKdLPw/sKd7IYhgt89P6gWXeW7OjLch7sl0K46WES5E3+jg1sHGodEuw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=DzzwWvtC; dmarc=pass (policy=none) header.from=gmail.com; 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: -3.49 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=DzzwWvtC; dmarc=pass (policy=none) header.from=gmail.com; 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: E59FF2DEC1 X-Spam-Score: -3.49 X-Migadu-Scanner: scn0.migadu.com X-TUID: GSALkcNHJ7nA Hi, On mer., 02 nov. 2022 at 00:05, Csepp wrote: > I'm working on a fairly sizeable MirageOS branch, just getting the > hello-world kernel running involved adding about 40 packages. Very > often I run into a scenario where an imported package needs some other > package to compile, and then that needs another, and then that another, > and so on and so on, so by the time I can commit the first I have a > plethora of new packages that should in theory all get their own > commits. > There are two problems with this: > * Splitting up the commit is a pain, even with git add --patch, because > hand editing the diff sucks and splitting does not work, possibly due to > there not being enough space between defines for git's taste. > * It is very easy for package to get added before their dependencies, so > even though by the end of the commit chain everything builds perfectly > fine, there are intermediate commits that can't be tested on their own. > > How should one solve this? I already spent way too much time on a > script that I foolishly thought would be able to automatically sort > commits based on their dependencies, but now I'm throwing in the towel, > it's not getting anywhere. Well, I do not know if I am answering the questions. :-) Maybe what you are looking for is ./etc/committer.scm which tries to split the complete change to small chunks and commit them. Recently, I was updating Julia packages and I hit something similar. Well, I have started with =E2=80=9C./pre-inst-env guix refresh -u -m julia-packages.scm=E2=80=9D and then =E2=80=9C./pre-inst-env ./etc/commiter= .scm=E2=80=9D which leads to ~140 commits. Next, I add the missing packages (committing them individually) such that the final state just builds and I fix some tests etc. Last, I rebase all and edit the history. Using Magit and Emacs, it is really straightforward. The main issue with large change is on one hand to have that each atomic commit builds fine and on the other hand keep each commit as atomic as possible. Well, from my point of view, it is tradeoff =E2=80=93 personally, I am ready to have some commits that do not = build and keep them atomic. Well, I have also spent too much time trying to find the correct order. I also tried to an ugly script using the DAG to sort the packages but then some updates require other specific version=E2=80=A6 and it is nearly impossible to satisfy all the constraints. Cheers, simon