From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id KIqADpTuRWdUMAEAqHPOHw:P1 (envelope-from ) for ; Tue, 26 Nov 2024 15:51:48 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id KIqADpTuRWdUMAEAqHPOHw (envelope-from ) for ; Tue, 26 Nov 2024 16:51:48 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=TA5M6EAG; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=O4QtdgTk; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1732636308; a=rsa-sha256; cv=none; b=hLmK2sQ4V4tlNRg5+hAEeoegLHP5qt1JEhTxvjesHAnBB7bJcTYxgEOjC2VDCntTSROTSc GTjRronaQLXoBl1bv2lDQZ0TkspTsWsc5fX1gx2bpJOKLLMZissPDsYYddDQUgLxsXu336 /GjPSxxHJ/DLS4CA3JlvE2OtYq3VYhqwjZZRTQn/rdI4XnsGuRNhxomemH/iIiH9dK3x5N 7ZxNN55wUxsvm1x6p+TZD7vXlSqDWYfdZUhagB89p7we+lI7D+oa7Jw9o9HFQwMAz/c+gU 9gqoXYFjztt+ffQHO1JpXho7gHpRXGG5bbj4E4mlwHt/+WRB7jtsCa/UAhYZMA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=TA5M6EAG; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=O4QtdgTk; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1732636308; 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: content-transfer-encoding:content-transfer-encoding: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=9LUMkWi/vXUXfH/gGX2uBl9/XMPulNlym9aDol7qtjk=; b=QFTPTsUHyyjo74jn2rkImOcxQj47P8g04NRAkJZJ6tYYXNxf/ES3hIugmp+hZCWh/xv0cX CU8oc8EED5Eria+yd8ua6bmsHV6mb+AEmMx/2tdtrSTLFS5sSwYkBNRB5sdaU6JZK3iV52 cIspliezcp4dQpllb9jElN9fLAq0rqYt8s3Sqp/SRQd4Nc4y2dhtEiZVGO/mC7b4ZEjDcw 0fWtf7LLYL4p8/BbslDSIDt+srp4lCrM6LxsgTJe/zw5hYFdfTnhGKpk492vubeWxm2fOc 6Cz1r1oIZE4emrb0767jYyYwPOswnbCQI7fyWxHc3iwlOwqjAPNh8Isv8hb8Ug== 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 08AE75883 for ; Tue, 26 Nov 2024 16:51:48 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFxqG-0005A8-RV; Tue, 26 Nov 2024 10:51:08 -0500 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 1tFxqC-00057g-7m for guix-patches@gnu.org; Tue, 26 Nov 2024 10:51:04 -0500 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 1tFxqB-0004Ks-Vi for guix-patches@gnu.org; Tue, 26 Nov 2024 10:51:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=9LUMkWi/vXUXfH/gGX2uBl9/XMPulNlym9aDol7qtjk=; b=TA5M6EAGiL0/9vwU7Q5OhT19r9YRFh3Km9oGywPfgyaDlKhqwNFpSjglzPMrrHYSqhF4FzlyQwLoFKHJhjMTqiXpsCTWIBp7PHH874artahUpRwTXUmOXcGL5h69nuPRbB/gbwyB+dIKl1YXWYzNmpXllYu+aDX1UOj48oU/SKzUEL+QIi5lobqOz/5BVVNEPXfBz5waxdyIQ+ERGxzNOWiyi1mGy07s78ZRkqVpmHlU3to2G2LgqhRa5LXK+ncBTpVgy25n8tz9VPBCGIujMRn+4oHtAH0I9nEgX9SfAQzXYkQjoNMJc508SVUuJzaFOPVSYh4O4c3giki29QOc3g==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tFxqB-0000sp-Qe for guix-patches@gnu.org; Tue, 26 Nov 2024 10:51:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74542] [PATCH 04/11] build: Add =?UTF-8?Q?=E2=80=98--development=E2=80=99?= option. Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 26 Nov 2024 15:51:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74542 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= , 74542@debbugs.gnu.org Cc: Josselin Poiret , Maxim Cournoyer , Mathieu Othacehe , Ludovic Court?s , Tobias Geerinckx-Rice , Christopher Baines Received: via spool by 74542-submit@debbugs.gnu.org id=B74542.17326362393275 (code B ref 74542); Tue, 26 Nov 2024 15:51:03 +0000 Received: (at 74542) by debbugs.gnu.org; 26 Nov 2024 15:50:39 +0000 Received: from localhost ([127.0.0.1]:50149 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFxpm-0000qe-Hr for submit@debbugs.gnu.org; Tue, 26 Nov 2024 10:50:38 -0500 Received: from mail-wm1-f45.google.com ([209.85.128.45]:48146) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFxpi-0000qG-JJ for 74542@debbugs.gnu.org; Tue, 26 Nov 2024 10:50:35 -0500 Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-4315e9e9642so53363495e9.0 for <74542@debbugs.gnu.org>; Tue, 26 Nov 2024 07:50:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732636174; x=1733240974; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=9LUMkWi/vXUXfH/gGX2uBl9/XMPulNlym9aDol7qtjk=; b=O4QtdgTkpNXAa43m6hdnCGnU8IEWjmxRPXqXkqgcHxMdLEvCHSlKmh71sF+Y9pcr2s OJK8H2wgona1B3IBhiyvoF1T7qZTHwKUqIY+dZM/fDSdxftHQH7bxMUfMWty0o5+hkNe HCBy9nP+Wo91GNczq7n4pLS39I90Sl2Rvx+sIhcTYFJncyQx4R3odwuI1MvIZv9b4AJb lo5CqZy6vIiYaPenfFA27w3HW/jtMfuNsdQiiEHJLzAyVKigzqh8rgWO3y+eRwRshVSr ohdqAJ+FMDbGJLc6tJHr8rj/dnOO7a5YNtVw7S4zDvn/a+t/NbG1+I9iYCeHtngmuYl4 SFDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732636174; x=1733240974; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9LUMkWi/vXUXfH/gGX2uBl9/XMPulNlym9aDol7qtjk=; b=Ed5HBmDRZ1oHaLetBD7njYSqJxNTk/+4B78DtWBGjcRLMF5K6abQWHV0IxW2xxvuXI ZdtEfeKcWe1VX0kShRgoLB1QymWbvqGfZH/Qr5EFLP0je1bXMLBvzA+pA2TAUaYUHUwS SPBataQyHG1E2w+pS1FCZcYse6nPQ1AI2rpj8/3bnUlq5VS5IqahPDSyaaGhsrv2UBWh 8+Bwx3hUCvVjL3OAa2a2qGNgT+nfIff9RYz3a+QSR/+bAvDC3+SgalMFbh1KUAV8C2xg 3WU1Vc2Y0hEHv5xVcieetlNOKG4kURXQxR0t+gntT4ovZJC8ctpdg9BHAql42Au+jkfd GDxw== X-Forwarded-Encrypted: i=1; AJvYcCUVaPWbp3ey1r7wvASud+zbpMXbHtXzPk9ktrUYqvqo4GInAXRRAOUFK5PYSGrpvvRXUU1gHw==@debbugs.gnu.org X-Gm-Message-State: AOJu0YxcxYKG6CQFQsSnvpZ6kiPM8WdQXUiPV4Rx35r94PIcc/EwvhlR eGwLGr0uebPtOxtuebbeRSDtknNbyzg7nifsLYUrL91EpdKwsMj+ X-Gm-Gg: ASbGncv/O1tOQ1MTkGiMZvmGkeL1hsbq0QM0ohvd3MLJZhQ79Oz/++o58W+7W8bTEAl XJWoEHgFFRbhMc90Awzx+ZKUqn2fPjKe76R0vNAodqJ8Z7hP7YiGtHfimfrjEC4/J7zJwMZjius BIYlZENJrnHSsUSKfCtw4xrOL+nUr7Kkv/rVJNJ/oheZ15ZuDU+Gmw0BfNeldtQwcYJCmEgTk46 5Hnsnlbfl3VAWckBbPtFzxuJgnmyEmTfyWcvUErgk3ad/k= X-Google-Smtp-Source: AGHT+IEaIwcPVoTG7e/A9wXWuGn3ufNJ/xLW5pKLBsujMj1T7agdjDxmMdBuzMbBE+/w1QCl/pTwrQ== X-Received: by 2002:a05:600c:348f:b0:434:9da3:602f with SMTP id 5b1f17b1804b1-4349da36119mr91988705e9.16.1732636173812; Tue, 26 Nov 2024 07:49:33 -0800 (PST) Received: from lili ([2a01:e0a:59b:9120:5ac:5c58:da2a:61ba]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4349f2e1b3bsm80935495e9.25.2024.11.26.07.49.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2024 07:49:33 -0800 (PST) From: Simon Tournier In-Reply-To: <7c530a62370853828f181db011cb2f12fdc78847.1732615193.git.ludo@gnu.org> References: <7c530a62370853828f181db011cb2f12fdc78847.1732615193.git.ludo@gnu.org> Date: Tue, 26 Nov 2024 16:26:25 +0100 Message-ID: <87o7222ezi.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 08AE75883 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -4.53 X-Spam-Score: -4.53 X-TUID: IRx2Yi/Sm2C6 Hi, Here the oneline commit message is: build: Add =E2=80=98--development=E2=80=99 option. when elsewhere in the same series, it reads: guix build: Add =E2=80=98--dependents=E2=80=99. I suggest consistency; =E2=80=99build:=E2=80=99 or =E2=80=99guix build:=E2= =80=99 for both. On Tue, 26 Nov 2024 at 11:33, Ludovic Court=C3=A8s wrote: > + ;; Process OPTS in "the right order", meaning that if the user typed > + ;; "-D hello", arrange to see the 'development? option before the "hel= lo" > + ;; spec. > + (let loop ((opts (reverse opts)) > + (type 'regular) > + (result '())) > + (define (for-type obj) > + ;; Return a list of objects corresponding to OBJ adjusted for TYPE. > + (match type > + ('regular > + (list obj)) > + ('development > + (if (package? obj) > + (map manifest-entry-item > + (manifest-entries > + (package->development-manifest obj system))) > + obj)))) Well, the loop seems overcomplicated but nothing better to propose. ;-) > + (match opts > + (() > + (reverse result)) > + ((head . tail) > + (match head > + (('argument . (? string? spec)) > + (cond ((derivation-path? spec) > + (catch 'system-error > + (lambda () > + ;; Ask for absolute file names so that .drv file > + ;; names passed from the user to 'read-derivation' > + ;; are absolute when it returns. > + (let ((spec (canonicalize-path spec))) > + (loop tail 'regular > + (cons (read-derivation-from-file spec) > + result)))) > + (lambda args > + ;; Non-existent .drv files can be substituted down > + ;; the road, so don't error out. > + (if (=3D ENOENT (system-error-errno args)) > + (loop tail 'regular result) > + (apply throw args))))) > + ((store-path? spec) > + ;; Nothing to do; maybe for --log-file. > + (loop tail type result)) > + (else > + (loop tail 'regular > + (append (for-type (specification->package spec)) > + result))))) > + (('file . file) > + (let ((file (or (and (string-suffix? ".json" file) > + (json->scheme-file file)) > + file))) > + (loop tail 'regular > + (append (append-map > + for-type > + (ensure-list (load* file (make-user-module '(= ))))) > + result)))) > + (('manifest . manifest) > + (loop tail 'regular > + (append (map manifest-entry-item > + (manifest-entries > + (load* manifest > + (make-user-module '((guix profiles) > + (gnu)))))) > + result))) > + (('expression . str) > + (loop tail 'regular > + (append (append-map for-type (ensure-list (read/eval str= ))) > + result))) > + (('argument . (? derivation? drv)) > + (loop tail 'regular (cons drv result))) Since you are at it, why not move this pattern close to the other pattern matching =E2=80=99argument=E2=80=99 too? Cheers, simon