From patchwork Thu May 18 15:11:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 1509 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3877117A72; Thu, 18 May 2023 16:13:13 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 9C25E17A53 for ; Thu, 18 May 2023 16:13:11 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pzfJQ-00013S-Tj; Thu, 18 May 2023 11:13:04 -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 1pzfJP-00012B-6N for guix-patches@gnu.org; Thu, 18 May 2023 11:13:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pzfJO-0000w5-UF for guix-patches@gnu.org; Thu, 18 May 2023 11:13:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pzfJO-0005Hd-ED; Thu, 18 May 2023 11:13:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63571] [PATCH 00/14] 'guix refresh -u' updates input fields Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: andrew@trop.in, liliana.prikler@gmail.com, guix-patches@gnu.org Resent-Date: Thu, 18 May 2023 15:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 63571 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63571@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Andrew Tropin , Liliana Marie Prikler X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Andrew Tropin , Liliana Marie Prikler Received: via spool by submit@debbugs.gnu.org id=B.168442273620216 (code B ref -1); Thu, 18 May 2023 15:13:02 +0000 Received: (at submit) by debbugs.gnu.org; 18 May 2023 15:12:16 +0000 Received: from localhost ([127.0.0.1]:54068 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pzfId-0005G0-Ko for submit@debbugs.gnu.org; Thu, 18 May 2023 11:12:16 -0400 Received: from lists.gnu.org ([209.51.188.17]:58756) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pzfIa-0005Fl-Ev for submit@debbugs.gnu.org; Thu, 18 May 2023 11:12:13 -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 1pzfIZ-0000UK-5L for guix-patches@gnu.org; Thu, 18 May 2023 11:12:11 -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 1pzfIY-0000jy-Sy; Thu, 18 May 2023 11:12:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=y6lewQmkCcnZk/RTZnFhWmhWmZBSiIUZ4m+oORPrDx8=; b=DX6aZ9cI7tOO1k qLN8xapV0An6+tbHZlyydpbj7kDCeKHSoohh+C7bF1kE8ZQKZ2tIH8nEu99yn15KP8JTB2Agc80sv 93ekzrYWVl9wuhzWTGXxrQtltXx8DvwHo708o/ErnLmkJYhQJatCeJIgnOY9etuq6I3De2MhXqGK9 XEsf4EKqXiMNTDnqBe+FnDPOLCL1yr8UKxeNZCCyGu8z0RC6Ml/HCoqlElUBW3on9DgsTRkdwrbi8 MZdX1KwajgfI9Z3oseLqG+BIecPgcVpwjmHdZUdGsv6WSTcExIOw7ZJ9LXrro0aWfYDXed9/n0NLG 4Pd3WdDhlV3EvoiuohLw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pzfIY-0006QL-2D; Thu, 18 May 2023 11:12:10 -0400 From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Thu, 18 May 2023 17:11:59 +0200 Message-Id: X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Hello! Until now, ‘guix refresh -u’ would tell you what inputs need to be changed in your packages, for the ‘cran’, ‘pypi’, and ‘stackage’ updaters. With this change it changes them right away. Furthermore, ‘guix refresh -u’ will now also update inputs when the ‘cpan’ and ‘elpa’ updaters are used. Doing that for other updaters is left as an exercise to the reader. :-) I’d like to get feedback from those who use ‘guix refresh -u’ frequently, which is why I Cc’d Ricardo and Lars-Dominik, but surely they’re not the only ones! This is implemented by reifying dependency information as records part of . In the future, we could improve importers so that they fill in the ‘min-version’ and ‘max-version’ fields. In turn, ‘guix refresh’ could let you know when the version of a dependency doesn’t match, or it could add the right one or something. This would be particularly useful for PyPI, which doesn’t provide a consistent package set like package. Another thing we should do longer-term is decouple how we fetch the latest version number and latest source code (from the catalog of PyPI/ELPA/etc., from Git, etc.) and how we obtain metadata (from PyPI/ELPA/etc., from ‘requirements.txt’, etc.) Right now, many Python packages for example are handled by the ‘generic-git’ updater; consequently they do not get dependency info that the ‘pypi’ updater would get them. Decoupling would address that. One last thing: Crates remain out of the scope. As I mentioned at the Guix Days¹, I think Crates packaging as currently done is not sustainable: this new feature won’t work for Crates, just like ‘guix refresh -l’ doesn’t work for them. There’s Antioxydant and there’s , but if nobody champions to push these over the finish line, this will all get out of control for good. Thoughts? Ludo’. ¹ https://gitlab.com/pjotrp/guix-days-fosdem-2023/-/blob/main/state-of-guix-2023.org Ludovic Courtès (14): tests: pypi: Factorize tarball and wheel file creation. tests: http: Allow responses to specify a path. tests: pypi: Rewrite tests using a local HTTP server. import: utils: 'call-with-networking-exception-handler' doesn't unwind. import: json: Add #:timeout to 'json-fetch'. upstream: Replace 'input-changes' field by 'inputs'. diagnostics: Factorize 'absolute-location'. upstream: 'update-package-source' edits input fields. upstream: Remove and related code. tests: upstream: Restore test that was skipped. import: cpan: Remove unary 'string-append' call. import: cpan: Represent dependencies as records. import: cpan: Updater provides input list. import: elpa: Updater provides input list. guix/diagnostics.scm | 20 +- guix/import/cpan.scm | 103 +++++---- guix/import/cran.scm | 180 ++++++++++----- guix/import/elpa.scm | 28 ++- guix/import/hackage.scm | 90 +++++--- guix/import/json.scm | 5 +- guix/import/pypi.scm | 216 ++++++++++-------- guix/import/stackage.scm | 9 +- guix/import/test.scm | 13 +- guix/import/utils.scm | 33 ++- guix/scripts/refresh.scm | 38 +--- guix/scripts/style.scm | 17 -- guix/tests/http.scm | 46 +++- guix/upstream.scm | 181 ++++++++------- tests/cpan.scm | 34 ++- tests/cran.scm | 2 +- tests/elpa.scm | 48 +++- tests/guix-refresh.sh | 7 +- tests/pypi.scm | 473 +++++++++++++++++++++------------------ tests/upstream.scm | 199 ++-------------- 20 files changed, 946 insertions(+), 796 deletions(-) base-commit: c5fa9dd0e96493307cc76ea098a6bca9b076e012