From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id KGb3EPnO2GXMJgEAqHPOHw:P1 (envelope-from ) for ; Fri, 23 Feb 2024 17:59:37 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id KGb3EPnO2GXMJgEAqHPOHw (envelope-from ) for ; Fri, 23 Feb 2024 17:59:37 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=A1a6RZVb; 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"; 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=1708707577; 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=oEdGDRCGnScyqAQZXb7XjpgBbEf0I4B4XtLWIRlcE4U=; b=NcpOptejhqxTReCUP6Ql6zKiwsN4NtbFcLF/BLsrF8lDRgw8TqwvDulo9io4ExZmUhInXh 35QG6t8uFpvFKIIF/F+9f/hh9Qgiki4ImfQA2BqgX7nLKKAlSTD+zETWLuvS2HCSo8lOXZ +jMWA2NC03Vzuume3pKpm6Yx9viX2/oHe13HUfoPYjTNU313ZcBdlkW8KVPj+t+5aEalAU zQFVQl59AjxhG2KLb4tfbtXUFDuy1/RO4CxAC2kvWMrcpyDmlDZOxVDbURFZCexAPo/iiO Q27GAOQLTbEKj1MSxVB4Vqz9eSSmRGdPqgUEdDn95vZeEkiNC2Zl0qxKGpwL6w== 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=A1a6RZVb; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1708707577; a=rsa-sha256; cv=none; b=XrV30UWAUEpZaTpQP6GW2U8wCxqOQa0+JdZV9ZaR0CEevF4J4Fys14oLxd78409IPmTAI1 t2cWPP6IsyMYs/2vYdfwf28i0YEscyWl4aSK9uytCWB7pXyH1xKbcrTEErNesBlepjoZRj KIYj46WqKSkTwWjTvm+DgxpofmqHVYDR1ZERL+AzK3i/jOFGti8dlB6imHtY74t/XbB8zQ OWInuLULVbpr+b9fgxdj5TrJY+2oEjqQBPNkgIXglTSkl09cDnCKvXKGg5vNJ1e3yYavgO WDWwnGEeyWU2GbJQ8RnDtjW99eIcLwHxrUCvoAg1O+fnIpC2XvoyJWDRa9j/0g== 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 0DA2666F05 for ; Fri, 23 Feb 2024 17:59:37 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdYtS-0005IP-AX; Fri, 23 Feb 2024 11:59:26 -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 1rdYcE-0003Az-Qc for guix-patches@gnu.org; Fri, 23 Feb 2024 11:41:38 -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 1rdYcE-00010m-I6 for guix-patches@gnu.org; Fri, 23 Feb 2024 11:41:38 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rdYcc-0004fS-2M for guix-patches@gnu.org; Fri, 23 Feb 2024 11:42:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#69292] [PATCH 2/6] store: database: Remove with-statement and associated code. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 23 Feb 2024 16:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69292 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Christopher Baines Cc: Josselin Poiret , Simon Tournier , Mathieu Othacehe , Tobias Geerinckx-Rice , Ricardo Wurmus , Caleb Ristvedt , 69292@debbugs.gnu.org, Christopher Baines Received: via spool by 69292-submit@debbugs.gnu.org id=B69292.170870647517796 (code B ref 69292); Fri, 23 Feb 2024 16:42:02 +0000 Received: (at 69292) by debbugs.gnu.org; 23 Feb 2024 16:41:15 +0000 Received: from localhost ([127.0.0.1]:52595 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rdYbq-0004cx-I5 for submit@debbugs.gnu.org; Fri, 23 Feb 2024 11:41:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34142) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rdYbl-0004c2-B6 for 69292@debbugs.gnu.org; Fri, 23 Feb 2024 11:41:09 -0500 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 1rdYVv-0008Rl-Or; Fri, 23 Feb 2024 11:35:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=oEdGDRCGnScyqAQZXb7XjpgBbEf0I4B4XtLWIRlcE4U=; b=A1a6RZVbTN644NxQEnvu XRWJeNXslAyaCSVGAz6NkIBBLmAomUCXT+2E4RyLFcBkkB52BuwHxNus/z55R5aQYQ9xGBD7+Ymf4 qCwL/UrTMKh2iKKAcUaoPkbXqehX3gzDA9kS5aNuDDP1351Jr2ekjghcLx1d6Pt8XMoud/HP0mc8W dsigYYmjuXUV/VhWV74vCpcRpi2xakhJAHhEYdtRUEO9cGHDMtgsF8kp5rPZQlvngU2LqB1vynOMM qacXy5XST1ENLJ95DANyQUm0s8lvvYwaz76StwTXtdTatOdeDBDa3addTLBmfln0ds9liXmV0VfbG Qh6r2bVh04/Mfg==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: (Christopher Baines's message of "Tue, 20 Feb 2024 19:39:02 +0000") References: <4b6a268daab5e0b307dff2229d551a47c9fe1ebc.1708457946.git.mail@cbaines.net> Date: Fri, 23 Feb 2024 17:35:03 +0100 Message-ID: <878r3bf8aw.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) 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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -3.97 X-Spam-Score: -3.97 X-Migadu-Queue-Id: 0DA2666F05 X-TUID: jclCN/LLKDZ+ Christopher Baines skribis: > I think using dynamic-wind to finalize all statements is the wrong > approach. Firstly it would be good to allow reseting statements rather th= an > finalizing them. Then for the problem of handling errors, the approach I'= ve > settled on in the build coordinator is to close the database connection, = since > that'll trigger guile-sqlite3 to finalize all the cached statements. > > This reverts commit 5d6e2255286e591def122ec2f4a3cbda497fea21. > > * .dir-locals.el (scheme-mode): Remove with-statement. > * guix/store/database.scm (call-with-statement): Remove procedure. > (with-statement): Remove syntax rule. > (call-with-transaction, last-insert-row-id, path-id, update-or-insert, > add-references): Don't use with-statement. > > Change-Id: I2fd976b3f12ec8105cc56350933a953cf53647e8 I=E2=80=99m all for removing =E2=80=98dynamic-wind=E2=80=99, we=E2=80=99ll = have to do it to make it usable in a fiberized context anyway. I=E2=80=99ll let reepca comment. Ludo=E2=80=99.