From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <guix-patches-bounces+larch=yhetil.org@gnu.org> Received: from mp2.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 2JiHByl2pmXtywAAe85BDQ:P1 (envelope-from <guix-patches-bounces+larch=yhetil.org@gnu.org>) for <larch@yhetil.org>; Tue, 16 Jan 2024 13:27:21 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id 2JiHByl2pmXtywAAe85BDQ (envelope-from <guix-patches-bounces+larch=yhetil.org@gnu.org>) for <larch@yhetil.org>; Tue, 16 Jan 2024 13:27:21 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=d6s7jYQY; dmarc=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=1705408041; 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-to: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=uaY98vGYdWW+zzJ5krnvvYsjonY9lLzjAMEuYHePo0w=; b=SZBMGzmRRwTB86amzQEKXzTuYwb7LI9EdEgNiu0rVeURqTeqAg45S5jymhl9MpI92r/a/5 ss0l0DiUbPc+zTV2IWnpSGJQapB6/WEhEmO3pNilnVt9iD/YL+QRFYCn6BhU1ZiRwx0xzT m7PJTBecoPIqtBOwO+xUTQ84zxH9c8Zz0wdv0hY4hkgzh8CXUg2EUXskkCQxaOD2/Ph7T3 3ojSLWw1MUqNCqor23hRFHxbygecQDN52t8zZ0pA1msY54NKO3oxIkNNrWGPt1vkg8DJlK 7LClyssOy0jiTDS5+o23kye2VUi3h0aO5s60G59xsdpipk9pNdVlHlsgHRugJQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=d6s7jYQY; dmarc=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=1705408041; a=rsa-sha256; cv=none; b=txY6486vFPZnZ5LgVxFubn1BxBezlR2R2LBl25LXPFy1l3LETP2wpsEeFaW9jslfyYdIvq hT85mHGTsWY445hYGDATvdc5q2q6RuZAHZqOk6+3te/zuzq/6u4HIqmLko1ucpErBZ9T++ sRvanJPDJ75zvpqMd03WG7yD9x8tesOvQbUUHcyejo9/IytqlsDZVd1UMhrDoHkBn6fTAY +OLah021Aav4KySW/L6z5+G6XM9v7dn5hQuOqe3H66C50oFkZ7SqOb8XwaPBsS2xAfQKsB 5WQtGpn03Bg1CJJny+jdGXI2+nkaumSA6di/Zu7XFEHtWyHO+anlCjgKi+JxAQ== 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 B7E7231CA7 for <larch@yhetil.org>; Tue, 16 Jan 2024 13:27:20 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces@gnu.org>) id 1rPiX2-0007RI-2L; Tue, 16 Jan 2024 07:27:04 -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 <Debian-debbugs@debbugs.gnu.org>) id 1rPiX0-0007R1-AO for guix-patches@gnu.org; Tue, 16 Jan 2024 07:27:02 -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 <Debian-debbugs@debbugs.gnu.org>) id 1rPiX0-0000IH-1C for guix-patches@gnu.org; Tue, 16 Jan 2024 07:27:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1rPiX0-0006t5-CK for guix-patches@gnu.org; Tue, 16 Jan 2024 07:27:02 -0500 Subject: bug#68346: [PATCH 0/2] semver aware cargo refresh Resent-From: Efraim Flashner <efraim@flashner.co.il> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-To: guix-patches@gnu.org Resent-Date: Tue, 16 Jan 2024 12:27:02 +0000 Resent-Message-ID: <handler.68346.D68346.170540799426426.done@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 68346 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: David Elsing <david.elsing@posteo.net> Cc: 68346-done@debbugs.gnu.org, Jaeme Sifat <jaeme@runbox.com> Received: via spool by 68346-done@debbugs.gnu.org id=D68346.170540799426426 (code D ref 68346); Tue, 16 Jan 2024 12:27:02 +0000 Received: (at 68346-done) by debbugs.gnu.org; 16 Jan 2024 12:26:34 +0000 Received: from localhost ([127.0.0.1]:47997 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1rPiWX-0006sA-Ny for submit@debbugs.gnu.org; Tue, 16 Jan 2024 07:26:34 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:59624) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <efraim.flashner@gmail.com>) id 1rPiWV-0006ru-9r for 68346-done@debbugs.gnu.org; Tue, 16 Jan 2024 07:26:31 -0500 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-40e86c86a6fso1369345e9.2 for <68346-done@debbugs.gnu.org>; Tue, 16 Jan 2024 04:26:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705407985; x=1706012785; darn=debbugs.gnu.org; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender:from:to :cc:subject:date:message-id:reply-to; bh=uaY98vGYdWW+zzJ5krnvvYsjonY9lLzjAMEuYHePo0w=; b=d6s7jYQYe3LpY+hYd5dXQMQe7bBLO9f1ZeltHPQWyStv/e4HFvmoJoTve45MFsQbeY fHqAkCFx7Xn4zYeGQT/E/BkZr+hMvLsrUBcI4yh8XjBB4mLrqQDxxv9QZmThxJgU3mzO MMMge9HWS4TWzYNczwnFB2IF8/iUPeoeLODtxgAD9QzCLyj5zBt0RmPkVBzcx3wjkoJ3 exKM6i/RCKEU87AlBC6g5cCrMvVMwvJ587dmlJbhoDNaNZGb82A0hhwpwSCMzXl2Fi6v h4SC5s2F4hjbYQHmQvCZOqfitt5tTZpQDzh6vu21yAmn9/Hfzna2rgZofq62F+Urk1hG xnmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705407985; x=1706012785; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=uaY98vGYdWW+zzJ5krnvvYsjonY9lLzjAMEuYHePo0w=; b=qCVlUI8dV7TI82Q4uSE9H9Y1T/LsIWJKdH6KjKlSDQvY/ZjaMXDhundMAUgHOEy4JV 2sPjVwjirEMiC3BTTP2Oik0BhpSxV0fr1EwrVhzRk+X6YFeTnNxnJBTitnxbOoaI48Np gNSuk8fWI9PyYxviR5kpEmETcTrVdneFcrfabLTLDdscDyY9/Md1PjGY+bnfWneA10c8 czU4qkPfddIZ9/iE/n+0prAsYS/2y+uVPeZkaag1qGPIZ6AXLLc9o0yfl+Un0UT8qZ3y bctCqjzkh3yp1fqw+lYLJrr5ZpeimCtbksC0szeotwMjSoKy0aWoZ43sdUvOrOt/FpC8 qmtQ== X-Gm-Message-State: AOJu0YyJtEky4IXkAMi25a5bN0jIe33W8KynHuh9aWBW2RULgS0MavxW YpePoh5KkM807RngLDZk7MTG2srNWXo= X-Google-Smtp-Source: AGHT+IEjz+zhVUqFgnxP/PTzTBSnSbIEIH/Rr05FVfU1EuzHLD+waNvpel69l3yJ0ewRpyzDedXe9w== X-Received: by 2002:a05:600c:4686:b0:40e:6305:88a0 with SMTP id p6-20020a05600c468600b0040e630588a0mr2032808wmo.112.1705407984486; Tue, 16 Jan 2024 04:26:24 -0800 (PST) Received: from localhost ([141.226.15.142]) by smtp.gmail.com with ESMTPSA id b20-20020a05600c4e1400b0040e7cff8d4dsm2882129wmq.21.2024.01.16.04.26.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 04:26:23 -0800 (PST) Date: Tue, 16 Jan 2024 14:26:21 +0200 From: Efraim Flashner <efraim@flashner.co.il> Message-ID: <ZaZ17dDKOuBLQJup@3900XT> Mail-Followup-To: Efraim Flashner <efraim@flashner.co.il>, David Elsing <david.elsing@posteo.net>, 68346-done@debbugs.gnu.org, Jaeme Sifat <jaeme@runbox.com> References: <cover.1704805408.git.efraim@flashner.co.il> <86mst8vzwc.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="DaK+yRH9qnPUJWlF" Content-Disposition: inline In-Reply-To: <86mst8vzwc.fsf@posteo.net> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=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-Spam-Score: -1.43 X-Spam-Score: -1.43 X-Migadu-Queue-Id: B7E7231CA7 X-Migadu-Scanner: mx12.migadu.com X-TUID: PJhJxCyafz8a --DaK+yRH9qnPUJWlF Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jan 14, 2024 at 12:54:27PM +0000, David Elsing wrote: > Hello, >=20 > Efraim Flashner <efraim@flashner.co.il> writes: > > These patches make 'guix refresh' take into account the semver of the > > crate and only suggest upgrading to one which still matches the semver > > constraints and isn't yanked. Then I went and used the functions to > > factor out some of the other code. >=20 > thanks for cleaning this up a bit! I tested your patches and only found > the (minor) issue that an exception is thrown instead of returning #f if > there is no non-yanked package available. The minimum element can also > be found without sorting, so I would suggest something like the > following changes: I still think I like sort better, but it definitely doesn't do as good a job of taking care of the #f case as your code does. I incorporated your changes and pushed them. --=20 Efraim Flashner <efraim@flashner.co.il> =D7=A8=D7=A0=D7=A9=D7=9C=D7=A4 = =D7=9D=D7=99=D7=A8=D7=A4=D7=90 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --DaK+yRH9qnPUJWlF Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmWmde0ACgkQQarn3Mo9 g1Fe2w/9HOngHFw9Kk2pp3OFX3OUYeNyo3GrAG4LmITBZhHUGzAhgcpdpsF+m6D0 S24H9UxQ1jA5hKs7/T92811SqdUUYKkgk6yz/nF+phTNgx00htxS0azEF0R1l/FX 2Iq1llu2XD8vmreBxoPxJolHN3DLFxo328vBei42USNJpU9RM7Ejc0o2j//GCUqU QiZJVqRa8wIj/N3T5EwBRf+1GzmGRFZOLgw0eXR5nzp/HRJcrFcp6pMNOhedoFXp mf92okG/0KQ08drG3A3bDnHCJloSthJ0E7+N/RkvSyKWFP+io0Qx6xFUzu/Xfcrm wiqcDLCGrjw3qoX6pBQt5XFjDQLdB8AZWZXzTdVc6DyuFZdPTwTJerE40WCiWMEG F1QhATFWmPAlbmwie885I9hmQ59aOpuGzBZWk4krFGuI3KGOJEZDup1xMnDtANhX 2NWcfUbyjtmV7OxOEWRghKGsU+LBADgxrVT2NtpAQnGRUoZJBibuC3QGgFtUg6IX cxld5XUSHGa/bSFV/zaG7ru7/tPoxtOYcQ1YNv2fKyLDTOp+X2WQAopKgbC6dTrf KRTpkCnOlOrYHRaNzcQgnnDipauSKTJJn/1ysLGkBGtP/bUKM9fyWuD3I7arxaow 31zlsIf54ihMnhhMrJ8/lGRF0R5SU6Z0fiXN0fO2p2lbgcv1V0c= =e0EK -----END PGP SIGNATURE----- --DaK+yRH9qnPUJWlF--