From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 14 09:08:56 2021 Received: (at submit) by debbugs.gnu.org; 14 Nov 2021 14:08:57 +0000 Received: from localhost ([127.0.0.1]:49512 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmGBk-0006iE-Nu for submit@debbugs.gnu.org; Sun, 14 Nov 2021 09:08:56 -0500 Received: from lists.gnu.org ([209.51.188.17]:58158) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmGBi-0006i2-Lc for submit@debbugs.gnu.org; Sun, 14 Nov 2021 09:08:54 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47142) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmGBi-0004AZ-Gy for guix-patches@gnu.org; Sun, 14 Nov 2021 09:08:54 -0500 Received: from flashner.co.il ([178.62.234.194]:60956) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mmGBh-0002i7-15 for guix-patches@gnu.org; Sun, 14 Nov 2021 09:08:54 -0500 Received: from localhost (unknown [141.226.12.213]) by flashner.co.il (Postfix) with ESMTPSA id CD3D540178; Sun, 14 Nov 2021 14:08:20 +0000 (UTC) From: Efraim Flashner To: guix-patches@gnu.org Subject: [PATCH 0/2] Add librsvg-bootstrap Date: Sun, 14 Nov 2021 16:07:47 +0200 Message-Id: X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=178.62.234.194; envelope-from=efraim@flashner.co.il; helo=flashner.co.il X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: Efraim Flashner X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) librsvg is an input for emacs, gtk+@2 and gtk+@3. With the rust inputs this leads to (unknown) rust libraries causing the rebuild of over 3000 packages on core-updates-frozen. Rather than hunt them down I tracked down the packages which would have many rebuilds and added a copy of librsvg for them to use. Efraim Flashner (2): Add librsvg-bootstrap. gnu: Use librsvg-bootstrap. gnu/packages/emacs.scm | 2 +- gnu/packages/gnome.scm | 23 +++++++++++++++++++++++ gnu/packages/gtk.scm | 4 ++-- 3 files changed, 26 insertions(+), 3 deletions(-) base-commit: 75b5ad6aa3b55b2cbd7f333411cbc9e21ab1e186 -- 2.33.1 From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 14 09:15:22 2021 Received: (at 51845) by debbugs.gnu.org; 14 Nov 2021 14:15:22 +0000 Received: from localhost ([127.0.0.1]:49517 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmGHy-0006sh-D6 for submit@debbugs.gnu.org; Sun, 14 Nov 2021 09:15:22 -0500 Received: from flashner.co.il ([178.62.234.194]:42812) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmGHw-0006sP-B7 for 51845@debbugs.gnu.org; Sun, 14 Nov 2021 09:15:20 -0500 Received: from localhost (unknown [141.226.12.213]) by flashner.co.il (Postfix) with ESMTPSA id D4D9040566; Sun, 14 Nov 2021 14:15:13 +0000 (UTC) From: Efraim Flashner To: 51845@debbugs.gnu.org Subject: [PATCH 1/2] gnu: Add librsvg-bootstrap. Date: Sun, 14 Nov 2021 16:14:39 +0200 Message-Id: <4a1df5a86f181bcc2086b1b407dbeaba4d01ba88.1636898737.git.efraim@flashner.co.il> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 51845 Cc: Efraim Flashner X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/gnome.scm (librsvg-bootstrap): New variable. --- gnu/packages/gnome.scm | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 924d1326cc..a0436a4edb 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -3580,6 +3580,29 @@ (define-public librsvg (home-page "https://wiki.gnome.org/LibRsvg") (license license:lgpl2.1+))) +;; This copy of librsvg uses the bundled rust libraries. It is useful for +;; packages which have too many dependencies to be rebuilt as frequently +;; as the rust inputs are updated. +(define-public librsvg-bootstrap + (package + (inherit librsvg) + (name "librsvg") + (version "2.50.7") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnome/sources/librsvg/" + (version-major+minor version) "/" + "librsvg-" version ".tar.xz")) + (sha256 + (base32 + "1g3f8byg5w08fx1bka12mmpl59v6a4q2p827w6m2la6mijq63yzz")))) + (arguments + (substitute-keyword-arguments (package-arguments librsvg) + ((#:vendor-dir _ "vendor") "vendor") + ((#:cargo-inputs _) '()) + ((#:cargo-development-inputs _) '()))) + (properties '((hidden? . #t))))) + (define-public libidl (package (name "libidl") -- 2.33.1 From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 14 09:15:52 2021 Received: (at 51845) by debbugs.gnu.org; 14 Nov 2021 14:15:53 +0000 Received: from localhost ([127.0.0.1]:49520 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmGIS-0006tO-N0 for submit@debbugs.gnu.org; Sun, 14 Nov 2021 09:15:52 -0500 Received: from flashner.co.il ([178.62.234.194]:42818) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmGIS-0006tD-0Z for 51845@debbugs.gnu.org; Sun, 14 Nov 2021 09:15:52 -0500 Received: from localhost (unknown [141.226.12.213]) by flashner.co.il (Postfix) with ESMTPSA id 3E82D40566; Sun, 14 Nov 2021 14:15:46 +0000 (UTC) From: Efraim Flashner To: 51845@debbugs.gnu.org Subject: [PATCH 2/2] gnu: Use librsvg-bootstrap. Date: Sun, 14 Nov 2021 16:14:40 +0200 Message-Id: X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 51845 Cc: Efraim Flashner X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/emacs.scm (inputs): Use librsvg-bootstrap. * gnu/pacakges/gtk.scm (gtk+-2, gtk+)[propagated-inputs]: Same. --- gnu/packages/emacs.scm | 2 +- gnu/packages/gtk.scm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 734f3dfaa3..3a5215b31a 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -269,7 +269,7 @@ (define* (emacs-byte-compile-directory dir) ;; supported well on every architecture yet. ,@(if (string-prefix? "x86_64" (or (%current-target-system) (%current-system))) - `(("librsvg" ,librsvg)) + `(("librsvg" ,librsvg-bootstrap)) '()) ("libxpm" ,libxpm) ("libxml2" ,libxml2) diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index 199ca13981..4dfeba4b7f 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -867,7 +867,7 @@ (define-public gtk+-2 ;; Rust is not supported well on every architecture yet. ("gdk-pixbuf" ,(if (string-prefix? "x86_64" (or (%current-target-system) (%current-system))) - librsvg + librsvg-bootstrap gdk-pixbuf)) ("glib" ,glib) ("pango" ,pango))) @@ -969,7 +969,7 @@ (define-public gtk+ ;; SVG support is optional and requires librsvg, which pulls in rust. ;; Rust is not supported well on every architecture yet. ("gdk-pixbuf" ,(if (target-x86-64?) - librsvg + librsvg-bootstrap gdk-pixbuf)) ("glib" ,glib) ("libcloudproviders" ,libcloudproviders-minimal) -- 2.33.1 From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 14 12:27:13 2021 Received: (at 51845) by debbugs.gnu.org; 14 Nov 2021 17:27:13 +0000 Received: from localhost ([127.0.0.1]:51495 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmJHd-0008Mu-3f for submit@debbugs.gnu.org; Sun, 14 Nov 2021 12:27:13 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:38566) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmJHa-0008Mf-TI for 51845@debbugs.gnu.org; Sun, 14 Nov 2021 12:27:11 -0500 Received: by mail-wr1-f66.google.com with SMTP id u18so25859302wrg.5 for <51845@debbugs.gnu.org>; Sun, 14 Nov 2021 09:27:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=j6y4Lz5rXkP3ifHJSFS0m8hH9VC3n0IXLSHKpXqArAE=; b=mRlSKX7OGI+5kbC0BHyQG9rcxeLuaS6WZU5gyDdvVFkl0ETuCOIlpAQSJFXI3+J5Wh gIoaL5P+J+ONJjVNa4w1wuufU8ApTrf7s1VTCnakjVQHXc/sy7MIm94XoOF/GLCorlO/ CqcXG1438NBz0uGihAUD8aM4t7GaNehq1aRGKAx/4XgzsvT+VClANnVP4iA+pgUlE+Lv A/VHQ0QeFixnwasfKALESN4SV8q7MFR2B++lMrnbQ2+rPZ0gAUk3EV9QRDOKisONVEdD jcHoB9RR6xX56OWiMrasheOZkV4TYXuD+vZKXGl0tWqFqO5ZupdECwv/gBfPkdety0th SzCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=j6y4Lz5rXkP3ifHJSFS0m8hH9VC3n0IXLSHKpXqArAE=; b=tHif0HuTKbettS4A+YwNa+ja0tAsoIkfdGm3Eaeqzlm7WhioOtO0OwLVlEtPI39jhy 7xoLgzBScAxNSQ+WJI/ZZGNZkCayXMdwRuzgFs9g+WYr6m2MhDJaTCxj3wOCvJOSqYt2 6fIe/cMMwQqjsG88Mnmnb6GTHt4kR/q7ATvGPLLPVAUr1cOgFTkQEnn7aHLwubdOxn8D j66gSE9wrwiwY8AvqoFIOtvxPH6MumZD8peXoXbnMNNp/hTYcUHC/kspHw2Cbk3wrNfe vL4w/hQPLxVv2EGZrvNtd1K/9IUGV01rwbU7GmaEKzF+O3pb4ANJLqM3vPQlxFr+sHYX WmPA== X-Gm-Message-State: AOAM531aEk9h4Q093S6VdQfytQ3JiuxuC5oYR5qTm/z1qbYfgyZrzoUn tAS0QEeGXrKlUoPCjvVAemg= X-Google-Smtp-Source: ABdhPJzwR8BcjtiEs5Zw4AGwb4hP2CRiGi+OPM+EXqTLbnKv6dZRbWQ9eSWo2oXL90vzR62TdT25JA== X-Received: by 2002:adf:f209:: with SMTP id p9mr38470016wro.191.1636910824971; Sun, 14 Nov 2021 09:27:04 -0800 (PST) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id r17sm20103218wmq.5.2021.11.14.09.27.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Nov 2021 09:27:04 -0800 (PST) Message-ID: <68012880ef968bf2d5ab3d7e967b06bafb9ea10f.camel@gmail.com> Subject: Re: [PATCH 0/2] Add librsvg-bootstrap From: Liliana Marie Prikler To: Efraim Flashner , 51845@debbugs.gnu.org Date: Sun, 14 Nov 2021 18:27:02 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 51845 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, Am Sonntag, den 14.11.2021, 16:07 +0200 schrieb Efraim Flashner: > librsvg is an input for emacs, gtk+@2 and gtk+@3. With the rust > inputs this leads to (unknown) rust libraries causing the rebuild of > over 3000 packages on core-updates-frozen. Rather than hunt them down > I tracked down the packages which would have many rebuilds and added > a copy of librsvg for them to use. In my opinion, one of the selling points of Guix is that of bootstrappability. I don't think adding big blobs to Emacs of all things is a great way of delivering on that promise. I think we ought to rather "invest" in alternatives to Rust and Rust-locked libraries or make Rust packaging itself sane (if it can at all). I think librsvg is optional already and people who want to save on compilation time can decide to replace it with e.g. GNU hello using the --input option. In the similar case of mozjs, a replacement with duktape is discussed on guix-devel, at least for polkit. As a temporary resolution to the rebuild issue, we could pin the dependencies of librsvg to some specific versions and only bump them when something awful happens. I'm not sure whether librsvg exposes any of the Rust nastiness to its dependencies, ideally hoping that it would not. WDYT? From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 14 13:07:43 2021 Received: (at 51845) by debbugs.gnu.org; 14 Nov 2021 18:07:43 +0000 Received: from localhost ([127.0.0.1]:51603 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmJuo-00015V-ND for submit@debbugs.gnu.org; Sun, 14 Nov 2021 13:07:43 -0500 Received: from flashner.co.il ([178.62.234.194]:43468) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmJum-00015D-Li for 51845@debbugs.gnu.org; Sun, 14 Nov 2021 13:07:41 -0500 Received: from localhost (unknown [141.226.12.213]) by flashner.co.il (Postfix) with ESMTPSA id 6EF59401F6; Sun, 14 Nov 2021 18:07:34 +0000 (UTC) Date: Sun, 14 Nov 2021 20:07:01 +0200 From: Efraim Flashner To: Liliana Marie Prikler Subject: Re: [PATCH 0/2] Add librsvg-bootstrap Message-ID: Mail-Followup-To: Efraim Flashner , Liliana Marie Prikler , 51845@debbugs.gnu.org References: <68012880ef968bf2d5ab3d7e967b06bafb9ea10f.camel@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="XDLRaNWx0F5Uivxv" Content-Disposition: inline In-Reply-To: <68012880ef968bf2d5ab3d7e967b06bafb9ea10f.camel@gmail.com> 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-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 51845 Cc: 51845@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --XDLRaNWx0F5Uivxv Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 14, 2021 at 06:27:02PM +0100, Liliana Marie Prikler wrote: > Hi, >=20 > Am Sonntag, den 14.11.2021, 16:07 +0200 schrieb Efraim Flashner: > > librsvg is an input for emacs, gtk+@2 and gtk+@3. With the rust > > inputs this leads to (unknown) rust libraries causing the rebuild of > > over 3000 packages on core-updates-frozen. Rather than hunt them down > > I tracked down the packages which would have many rebuilds and added > > a copy of librsvg for them to use. > In my opinion, one of the selling points of Guix is that of > bootstrappability. I don't think adding big blobs to Emacs of all > things is a great way of delivering on that promise. I think we ought > to rather "invest" in alternatives to Rust and Rust-locked libraries or > make Rust packaging itself sane (if it can at all). >=20 > I think librsvg is optional already and people who want to save on > compilation time can decide to replace it with e.g. GNU hello using the > --input option. In the similar case of mozjs, a replacement with > duktape is discussed on guix-devel, at least for polkit. It seems I was wrong about emacs; both emacs-minimal and emacs-no-x are built without librsvg. > As a temporary resolution to the rebuild issue, we could pin the > dependencies of librsvg to some specific versions and only bump them > when something awful happens. I'm not sure whether librsvg exposes any > of the Rust nastiness to its dependencies, ideally hoping that it would > not. I don't believe librsvg exposes any rust-y stuff. > WDYT? (ins)efraim@3900XT /tmp/librsvg-2.50.7$ ls vendor/ | wc -l 226 There are 226 crates that upstream bundles with their source. I suppose we could pare it down to about 200 by careful pruning but it's part of librsvg and not going away. (ins)efraim@3900XT ~/workspace/guix-core-updates$ git grep \,librsvg | wc -l 103 I'm suggesting that for gtk+@2 and gtk+@3 we use the bundled crates and for the other 101 packages we continue to use our current version, where we replace all of the bundled crates with our own copies, which get updated more often than librsvg does. With our current rust tooling I don't think it'd be that easy to find the ~226 crates that librsvg depends on, and it wouldn't be great to lock them due to librsvg being an input for gtk2/3. --=20 Efraim Flashner =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 --XDLRaNWx0F5Uivxv Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmGRUEIACgkQQarn3Mo9 g1E9cg//ba+VZ+T1B8kaxKqJ6mmgGwo/32aXUwh48K1Z5IJx3zUAC7mhWs9yE/gI n+D9ea+JbbExwbO8+LYUsmp4LgCYoVDk3Cp91+kf7n1K3Jkxd/JV712tngyisX0o u4F1CZ8KfSosRhoS05ryQugvpm1KBuNPV0f6mJ2GmdePXFD9IA+bjABBCya5/hNP zOkO5EqlhYuVwbm53Xj88nYxnLGM7jxoXQM+08TwVjIgEwR3dFOruD9mtVF6kb9j K7Cdmc+nmtH2rsv+YnUzL3+Irqa9RzubTwBeUJCFDAYU8DylBGD6lsNE27diQFmJ f5aSYpqLMiXK1nIUJn4IRGpnAE0soBy3tabq+m0IZiM9pxXOCPCNlvyKEiRgKnbs rFmPUT2h06AFuxz1Y3yDCI0jggHr1WxMNjPHVOqBbtiK3YbgJgAMXS19FIkoGj/g ys+vbFjeBK1lA2vSA7HrdmtGgTeAJyzZ8yA8JbKmo6NcX5nOIvKCMn9QZDA+HKwE +cydZ/4Kyztv+dcvnBQST8Ffi1Ft3dUdeOEdbF0XrN7vkWWuDjkQIYvLGOelvsNU emZr4iN0S8yEFSC6Map/2BvM/GcI5/FdSoSgBaNImamw3cmYXqTrVtwTO2PWyawp H8xru2poBiLHWjMuOc+OM4TVg3Ue4RtAQWeUhy9eQOhn4qE7trk= =XF6T -----END PGP SIGNATURE----- --XDLRaNWx0F5Uivxv-- From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 14 14:05:49 2021 Received: (at 51845) by debbugs.gnu.org; 14 Nov 2021 19:05:50 +0000 Received: from localhost ([127.0.0.1]:51722 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmKp3-0004v5-Ma for submit@debbugs.gnu.org; Sun, 14 Nov 2021 14:05:49 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:35332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmKp2-0004us-06 for 51845@debbugs.gnu.org; Sun, 14 Nov 2021 14:05:48 -0500 Received: by mail-wm1-f65.google.com with SMTP id 77-20020a1c0450000000b0033123de3425so14080882wme.0 for <51845@debbugs.gnu.org>; Sun, 14 Nov 2021 11:05:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=0xP6lSOtBHyfb6IuswYu9DbLhUF7tCbl8+rtttSjPBQ=; b=S3lRCuv+1qMMCc4KTgPD5hxKj06j90fixjJQrHXiB0zhX9Tl73usQwuasEMP0DV2sx +dA7elR0sqjD5f62C4+RwLIcv/Y8yLNERudj4Hew75Cq1wZ0xGFYzA0pYS1vsUApCPBJ RN7dZOqAOQX5/jysrfQWCep2obr2JhpV2deFSJCSJPiHxRhDogCgsTWb1OrMUW2d0jbf G0vwjq6gLDEK+e5QHBWxfWQBn6fw0668pt5bEZjaGEL6Db7Af/onuEwsCX6g0+n3GksC jLiBUoQ6bIe9heCv2yD2CarCEy8dO2ri24nYjEgiDpNCoLXXVbNtIJI4lsy7hO0i4P8U kNHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=0xP6lSOtBHyfb6IuswYu9DbLhUF7tCbl8+rtttSjPBQ=; b=CvXj8Ebj8wtR/AL6m0sRrfzNBtNUzsFfHf+cqwuzUMsm7+UH1Kec8mAl2UXEOCb+31 sdbyY2yvVV19CcuJeSj1tehNNHA2yRkwSRcO825RdVNiDR2YXFLtk5ufsVw1xIU7KNG4 TdSN0A5063abVSrVVrGbYU/wmqunjtNrou+llNUjkHPcHzPZkQu7lKoXh5xYAhFGHFxH wiovqSkjWNh4OEzH7cy6nPOpLU2QtD0kVNIYHBAxZ7F2WR7XpSCmURlloDvGKg0MHezv 3M01n1OQmpDkldTfN1EoE1prq+DSmCEYeqKER1V8QXwSKVJOMpZtw2utKZErkOJ6pndP 1U1Q== X-Gm-Message-State: AOAM53073DlPrC+PwdgqyRD5+DVuYBionqttzRS2P9DPQuWJqDQN3Z6i DKfDZjerYQU8M9MdTw41FeIeOfR5FrNqZw== X-Google-Smtp-Source: ABdhPJx5GPYI/sPHXnmGlO1JikkouVL5UUfTy3Pd/vWUhMSBMf1EAnQCApjx5qU+itbR8UF/1w3W6w== X-Received: by 2002:a05:600c:2f01:: with SMTP id r1mr36553277wmn.153.1636916741955; Sun, 14 Nov 2021 11:05:41 -0800 (PST) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id c16sm11635361wrx.96.2021.11.14.11.05.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Nov 2021 11:05:38 -0800 (PST) Message-ID: <49868b918eb291fd2761c48c7617fecd6bb98764.camel@gmail.com> Subject: Re: [PATCH 0/2] Add librsvg-bootstrap From: Liliana Marie Prikler To: Efraim Flashner Date: Sun, 14 Nov 2021 20:05:30 +0100 In-Reply-To: References: <68012880ef968bf2d5ab3d7e967b06bafb9ea10f.camel@gmail.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 51845 Cc: 51845@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, Am Sonntag, den 14.11.2021, 20:07 +0200 schrieb Efraim Flashner: > > As a temporary resolution to the rebuild issue, we could pin the > > dependencies of librsvg to some specific versions and only bump > > them something awful happens. I'm not sure whether librsvg > > exposes any of the Rust nastiness to its dependencies, ideally > > hoping that it would not. > > I don't believe librsvg exposes any rust-y stuff. That sounds like a good start for once. > > WDYT? > > (ins)efraim@3900XT /tmp/librsvg-2.50.7$ ls vendor/ | wc -l > 226 > > There are 226 crates that upstream bundles with their source. I > suppose we could pare it down to about 200 by careful pruning but > it's part of librsvg and not going away. Well, I'd suggest snippeting them away, but that's a different topic. > (ins)efraim@3900XT ~/workspace/guix-core-updates$ git grep \,librsvg > | wc -l > 103 I'd hazard a guess that most if not all of these 103 packages are themselves gtk-adjacent, so what really is the issue we're solving here? What is the point of maintaining an extra version for 101 of them when a potentially vulnerable GTK sits right next to them? > I'm suggesting that for gtk+@2 and gtk+@3 we use the bundled crates > and for the other 101 packages we continue to use our current > version, where we replace all of the bundled crates with our own > copies, which get updated more often than librsvg does. > > With our current rust tooling I don't think it'd be that easy to find > the ~226 crates that librsvg depends on, and it wouldn't be great to > lock them due to librsvg being an input for gtk2/3. Said input exists due to gdk-pixbuf+svg, with the +svg part being largely optional – the most common failure mode of it not being included are broken button textures, which we could fix by pre- rendering images with a suitable tool, such as inkscape. We could easily do a minimal gtk[+]? without it. As for the lock, why can't we? gtk+ is already core-updates material, so it stands to reason that anything causing it to rebuild is too. Rather than push down blobs to the users because we can't deal with Rust, we should fix Rust or make it go away from the build. WDYT? From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 06 07:17:58 2021 Received: (at 51845) by debbugs.gnu.org; 6 Dec 2021 12:17:58 +0000 Received: from localhost ([127.0.0.1]:60694 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1muCwP-000248-V7 for submit@debbugs.gnu.org; Mon, 06 Dec 2021 07:17:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43394) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1muCwN-00023s-QQ for 51845@debbugs.gnu.org; Mon, 06 Dec 2021 07:17:56 -0500 Received: from [2001:470:142:3::e] (port=48476 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muCwI-000409-GW; Mon, 06 Dec 2021 07:17:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=uZkWPsRuXet/4ITA7+Uht3uQL/hOaKq7T2b0cuThs+M=; b=A2otJuQjsnFR8a4FrvZu ukYR7eGe7MPKg+z8HaOaqyg3RIsOLr/Gw6XCerPIGtxG94lXvaH0QIfECWjcPCgaSEI7lH/C29NIz /1H0Cif2WkRLFrEXHKB4MERq5o24TwUKJvKT7MZlUKqFcm2o7Ad69To90Fak/l5NlVCKIJkAitZY4 fnzIKy2PlIuXa4LF1zonFeJjRPGvbodLE1CmkLbuM6TRo5Kzcvhql5eXjLHokV2bOQd5yPKkS+w0t 8gkhFTbJ5x5wvVzqKTO7+izlbcjtnH61BFBg6XJFvJd6MTHtaXOk/ilhfybhnojIuEs3+kSwlOEnA +npyLY07NNJ9lg==; Received: from [193.50.110.120] (port=41678 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muCwI-0003I1-7y; Mon, 06 Dec 2021 07:17:50 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Efraim Flashner Subject: Re: bug#51845: [PATCH 0/2] Add librsvg-bootstrap References: Date: Mon, 06 Dec 2021 13:17:47 +0100 In-Reply-To: (Efraim Flashner's message of "Sun, 14 Nov 2021 16:07:47 +0200") Message-ID: <87zgpend04.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 51845 Cc: 51845@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Efraim, I had completely overlooked these patches, oops! Efraim Flashner skribis: > librsvg is an input for emacs, gtk+@2 and gtk+@3. With the rust inputs > this leads to (unknown) rust libraries causing the rebuild of over 3000 > packages on core-updates-frozen. Rather than hunt them down I tracked > down the packages which would have many rebuilds and added a copy of > librsvg for them to use. [...] > I'm suggesting that for gtk+@2 and gtk+@3 we use the bundled crates and > for the other 101 packages we continue to use our current version, where > we replace all of the bundled crates with our own copies, which get > updated more often than librsvg does. > > With our current rust tooling I don't think it'd be that easy to find > the ~226 crates that librsvg depends on, and it wouldn't be great to > lock them due to librsvg being an input for gtk2/3. Yes, that=E2=80=99s a problem, though Liliana is right that bundling isn=E2= =80=99t great either. I=E2=80=99m annoyed by this whole librsvg situation. On non-x86_64, we now depend on librsvg 2.40, the old C version, and guess what, it just works. That has me tempted to stick with 2.40 all along because these Rust problems don=E2=80=99t seem to have a pleasant, or even an easy soluti= on. Now, using the proposed =E2=80=98librsvg-bootstrap=E2=80=99 in GTK+ looks l= ike a lesser evil. Thoughts? Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 06 08:07:15 2021 Received: (at 51845) by debbugs.gnu.org; 6 Dec 2021 13:07:15 +0000 Received: from localhost ([127.0.0.1]:60789 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1muDi7-0007pE-9i for submit@debbugs.gnu.org; Mon, 06 Dec 2021 08:07:15 -0500 Received: from flashner.co.il ([178.62.234.194]:45066) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1muDi6-0007oy-Id for 51845@debbugs.gnu.org; Mon, 06 Dec 2021 08:07:14 -0500 Received: from localhost (unknown [94.230.83.253]) by flashner.co.il (Postfix) with ESMTPSA id 22A964020F; Mon, 6 Dec 2021 13:07:08 +0000 (UTC) Date: Mon, 6 Dec 2021 15:06:18 +0200 From: Efraim Flashner To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#51845: [PATCH 0/2] Add librsvg-bootstrap Message-ID: Mail-Followup-To: Efraim Flashner , Ludovic =?utf-8?Q?Court=C3=A8s?= , 51845@debbugs.gnu.org References: <87zgpend04.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Qe+U0H0bLP+yPbEz" Content-Disposition: inline In-Reply-To: <87zgpend04.fsf@gnu.org> 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-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 51845 Cc: 51845@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --Qe+U0H0bLP+yPbEz Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 06, 2021 at 01:17:47PM +0100, Ludovic Court=C3=A8s wrote: > Hi Efraim, >=20 > I had completely overlooked these patches, oops! >=20 > Efraim Flashner skribis: >=20 > > librsvg is an input for emacs, gtk+@2 and gtk+@3. With the rust inputs > > this leads to (unknown) rust libraries causing the rebuild of over 3000 > > packages on core-updates-frozen. Rather than hunt them down I tracked > > down the packages which would have many rebuilds and added a copy of > > librsvg for them to use. >=20 > [...] >=20 > > I'm suggesting that for gtk+@2 and gtk+@3 we use the bundled crates and > > for the other 101 packages we continue to use our current version, where > > we replace all of the bundled crates with our own copies, which get > > updated more often than librsvg does. > > > > With our current rust tooling I don't think it'd be that easy to find > > the ~226 crates that librsvg depends on, and it wouldn't be great to > > lock them due to librsvg being an input for gtk2/3. >=20 > Yes, that=E2=80=99s a problem, though Liliana is right that bundling isn= =E2=80=99t great > either. >=20 > I=E2=80=99m annoyed by this whole librsvg situation. On non-x86_64, we n= ow > depend on librsvg 2.40, the old C version, and guess what, it just > works. That has me tempted to stick with 2.40 all along because these > Rust problems don=E2=80=99t seem to have a pleasant, or even an easy solu= tion. >=20 > Now, using the proposed =E2=80=98librsvg-bootstrap=E2=80=99 in GTK+ looks= like a lesser > evil. >=20 > Thoughts? Unbundling the rust crates is the right option, but not the easy option. With the assumption that rust-libc-0.2 is in the graph for librsvg, we add another copy named rust-libc-0.2.101 (the current version) and a comment that it only gets adjusted on core-updates or that it causes XXXX package rebuilds. On a small tangent, the work I do sometimes to try to actually have a dependency graph with the crates would only make these easier to find, not actually address the issue here. I'm not sure if it'd be better to mostly copy the packages with a new name and keep the cargo-inputs or to actually adjust the cargo-inputs->inputs and cargo-development-inputs->native-inputs so we get the dependency graph from rust-libc-0.2.101 to librsvg. I'd like to make the change but if we don't get the others changed then we effectively really have two sets of rust crates. If we have both cargo-inputs and inputs then the cargo-build-system doesn't have issues with using either type with later packages, so that might be the best option for now. --=20 Efraim Flashner =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 --Qe+U0H0bLP+yPbEz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmGuCsgACgkQQarn3Mo9 g1GelA//SkbqRAKmwoL+6GnM4ZlsmG6xOqqk1rHt1qHk/cOHKi+cbx4Xfcb1nj7I zSotDjmlf+wPZI3wG1ljw91Y+RSvvnlMg6Y0pqFSO/ERDaapaei2EvNVqggZmbC5 BxsqMzDqd1UsCrPJNj71ckcnreRmF2+/TBIO6uswdGyavid6TP9F8uy/VJcjXeJN vWGBXiP1oAjLzli7AO1ya7sUuZdsPdGUIUBwJbqV5/9Na0WvdR27has2UcdNKoRV vc+KcKnwX2c32zhnfcwQomT/8JcvND/Ip0iXggzqDrJtFmpBEhxJ0r5froSZme9+ gPp/1KOQ8dwHvD1DHlCj4MgCneXkkGJNz5ZTieDgaj6VO1emGS/XBl8cX/i4owrj +aosRoVE4KhVsRnlVEjsBcrh6YxZDK4U6m/i7/rU0JmISeG6+tZghvQjHQdq5J/m tnEnwBmENGvAlQXxTPimSzfyQKScbs47nmDpkw9ZxWC4rQC3rj4nEgk/l/CJuX0E e6+XuYFJFJv4ZlfwvMSmNx08z1uijoCibOp2GwGF91Of9Z3CFZ9VBf1yqGIU22bA jP8IpWXhkArQXgFuNsMPf1MQCqWlb7zxU88tNww1AMtSig/I8oUkj0Yo93T0y/RD mglhoJDPamVxUz7clXUoEGxg6G/GbFXwnJd4pQmvTOcBcPupwW0= =Nn2l -----END PGP SIGNATURE----- --Qe+U0H0bLP+yPbEz-- From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 06 11:37:24 2021 Received: (at 51845) by debbugs.gnu.org; 6 Dec 2021 16:37:24 +0000 Received: from localhost ([127.0.0.1]:35207 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1muGzT-000836-N2 for submit@debbugs.gnu.org; Mon, 06 Dec 2021 11:37:23 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59080) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1muGzR-00082q-2z for 51845@debbugs.gnu.org; Mon, 06 Dec 2021 11:37:22 -0500 Received: from [2001:470:142:3::e] (port=59374 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muGzL-0005lb-7A; Mon, 06 Dec 2021 11:37:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=uB9unecbagKp3/fNpPvPZVyXNiOm+JUY1a1SEeOUyn8=; b=VtsWm6jVPyHloDoLKPEf kcmWwO+hUHOA/SM3stXro4OAWqsNVqaza00EVsQyfQG8rUEJ/kEgl1icuv+qGuOwOfrmIFuTtsrCB BIiWDZzABnJ9wsA+XmZ/GWrGyx5IZywVDNmet/mSxdK0HL4lwpA5ISwcsIh8whZfLSE2bdp9r2slZ keJwO/FP6kxqg85Xm1ycsl9wYEElugHLhadelR0AJzwo4BHKZqkFkA/AT3r+rga6duXIPktYHp6gG GtLEuy+Coydg8VyuZQeCv/43REncEtEh+wH+mnrHeTFXaZ30FxKDw0+yZWL8t40jWIzF8xRk51PSr XUF/hv5/z83v+g==; Received: from [193.50.110.120] (port=41690 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muGzL-0007yy-2Q; Mon, 06 Dec 2021 11:37:15 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Efraim Flashner Subject: Re: bug#51845: [PATCH 0/2] Add librsvg-bootstrap References: <87zgpend04.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 16 Frimaire an 230 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 06 Dec 2021 17:37:12 +0100 In-Reply-To: (Efraim Flashner's message of "Mon, 6 Dec 2021 15:06:18 +0200") Message-ID: <87wnkhlmfb.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 51845 Cc: 51845@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Efraim, Efraim Flashner skribis: > On a small tangent, the work I do sometimes to try to actually have a > dependency graph with the crates would only make these easier to find, > not actually address the issue here. > > I'm not sure if it'd be better to mostly copy the packages with a new > name and keep the cargo-inputs or to actually adjust the > cargo-inputs->inputs and cargo-development-inputs->native-inputs so we > get the dependency graph from rust-libc-0.2.101 to librsvg. I'd like to > make the change but if we don't get the others changed then we > effectively really have two sets of rust crates. > > If we have both cargo-inputs and inputs then the cargo-build-system > doesn't have issues with using either type with later packages, so that > might be the best option for now. Thinking out loud=E2=80=A6 would it work to change: (arguments '(#:cargo-inputs X #:cargo-development-inputs Y)) to: (native-inputs (map package-source Y)) (inputs (map package-source X)) ? Or am I just saying nonsense? Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 06 12:03:25 2021 Received: (at 51845) by debbugs.gnu.org; 6 Dec 2021 17:03:25 +0000 Received: from localhost ([127.0.0.1]:35240 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1muHOf-0000NF-91 for submit@debbugs.gnu.org; Mon, 06 Dec 2021 12:03:25 -0500 Received: from flashner.co.il ([178.62.234.194]:45742) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1muHOd-0000N1-LU for 51845@debbugs.gnu.org; Mon, 06 Dec 2021 12:03:24 -0500 Received: from [127.0.0.1] (unknown [176.12.201.69]) by flashner.co.il (Postfix) with ESMTPSA id 8B65E402DB; Mon, 6 Dec 2021 17:03:17 +0000 (UTC) Date: Mon, 06 Dec 2021 17:02:45 +0000 From: Efraim Flashner To: =?ISO-8859-1?Q?Ludovic_Court=E8s?= Subject: Re: bug#51845: [PATCH 0/2] Add librsvg-bootstrap User-Agent: K-9 Mail for Android In-Reply-To: <87wnkhlmfb.fsf@gnu.org> References: <87zgpend04.fsf@gnu.org> <87wnkhlmfb.fsf@gnu.org> Message-ID: <405F2D9A-C0E6-42EC-9F81-F52F305B723C@flashner.co.il> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 51845 Cc: 51845@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On December 6, 2021 4:37:12 PM UTC, "Ludovic Court=C3=A8s" wrote: >Hi Efraim, > >Efraim Flashner skribis: > >> On a small tangent, the work I do sometimes to try to actually have a >> dependency graph with the crates would only make these easier to find, >> not actually address the issue here=2E >> >> I'm not sure if it'd be better to mostly copy the packages with a new >> name and keep the cargo-inputs or to actually adjust the >> cargo-inputs->inputs and cargo-development-inputs->native-inputs so we >> get the dependency graph from rust-libc-0=2E2=2E101 to librsvg=2E I'd l= ike to >> make the change but if we don't get the others changed then we >> effectively really have two sets of rust crates=2E >> >> If we have both cargo-inputs and inputs then the cargo-build-system >> doesn't have issues with using either type with later packages, so that >> might be the best option for now=2E > >Thinking out loud=E2=80=A6 would it work to change: > > (arguments '(#:cargo-inputs X #:cargo-development-inputs Y)) > >to: > > (native-inputs (map package-source Y)) > (inputs (map package-source X)) > >? > >Or am I just saying nonsense? > >Thanks, >Ludo=E2=80=99=2E Then we lose the transitive package sources, which is how we ended up wher= e we are today=2E I can go and change the cargo-build-system to use the skip-build flag in m= ore phases to skip them when we aren't going to be building them anyway=2E = No need to generate cargo checksums if we're not building I think=2E --=20 Sent from my Android device with K-9 Mail=2E Please excuse my brevity=2E From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 06 17:17:59 2021 Received: (at 51845) by debbugs.gnu.org; 6 Dec 2021 22:17:59 +0000 Received: from localhost ([127.0.0.1]:35606 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1muMJ4-0002SO-Gg for submit@debbugs.gnu.org; Mon, 06 Dec 2021 17:17:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:32788) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1muMJ2-0002SB-J2 for 51845@debbugs.gnu.org; Mon, 06 Dec 2021 17:17:57 -0500 Received: from [2001:470:142:3::e] (port=44776 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muMIw-0000JG-V7; Mon, 06 Dec 2021 17:17:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=HhhhaG5Goz4aMi3kzCmJjnHE+uW2dfpTW4U1eWKVxMs=; b=EVmLApYGfpB8oCt/No1y 0VXl43mkdj6jNP2+MvTqliWOqPBG1Im5QPzjQtWBvRuE5pUwF8D8viMunYxaC0wrCW1ZgixzNNqPS Kq5JjRYhakUgeguBnfcL2VfCG2Tx2NIUDuku1yCsXqjHlpiCFAyBmxX9fbM/6hL4wL7sEx15bWKZV saJ2487phCZM5XYorKZET58h43JBUiIH4PEgv+KhQyROQVsG7B3DoxU6EbYdEzJ0z7eKMjpa/VrVw f2WMZIwVDfYLXOAcy8DCgCqy887WrR421aZCISljsgQcXtzOgxz6XxZViHyI7/IOiD5B+sk99zHMP 2VKlcs9YQ9+NgA==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:59669 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muMIw-0000B0-Af; Mon, 06 Dec 2021 17:17:50 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Efraim Flashner Subject: Using =?utf-8?Q?=E2=80=98native-inputs=E2=80=99?= and =?utf-8?B?4oCYaW5wdXRz4oCZ?= for Cargo packages? References: <87zgpend04.fsf@gnu.org> <87wnkhlmfb.fsf@gnu.org> <405F2D9A-C0E6-42EC-9F81-F52F305B723C@flashner.co.il> Date: Mon, 06 Dec 2021 23:17:47 +0100 In-Reply-To: <405F2D9A-C0E6-42EC-9F81-F52F305B723C@flashner.co.il> (Efraim Flashner's message of "Mon, 06 Dec 2021 17:02:45 +0000") Message-ID: <878rwxl6no.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 51845 Cc: 51845@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Efraim Flashner skribis: > On December 6, 2021 4:37:12 PM UTC, "Ludovic Court=C3=A8s" = wrote: [...] >>Thinking out loud=E2=80=A6 would it work to change: >> >> (arguments '(#:cargo-inputs X #:cargo-development-inputs Y)) >> >>to: >> >> (native-inputs (map package-source Y)) >> (inputs (map package-source X)) >> >>? [...] > Then we lose the transitive package sources, which is how we ended up whe= re we are today. True. With the minimal changes to (guix build-system cargo) below, one can use either the current style or pass =E2=80=9Cdevelopment inputs=E2=80=9D as = =E2=80=98native-inputs=E2=80=99 and other dependencies as =E2=80=98inputs=E2=80=99. Source transitivity is= preserved but you can write packages the normal way. I modified some of the dependencies of librsvg to use native-inputs/inputs and you can see when applying this part of the patch that the librsvg derivation is unchanged. Good thing is that =E2=80=98guix graph=E2=80=99 and =E2=80=98guix refresh -l=E2=80=99 work for= these packages. Is this a direction we want to take? If so, we can have =E2=80=98guix style=E2=80=99 automate transformations. Thanks, Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index b8c4c7bd39..d7214e2d4f 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -5728,18 +5728,26 @@ (define-public rust-bitflags-1.3 (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "12ki6w8gn1ldq7yz9y680llwk5gmrhrzszaa17g1sbrw2r2qvwxy")))) - (arguments - `(#:tests? #f ; Tests require rust-1.46 or newer. - #:cargo-inputs - (("rust-compiler-builtins" ,rust-compiler-builtins-0.1) - ("rust-rustc-std-workspace-core" ,rust-rustc-std-workspace-core-1)) - #:cargo-development-inputs - (("rust-rustversion" ,rust-rustversion-1) - ("rust-serde" ,rust-serde-1) - ("rust-serde-derive" ,rust-serde-derive-1) - ("rust-serde-json" ,rust-serde-json-1) - ("rust-trybuild" ,rust-trybuild-1) - ("rust-walkdir" ,rust-walkdir-2)))))) + (arguments `(#:tests? #f ; Tests require rust-1.46 or newer. + )) + (native-inputs `(("rust-rustversion" ,rust-rustversion-1) ( + "rust-serde" , + rust-serde-1) + ( + "rust-serde-derive" , + rust-serde-derive-1) + ( + "rust-serde-json" , + rust-serde-json-1) + ( + "rust-trybuild" , + rust-trybuild-1) + ( + "rust-walkdir" , + rust-walkdir-2))) + (inputs `(("rust-compiler-builtins" ,rust-compiler-builtins-0.1) ( + "rust-rustc-std-workspace-core" , + rust-rustc-std-workspace-core-1))))) (define-public rust-bitflags-0.9 (package @@ -8391,12 +8399,9 @@ (define-public rust-cast-0.2 (base32 "1c5z7zryj0zwnhdgs6rw5dfvnlwc1vm19jzrlgx5055alnwk952b")))) (build-system cargo-build-system) - (arguments - `(#:skip-build? #t - #:cargo-inputs - (("rust-rustc-version" ,rust-rustc-version-0.2)) - #:cargo-development-inputs - (("rust-quickcheck" ,rust-quickcheck-0.9)))) + (arguments `(#:skip-build? #t)) + (native-inputs `(("rust-quickcheck" ,rust-quickcheck-0.9))) + (inputs `(("rust-rustc-version" ,rust-rustc-version-0.2))) (home-page "https://github.com/japaric/cast.rs") (synopsis "Ergonomic, checked cast functions for primitive types") @@ -12459,19 +12464,34 @@ (define-public rust-cssparser-0.28 (sha256 (base32 "1h924c5g2rwlmgk8hllciyky3ih3z9vf04xz3xsp3cv1jyd5kf0x")))) (build-system cargo-build-system) - (arguments - `(#:skip-build? #t - #:cargo-inputs - (("rust-cssparser-macros" ,rust-cssparser-macros-0.6) - ("rust-dtoa-short" ,rust-dtoa-short-0.3) - ("rust-itoa" ,rust-itoa-0.4) - ("rust-matches" ,rust-matches-0.1) - ("rust-phf" ,rust-phf-0.8) - ("rust-proc-macro2" ,rust-proc-macro2-1) - ("rust-quote" ,rust-quote-1) - ("rust-serde" ,rust-serde-1) - ("rust-smallvec" ,rust-smallvec-1) - ("rust-syn" ,rust-syn-1)))) + (arguments `(#:skip-build? #t)) + (inputs `(("rust-cssparser-macros" ,rust-cssparser-macros-0.6) ( + "rust-dtoa-short" , + rust-dtoa-short-0.3) + ( + "rust-itoa" , + rust-itoa-0.4) + ( + "rust-matches" , + rust-matches-0.1) + ( + "rust-phf" , + rust-phf-0.8) + ( + "rust-proc-macro2" , + rust-proc-macro2-1) + ( + "rust-quote" , + rust-quote-1) + ( + "rust-serde" , + rust-serde-1) + ( + "rust-smallvec" , + rust-smallvec-1) + ( + "rust-syn" , + rust-syn-1))) (home-page "https://github.com/servo/rust-cssparser") (synopsis "Rust implementation of CSS Syntax Level 3") (description @@ -13601,13 +13621,13 @@ (define-public rust-data-url-0.1 (base32 "176wa1n8h71iwyaxhar4sqwrgrvb5sxk26az0fy88vnxrsffjgyk")))) (build-system cargo-build-system) - (arguments - `(#:cargo-inputs - (("rust-matches" ,rust-matches-0.1)) - #:cargo-development-inputs - (("rust-rustc-test" ,rust-rustc-test-0.3) - ("rust-serde" ,rust-serde-1) - ("rust-serde-json" ,rust-serde-json-1)))) + (native-inputs `(("rust-rustc-test" ,rust-rustc-test-0.3) ( + "rust-serde" , + rust-serde-1) + ( + "rust-serde-json" , + rust-serde-json-1))) + (inputs `(("rust-matches" ,rust-matches-0.1))) (home-page "https://github.com/servo/rust-url") (synopsis "Processing of data: URL according to WHATWG's Fetch Standard") (description @@ -16336,21 +16356,21 @@ (define-public rust-encoding-0.2 (base32 "1v1ndmkarh9z3n5hk53da4z56hgk9wa5kcsm7cnx345raqw983bb")))) (build-system cargo-build-system) - (arguments - `(#:skip-build? #t - #:cargo-inputs - (("rust-encoding-index-japanese" - ,rust-encoding-index-japanese-1.20141219) - ("rust-encoding-index-korean" - ,rust-encoding-index-korean-1.20141219) - ("rust-encoding-index-simpchinese" - ,rust-encoding-index-simpchinese-1.20141219) - ("rust-encoding-index-singlebyte" - ,rust-encoding-index-singlebyte-1.20141219) - ("rust-encoding-index-tradchinese" - ,rust-encoding-index-tradchinese-1.20141219)) - #:cargo-development-inputs - (("rust-getopts" ,rust-getopts-0.2)))) + (arguments `(#:skip-build? #t)) + (native-inputs `(("rust-getopts" ,rust-getopts-0.2))) + (inputs `(("rust-encoding-index-japanese" , + rust-encoding-index-japanese-1.20141219) ( + "rust-encoding-index-korean" , + rust-encoding-index-korean-1.20141219) + ( + "rust-encoding-index-simpchinese" , + rust-encoding-index-simpchinese-1.20141219) + ( + "rust-encoding-index-singlebyte" , + rust-encoding-index-singlebyte-1.20141219) + ( + "rust-encoding-index-tradchinese" , + rust-encoding-index-tradchinese-1.20141219))) (home-page "https://github.com/lifthrasiir/rust-encoding") (synopsis "Character encoding support for Rust") @@ -18388,8 +18408,7 @@ (define-public rust-float-cmp-0.8 (base32 "1i56hnzjn5pmrcm47fwkmfxiihk7wz5vvcgpb0kpfhzkqi57y9p1")))) (build-system cargo-build-system) - (arguments - `(#:cargo-inputs (("rust-num-traits" ,rust-num-traits-0.2)))) + (inputs `(("rust-num-traits" ,rust-num-traits-0.2))) (home-page "https://github.com/mikedilger/float-cmp") (synopsis "Floating point approximate comparison traits") (description @@ -26818,11 +26837,8 @@ (define-public rust-libm-0.2 (base32 "0akh56sh51adhagmk9l84dyrlz60gv8ri05xhr13i1b18czkpmy7")))) (build-system cargo-build-system) - (arguments - `(#:cargo-inputs - (("rust-rand" ,rust-rand-0.6)) - #:cargo-development-inputs - (("rust-no-panic" ,rust-no-panic-0.1)))) + (native-inputs `(("rust-no-panic" ,rust-no-panic-0.1))) + (inputs `(("rust-rand" ,rust-rand-0.6))) (home-page "https://github.com/rust-lang/libm") (synopsis "Libm in pure Rust") (description "This package provides an implementation of libm in pure Rust.") diff --git a/guix/build-system/cargo.scm b/guix/build-system/cargo.scm index 60c35eed07..b2d97beb2f 100644 --- a/guix/build-system/cargo.scm +++ b/guix/build-system/cargo.scm @@ -125,17 +125,21 @@ (define builder #:target #f #:guile-for-build guile)) +(define (cargo-input? input) + (match input + ((label (? package? p)) + (eq? cargo-build-system (package-build-system p))) + (_ #f))) + (define (package-cargo-inputs p) - (apply - (lambda* (#:key (cargo-inputs '()) #:allow-other-keys) - cargo-inputs) - (package-arguments p))) + (match (member #:cargo-inputs (package-arguments p)) + (#f (filter cargo-input? (package-inputs p))) + ((_ inputs . _) inputs))) (define (package-cargo-development-inputs p) - (apply - (lambda* (#:key (cargo-development-inputs '()) #:allow-other-keys) - cargo-development-inputs) - (package-arguments p))) + (match (member #:cargo-development-inputs (package-arguments p)) + (#f (filter cargo-input? (package-native-inputs p))) + ((_ inputs . _) inputs))) (define (crate-closure inputs) "Return the closure of INPUTS when considering the 'cargo-inputs' and @@ -235,8 +239,8 @@ (define (expand-crate-sources cargo-inputs cargo-development-inputs) (define* (lower name #:key source inputs native-inputs outputs system target (rust (default-rust)) - (cargo-inputs '()) - (cargo-development-inputs '()) + (cargo-inputs (filter cargo-input? inputs)) + (cargo-development-inputs (filter cargo-input? native-inputs)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -260,7 +264,9 @@ (define private-keywords (build-inputs `(("cargo" ,rust "cargo") ("rustc" ,rust) ,@(expand-crate-sources cargo-inputs cargo-development-inputs) - ,@native-inputs)) + ,@(if (eq? native-inputs cargo-development-inputs) + '() + native-inputs))) (outputs outputs) (build cargo-build) (arguments (strip-keyword-arguments private-keywords arguments))))) diff --git a/guix/packages.scm b/guix/packages.scm index b3c5a00011..275cc3675c 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -660,7 +660,8 @@ (define (deprecated-package old-name p) (name old-name) (properties `((superseded . ,p))))) -(define (package-field-location package field) +(define* (package-field-location package field + #:key (value-location? #t)) "Return the source code location of the definition of FIELD for PACKAGE, or #f if it could not be determined." (match (package-location package) @@ -678,7 +679,10 @@ (define (package-field-location package field) (let ((field (assoc field inits))) (match field ((_ value) - (let ((loc (and=> (source-properties value) + (let ((loc (and=> (source-properties + (if value-location? + value + field)) source-properties->location))) (and loc ;; Preserve the original file name, which may be a diff --git a/guix/scripts/style.scm b/guix/scripts/style.scm index 86a46f693c..dccc20d880 100644 --- a/guix/scripts/style.scm +++ b/guix/scripts/style.scm @@ -29,6 +29,7 @@ (define-module (guix scripts style) #:autoload (gnu packages) (specification->package fold-packages) + #:autoload (guix build-system cargo) (cargo-build-system) #:use-module (guix scripts) #:use-module ((guix scripts build) #:select (%standard-build-options)) #:use-module (guix combinators) @@ -212,6 +213,21 @@ (define (object->string* obj indent) (pretty-print-with-comments port obj #:indent indent)))) +(define (object-list->string lst indent) + (call-with-output-string + (lambda (port) + (let loop ((lst lst)) + (match lst + ((obj) + (pretty-print-with-comments port obj + #:indent indent)) + ((obj rest ...) + (pretty-print-with-comments port obj + #:indent indent) + (newline port) + (display (make-string indent #\space) port) + (loop rest))))))) + ;;; ;;; Simplifying input expressions. @@ -441,6 +457,49 @@ (define matches? (list package-inputs package-native-inputs package-propagated-inputs))) + +;;; +;;; Crates, Cargo, Rust, and all that. +;;; + +(define* (rewrite-cargo-inputs package + #:key (policy 'silent) + (edit-expression edit-expression)) + (when (eq? (package-build-system package) cargo-build-system) + (match (package-field-location package 'arguments + #:value-location? #f) + (#f #f) + (location + (let* ((indent (location-column location))) + (edit-expression + (pk 'loc (location->source-properties location)) + (lambda (str) + (define arguments + (call-with-input-string (pk 'str str) read-with-comments)) + + (match arguments + (('arguments ('quasiquote lst)) + (let ((inputs (match (member #:cargo-inputs lst) + (#f '()) + ((_ inputs . _) inputs))) + (native (match (member #:cargo-development-inputs lst) + (#f '()) + ((_ inputs . _) inputs))) + (rest (strip-keyword-arguments + '(#:cargo-inputs #:cargo-development-inputs) + lst))) + (object-list->string + `(,@(if (null? rest) + '() + `((arguments ,(list 'quasiquote rest)))) + ,@(if (null? native) + '() + `((native-inputs ,(list 'quasiquote native)))) + ,@(if (null? inputs) + '() + `((inputs ,(list 'quasiquote inputs))))) + indent))))))))))) + (define (package-location) id 1muXUK-00047e-Hv for submit@debbugs.gnu.org; Tue, 07 Dec 2021 05:14:22 -0500 Received: from flashner.co.il ([178.62.234.194]:52988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1muXUG-00047Q-UR for 51845@debbugs.gnu.org; Tue, 07 Dec 2021 05:14:18 -0500 Received: from localhost (unknown [94.230.83.253]) by flashner.co.il (Postfix) with ESMTPSA id F2632402DB; Tue, 7 Dec 2021 10:14:10 +0000 (UTC) Date: Tue, 7 Dec 2021 12:11:04 +0200 From: Efraim Flashner To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: Using =?utf-8?Q?=E2=80=98native-inputs?= =?utf-8?B?4oCZIGFuZCDigJhpbnB1dHPigJk=?= for Cargo packages? Message-ID: Mail-Followup-To: Efraim Flashner , Ludovic =?utf-8?Q?Court=C3=A8s?= , 51845@debbugs.gnu.org References: <87zgpend04.fsf@gnu.org> <87wnkhlmfb.fsf@gnu.org> <405F2D9A-C0E6-42EC-9F81-F52F305B723C@flashner.co.il> <878rwxl6no.fsf_-_@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="GpTSFCB6c8EdULoH" Content-Disposition: inline In-Reply-To: <878rwxl6no.fsf_-_@gnu.org> 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-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 51845 Cc: 51845@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --GpTSFCB6c8EdULoH Content-Type: multipart/mixed; boundary="3XNKIioCZ2QNyaQn" Content-Disposition: inline --3XNKIioCZ2QNyaQn Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 06, 2021 at 11:17:47PM +0100, Ludovic Court=C3=A8s wrote: > Efraim Flashner skribis: >=20 > > On December 6, 2021 4:37:12 PM UTC, "Ludovic Court=C3=A8s" wrote: >=20 > [...] >=20 > >>Thinking out loud=E2=80=A6 would it work to change: > >> > >> (arguments '(#:cargo-inputs X #:cargo-development-inputs Y)) > >> > >>to: > >> > >> (native-inputs (map package-source Y)) > >> (inputs (map package-source X)) > >> > >>? >=20 > [...] >=20 > > Then we lose the transitive package sources, which is how we ended up w= here we are today. >=20 > True. >=20 > With the minimal changes to (guix build-system cargo) below, one can use > either the current style or pass =E2=80=9Cdevelopment inputs=E2=80=9D as = =E2=80=98native-inputs=E2=80=99 > and other dependencies as =E2=80=98inputs=E2=80=99. Source transitivity = is preserved > but you can write packages the normal way. >=20 > I modified some of the dependencies of librsvg to use > native-inputs/inputs and you can see when applying this part of the > patch that the librsvg derivation is unchanged. Good thing is that > =E2=80=98guix graph=E2=80=99 and =E2=80=98guix refresh -l=E2=80=99 work f= or these packages. >=20 > Is this a direction we want to take? I like the way it works out, and has Guix do the magic to give us the crates in the graph. On the other hand I tried changing the cargo-inputs =66rom librsvg to regular inputs, and after 2.5 minutes of trying to run `guix show librsvg` I still wasn't seeing the dependencies and my RAM usage was still increasing. Also gnu/packages/gnome.scm didn't fail to compile, so there was no notice of the loop. I changed some more packages which are transitive inputs of rust-encoding@0.2 and didn't see any slowdown. I was worried that this would affect a future use of `guix shell -D rust-app` not pulling in any of the crates but it still seems to work. I tried with rust-encoding@0.2 and got the crates for the packages I expected (only the ones I changed). (ins)efraim@3900XT ~/workspace/guix-core-updates$ ./pre-inst-env guix shell= -D rust-encoding@0.2 (ins)efraim@3900XT ~/workspace/guix-core-updates [env]$ ls $GUIX_ENVIRONMEN= T/share/cargo/registry/ | col cc-1.0.66.crate compiler_builtins-0.1.26.crate encoding-index-japanese-1.20141219.5.crate encoding-index-korean-1.20141219.5.crate encoding-index-simpchinese-1.20141219.5.crate encoding-index-singlebyte-1.20141219.5.crate encoding_index_tests-0.1.4.crate encoding-index-tradchinese-1.20141219.5.crate getopts-0.2.21.crate log-0.3.9.crate rustc-std-workspace-core-1.0.0.crate rustc-std-workspace-std-1.0.1.crate unicode-width-0.1.9.crate So to summarize, between your diff to treat inputs built using cargo-build-system as cargo-inputs and my changes to save previous crates for the next input we reach a place where we can start to change the crates over to use inputs and native-inputs instead of cargo-inputs and cargo-development-inputs without needing to flip everything at once. So I'd go with it's good, but I'm not sure it directly works to fix the problem we're having with librsvg. > If so, we can have =E2=80=98guix style=E2=80=99 automate transformations. >=20 > Thanks, > Ludo=E2=80=99. >=20 I've added some inline comments in the diff (and removed a bunch of lines) > diff --git a/guix/build-system/cargo.scm b/guix/build-system/cargo.scm > index 60c35eed07..b2d97beb2f 100644 > --- a/guix/build-system/cargo.scm > +++ b/guix/build-system/cargo.scm > @@ -125,17 +125,21 @@ (define builder > #:target #f > #:guile-for-build guile)) > =20 > +(define (cargo-input? input) > + (match input > + ((label (? package? p)) > + (eq? cargo-build-system (package-build-system p))) > + (_ #f))) > + I would've sorted based on the name starting with 'rust-'. I can't think of an example quickly where it would happen, but take librsvg, which we currently build with cargo-build-system. If we need it as an input for pango (or some other library) and we also build that with the cargo-build-system then we'll just get the rust inputs, not the actual library. Can we check the arguments field for `#:install-source? #f` and use it as a regular {propagated-,native-,}input in that case? Then we could have cbindgen and rust-cbindgen, depending on if we needed the binary or the sources. > (define (package-cargo-inputs p) > - (apply > - (lambda* (#:key (cargo-inputs '()) #:allow-other-keys) > - cargo-inputs) > - (package-arguments p))) > + (match (member #:cargo-inputs (package-arguments p)) > + (#f (filter cargo-input? (package-inputs p))) > + ((_ inputs . _) inputs))) > =20 > (define (package-cargo-development-inputs p) > - (apply > - (lambda* (#:key (cargo-development-inputs '()) #:allow-other-keys) > - cargo-development-inputs) > - (package-arguments p))) > + (match (member #:cargo-development-inputs (package-arguments p)) > + (#f (filter cargo-input? (package-native-inputs p))) > + ((_ inputs . _) inputs))) I see we don't get rid of #:cargo-inputs or #:cargo-development-inputs. So even if applying the style change to all the crates causes circular dependency problems we can fall back to the current method. I ran into problems once I hit all the rust-bindgen crates. > =20 > (define (crate-closure inputs) > "Return the closure of INPUTS when considering the 'cargo-inputs' and > @@ -235,8 +239,8 @@ (define (expand-crate-sources cargo-inputs cargo-deve= lopment-inputs) > (define* (lower name > #:key source inputs native-inputs outputs system target > (rust (default-rust)) > - (cargo-inputs '()) > - (cargo-development-inputs '()) > + (cargo-inputs (filter cargo-input? inputs)) > + (cargo-development-inputs (filter cargo-input? native-in= puts)) I tried commenting the cargo-development-inputs out, but it only caused problems for me when trying to compile rust-encoding@0.2. > #:allow-other-keys > #:rest arguments) > "Return a bag for NAME." > @@ -260,7 +264,9 @@ (define private-keywords > (build-inputs `(("cargo" ,rust "cargo") > ("rustc" ,rust) > ,@(expand-crate-sources cargo-inputs cargo-deve= lopment-inputs) > - ,@native-inputs)) > + ,@(if (eq? native-inputs cargo-development-inpu= ts) > + '() > + native-inputs))) > (outputs outputs) > (build cargo-build) > (arguments (strip-keyword-arguments private-keywords arguments)= )))) > diff --git a/guix/packages.scm b/guix/packages.scm > index b3c5a00011..275cc3675c 100644 > --- a/guix/packages.scm > +++ b/guix/packages.scm > @@ -660,7 +660,8 @@ (define (deprecated-package old-name p) > (name old-name) > (properties `((superseded . ,p))))) > =20 > -(define (package-field-location package field) > +(define* (package-field-location package field > + #:key (value-location? #t)) > "Return the source code location of the definition of FIELD for PACKAG= E, or > #f if it could not be determined." > (match (package-location package) > @@ -678,7 +679,10 @@ (define (package-field-location package field) > (let ((field (assoc field inits))) > (match field > ((_ value) > - (let ((loc (and=3D> (source-properties value) > + (let ((loc (and=3D> (source-properties > + (if value-location? > + value > + field)) > source-properties->location))) > (and loc > ;; Preserve the original file name, which= may be a > diff --git a/guix/scripts/style.scm b/guix/scripts/style.scm > index 86a46f693c..dccc20d880 100644 > --- a/guix/scripts/style.scm > +++ b/guix/scripts/style.scm > @@ -29,6 +29,7 @@ > =20 > (define-module (guix scripts style) > #:autoload (gnu packages) (specification->package fold-packages) > + #:autoload (guix build-system cargo) (cargo-build-system) > #:use-module (guix scripts) > #:use-module ((guix scripts build) #:select (%standard-build-options)) > #:use-module (guix combinators) > @@ -212,6 +213,21 @@ (define (object->string* obj indent) > (pretty-print-with-comments port obj > #:indent indent)))) > =20 > +(define (object-list->string lst indent) > + (call-with-output-string > + (lambda (port) > + (let loop ((lst lst)) > + (match lst > + ((obj) > + (pretty-print-with-comments port obj > + #:indent indent)) > + ((obj rest ...) > + (pretty-print-with-comments port obj > + #:indent indent) > + (newline port) > + (display (make-string indent #\space) port) > + (loop rest))))))) > + > =0C > ;;; > ;;; Simplifying input expressions. > @@ -441,6 +457,49 @@ (define matches? > (list package-inputs package-native-inputs > package-propagated-inputs))) > =20 > +=0C > +;;; > +;;; Crates, Cargo, Rust, and all that. > +;;; > + > +(define* (rewrite-cargo-inputs package > + #:key (policy 'silent) > + (edit-expression edit-expression)) > + (when (eq? (package-build-system package) cargo-build-system) > + (match (package-field-location package 'arguments > + #:value-location? #f) > + (#f #f) > + (location > + (let* ((indent (location-column location))) > + (edit-expression > + (pk 'loc (location->source-properties location)) > + (lambda (str) > + (define arguments > + (call-with-input-string (pk 'str str) read-with-comments)) > + > + (match arguments > + (('arguments ('quasiquote lst)) > + (let ((inputs (match (member #:cargo-inputs lst) > + (#f '()) > + ((_ inputs . _) inputs))) > + (native (match (member #:cargo-development-inputs l= st) > + (#f '()) > + ((_ inputs . _) inputs))) > + (rest (strip-keyword-arguments > + '(#:cargo-inputs #:cargo-development-inputs) > + lst))) > + (object-list->string > + `(,@(if (null? rest) > + '() > + `((arguments ,(list 'quasiquote rest)))) > + ,@(if (null? native) > + '() > + `((native-inputs ,(list 'quasiquote native)))) > + ,@(if (null? inputs) > + '() > + `((inputs ,(list 'quasiquote inputs))))) > + indent))))))))))) > + > (define (package-location "Return true if P1's location is \"before\" P2's." > (let ((loc1 (package-location p1)) > @@ -536,7 +595,7 @@ (define (parse-options) > edit-expression)) > (policy (assoc-ref opts 'input-simplification-policy))) > (for-each (lambda (package) > - (simplify-package-inputs package #:policy policy > + (rewrite-cargo-inputs package #:policy policy > #:edit-expression edit)) > ;; Sort package by source code location so that we start e= diting > ;; files from the bottom and going upward. That way, the --=20 Efraim Flashner =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 --3XNKIioCZ2QNyaQn Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename=rust-changes-c-u-f Content-Transfer-Encoding: quoted-printable diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index b8c4c7bd39..ae717645d8 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -5728,18 +5728,18 @@ (define-public rust-bitflags-1.3 (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "12ki6w8gn1ldq7yz9y680llwk5gmrhrzszaa17g1sbrw2r2qvwxy")))) - (arguments - `(#:tests? #f ; Tests require rust-1.46 or newer. - #:cargo-inputs - (("rust-compiler-builtins" ,rust-compiler-builtins-0.1) - ("rust-rustc-std-workspace-core" ,rust-rustc-std-workspace-core-1)) - #:cargo-development-inputs - (("rust-rustversion" ,rust-rustversion-1) + (arguments `(#:tests? #f ; Tests require rust-1.46 or newer. + )) + (native-inputs + `(("rust-rustversion" ,rust-rustversion-1) ("rust-serde" ,rust-serde-1) ("rust-serde-derive" ,rust-serde-derive-1) ("rust-serde-json" ,rust-serde-json-1) ("rust-trybuild" ,rust-trybuild-1) - ("rust-walkdir" ,rust-walkdir-2)))))) + ("rust-walkdir" ,rust-walkdir-2))) + (inputs + `(("rust-compiler-builtins" ,rust-compiler-builtins-0.1) + ("rust-rustc-std-workspace-core" ,rust-rustc-std-workspace-core-1)= )))) =20 (define-public rust-bitflags-0.9 (package @@ -8391,12 +8391,9 @@ (define-public rust-cast-0.2 (base32 "1c5z7zryj0zwnhdgs6rw5dfvnlwc1vm19jzrlgx5055alnwk952b")))) (build-system cargo-build-system) - (arguments - `(#:skip-build? #t - #:cargo-inputs - (("rust-rustc-version" ,rust-rustc-version-0.2)) - #:cargo-development-inputs - (("rust-quickcheck" ,rust-quickcheck-0.9)))) + (arguments `(#:skip-build? #t)) + (native-inputs `(("rust-quickcheck" ,rust-quickcheck-0.9))) + (inputs `(("rust-rustc-version" ,rust-rustc-version-0.2))) (home-page "https://github.com/japaric/cast.rs") (synopsis "Ergonomic, checked cast functions for primitive types") @@ -8434,7 +8431,7 @@ (define-public rust-cc-1 (origin (method url-fetch) (uri (crate-uri "cc" version)) - (file-name (string-append name "-" version ".crate")) + (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "0j7d7h4n81z5f22l3v8ggjvvw8m64636nlaqax4x1y44da1rc12c")))) @@ -8596,7 +8593,7 @@ (define-public rust-cfg-if-0.1 (origin (method url-fetch) (uri (crate-uri "cfg-if" version)) - (file-name (string-append name "-" version ".crate")) + (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "08h80ihs74jcyp24cd75wwabygbbdgl05k6p5dmq8akbr78vv1a7")))) @@ -10052,16 +10049,17 @@ (define-public rust-compiler-builtins-0.1 (origin (method url-fetch) (uri (crate-uri "compiler_builtins" version)) - (file-name (string-append name "-" version ".crate")) + (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "1rhj6ccmfkh9gcxnxgjq4fg257yi4f9325nfzsphbmxwkrg06sq3")))) (build-system cargo-build-system) (arguments `(#:skip-build? #t - #:cargo-inputs - (("rust-rustc-std-workspace-core" ,rust-rustc-std-workspace-core-1) - ("rust-cc" ,rust-cc-1)))) + )) + (inputs + `(("rust-rustc-std-workspace-core" ,rust-rustc-std-workspace-core-1) + ("rust-cc" ,rust-cc-1))) (home-page "https://github.com/rust-lang/compiler-builtins") (synopsis "Compiler intrinsics used by the Rust compiler") (description @@ -12459,10 +12457,9 @@ (define-public rust-cssparser-0.28 (sha256 (base32 "1h924c5g2rwlmgk8hllciyky3ih3z9vf04xz3xsp3cv1jyd5kf0x")))) (build-system cargo-build-system) - (arguments - `(#:skip-build? #t - #:cargo-inputs - (("rust-cssparser-macros" ,rust-cssparser-macros-0.6) + (arguments `(#:skip-build? #t)) + (inputs + `(("rust-cssparser-macros" ,rust-cssparser-macros-0.6) ("rust-dtoa-short" ,rust-dtoa-short-0.3) ("rust-itoa" ,rust-itoa-0.4) ("rust-matches" ,rust-matches-0.1) @@ -12471,7 +12468,7 @@ (define-public rust-cssparser-0.28 ("rust-quote" ,rust-quote-1) ("rust-serde" ,rust-serde-1) ("rust-smallvec" ,rust-smallvec-1) - ("rust-syn" ,rust-syn-1)))) + ("rust-syn" ,rust-syn-1))) (home-page "https://github.com/servo/rust-cssparser") (synopsis "Rust implementation of CSS Syntax Level 3") (description @@ -13601,13 +13598,11 @@ (define-public rust-data-url-0.1 (base32 "176wa1n8h71iwyaxhar4sqwrgrvb5sxk26az0fy88vnxrsffjgyk")))) (build-system cargo-build-system) - (arguments - `(#:cargo-inputs - (("rust-matches" ,rust-matches-0.1)) - #:cargo-development-inputs - (("rust-rustc-test" ,rust-rustc-test-0.3) + (native-inputs + `(("rust-rustc-test" ,rust-rustc-test-0.3) ("rust-serde" ,rust-serde-1) - ("rust-serde-json" ,rust-serde-json-1)))) + ("rust-serde-json" ,rust-serde-json-1))) + (inputs `(("rust-matches" ,rust-matches-0.1))) (home-page "https://github.com/servo/rust-url") (synopsis "Processing of data: URL according to WHATWG's Fetch Standar= d") (description @@ -16334,23 +16329,24 @@ (define-public rust-encoding-0.2 (string-append name "-" version ".tar.gz")) (sha256 (base32 - "1v1ndmkarh9z3n5hk53da4z56hgk9wa5kcsm7cnx345raqw983bb")))) + "1v1ndmkarh9z3n5hk53da4z56hgk9wa5kcsm7cnx345raqw983bb")) + (modules '((guix build utils))) + (snippet + '(begin + (substitute* "Cargo.toml" + (("path.*") "")))))) (build-system cargo-build-system) (arguments - `(#:skip-build? #t - #:cargo-inputs - (("rust-encoding-index-japanese" - ,rust-encoding-index-japanese-1.20141219) - ("rust-encoding-index-korean" - ,rust-encoding-index-korean-1.20141219) - ("rust-encoding-index-simpchinese" - ,rust-encoding-index-simpchinese-1.20141219) - ("rust-encoding-index-singlebyte" - ,rust-encoding-index-singlebyte-1.20141219) - ("rust-encoding-index-tradchinese" - ,rust-encoding-index-tradchinese-1.20141219)) - #:cargo-development-inputs - (("rust-getopts" ,rust-getopts-0.2)))) + `(;#:skip-build? #t + #:tests? #f + )) + (native-inputs `(("rust-getopts" ,rust-getopts-0.2))) + (inputs + `(("rust-encoding-index-japanese" ,rust-encoding-index-japanese-1.20= 141219) + ("rust-encoding-index-korean" ,rust-encoding-index-korean-1.201412= 19) + ("rust-encoding-index-simpchinese" ,rust-encoding-index-simpchines= e-1.20141219) + ("rust-encoding-index-singlebyte" ,rust-encoding-index-singlebyte-= 1.20141219) + ("rust-encoding-index-tradchinese" ,rust-encoding-index-tradchines= e-1.20141219))) (home-page "https://github.com/lifthrasiir/rust-encoding") (synopsis "Character encoding support for Rust") @@ -16374,8 +16370,9 @@ (define-public rust-encoding-index-japanese-1.20141= 219 (build-system cargo-build-system) (arguments `(#:skip-build? #t - #:cargo-inputs - (("rust-encoding-index-tests" ,rust-encoding-index-tests-0.1)))) + )) + (inputs + `(("rust-encoding-index-tests" ,rust-encoding-index-tests-0.1))) (home-page "https://github.com/lifthrasiir/rust-encoding") (synopsis "Index tables for Japanese character encodings") (description @@ -16398,8 +16395,9 @@ (define-public rust-encoding-index-korean-1.20141219 (build-system cargo-build-system) (arguments `(#:skip-build? #t - #:cargo-inputs - (("rust-encoding-index-tests" ,rust-encoding-index-tests-0.1)))) + )) + (inputs + `(("rust-encoding-index-tests" ,rust-encoding-index-tests-0.1))) (home-page "https://github.com/lifthrasiir/rust-encoding") (synopsis "Index tables for Korean character encodings") (description @@ -16422,8 +16420,9 @@ (define-public rust-encoding-index-simpchinese-1.20= 141219 (build-system cargo-build-system) (arguments `(#:skip-build? #t - #:cargo-inputs - (("rust-encoding-index-tests" ,rust-encoding-index-tests-0.1)))) + )) + (inputs + `(("rust-encoding-index-tests" ,rust-encoding-index-tests-0.1))) (home-page "https://github.com/lifthrasiir/rust-encoding") (synopsis "Index tables for simplified Chinese character encodings") (description @@ -16446,8 +16445,9 @@ (define-public rust-encoding-index-singlebyte-1.201= 41219 (build-system cargo-build-system) (arguments `(#:skip-build? #t - #:cargo-inputs - (("rust-encoding-index-tests" ,rust-encoding-index-tests-0.1)))) + )) + (inputs + `(("rust-encoding-index-tests" ,rust-encoding-index-tests-0.1))) (home-page "https://github.com/lifthrasiir/rust-encoding") (synopsis "Index tables for various single-byte character encodings") (description @@ -16493,8 +16493,9 @@ (define-public rust-encoding-index-tradchinese-1.20= 141219 (build-system cargo-build-system) (arguments `(#:skip-build? #t - #:cargo-inputs - (("rust-encoding-index-tests" ,rust-encoding-index-tests-0.1)))) + )) + (inputs + `(("rust-encoding-index-tests" ,rust-encoding-index-tests-0.1))) (home-page "https://github.com/lifthrasiir/rust-encoding") (synopsis "Index tables for traditional Chinese character encodings") (description @@ -18388,8 +18389,7 @@ (define-public rust-float-cmp-0.8 (base32 "1i56hnzjn5pmrcm47fwkmfxiihk7wz5vvcgpb0kpfhzkqi57y9p1")))) (build-system cargo-build-system) - (arguments - `(#:cargo-inputs (("rust-num-traits" ,rust-num-traits-0.2)))) + (inputs `(("rust-num-traits" ,rust-num-traits-0.2))) (home-page "https://github.com/mikedilger/float-cmp") (synopsis "Floating point approximate comparison traits") (description @@ -20542,18 +20542,17 @@ (define-public rust-getopts-0.2 (origin (method url-fetch) (uri (crate-uri "getopts" version)) - (file-name (string-append name "-" version ".crate")) + (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "1mgb3qvivi26gs6ihqqhh8iyhp3vgxri6vwyrwg28w0xqzavznql")))) (build-system cargo-build-system) - (arguments - `(#:cargo-inputs - (("rust-unicode-width" ,rust-unicode-width-0.1) + (inputs + `(("rust-unicode-width" ,rust-unicode-width-0.1) ("rust-rustc-std-workspace-core" ,rust-rustc-std-workspace-core-1) - ("rust-rustc-std-workspace-std" ,rust-rustc-std-workspace-std-1)) - #:cargo-development-inputs - (("rust-log" ,rust-log-0.3)))) + ("rust-rustc-std-workspace-std" ,rust-rustc-std-workspace-std-1))) + (native-inputs + `(("rust-log" ,rust-log-0.4))) (home-page "https://github.com/rust-lang/getopts") (synopsis "Rust library for option parsing for CLI utilities") (description "This library provides getopts-like option parsing.") @@ -26818,11 +26817,8 @@ (define-public rust-libm-0.2 (base32 "0akh56sh51adhagmk9l84dyrlz60gv8ri05xhr13i1b18czkpmy7")))) (build-system cargo-build-system) - (arguments - `(#:cargo-inputs - (("rust-rand" ,rust-rand-0.6)) - #:cargo-development-inputs - (("rust-no-panic" ,rust-no-panic-0.1)))) + (native-inputs `(("rust-no-panic" ,rust-no-panic-0.1))) + (inputs `(("rust-rand" ,rust-rand-0.6))) (home-page "https://github.com/rust-lang/libm") (synopsis "Libm in pure Rust") (description "This package provides an implementation of libm in pure = Rust.") @@ -27685,7 +27681,7 @@ (define-public rust-log-0.4 (origin (method url-fetch) (uri (crate-uri "log" version)) - (file-name (string-append name "-" version ".crate")) + (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "04175hv0v62shd82qydq58a48k3bjijmk54v38zgqlbxqkkbpfai")))) (build-system cargo-build-system) @@ -44102,7 +44098,7 @@ (define-public rust-rustc-std-workspace-core-1 (origin (method url-fetch) (uri (crate-uri "rustc-std-workspace-core" version)) - (file-name (string-append name "-" version ".crate")) + (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "1309xhwyai9xpz128xrfjqkmnkvgjwddznmj7brbd8i8f58zamhr")))) @@ -58950,11 +58946,10 @@ (define-public rust-unicode-width-0.1 (base32 "0wq9wl69wlp6zwlxp660g9p4hm5gk91chwk14dp1gl9bxba45mry")))) (build-system cargo-build-system) - (arguments - `(#:cargo-inputs - (("rust-compiler-builtins" ,rust-compiler-builtins-0.1) + (inputs + `(("rust-compiler-builtins" ,rust-compiler-builtins-0.1) ("rust-rustc-std-workspace-core" ,rust-rustc-std-workspace-core-1) - ("rust-rustc-std-workspace-std" ,rust-rustc-std-workspace-std-1)))) + ("rust-rustc-std-workspace-std" ,rust-rustc-std-workspace-std-1))) (home-page "https://github.com/unicode-rs/unicode-width") (synopsis "Determine displayed width according to Unicode rules") (description "This crate allows you to determine displayed width of diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 2037ab9369..389b53eef0 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -3479,43 +3479,6 @@ (define-public librsvg ((guix build cargo-build-system) (guix build utils) ((guix build gnu-build-system) #:prefix gnu:)) - #:cargo-inputs - (("rust-bitflags" ,rust-bitflags-1) - ("rust-cairo-rs" ,rust-cairo-rs-0.8) - ("rust-cairo-sys-rs" ,rust-cairo-sys-rs-0.9) - ("rust-cast" ,rust-cast-0.2) - ("rust-cssparser" ,rust-cssparser-0.27) - ("rust-data-url" ,rust-data-url-0.1) - ("rust-encoding" ,rust-encoding-0.2) - ("rust-float-cmp" ,rust-float-cmp-0.8) - ("rust-gdk-pixbuf" ,rust-gdk-pixbuf-0.8) - ("rust-gdk-pixbuf-sys" ,rust-gdk-pixbuf-sys-0.9) - ("rust-gio" ,rust-gio-0.8) - ("rust-gio-sys" ,rust-gio-sys-0.9) - ("rust-glib" ,rust-glib-0.9) - ("rust-glib-sys" ,rust-glib-sys-0.9) - ("rust-gobject-sys" ,rust-gobject-sys-0.9) - ("rust-itertools" ,rust-itertools-0.9) - ("rust-language-tags" ,rust-language-tags-0.2) - ("rust-libc" ,rust-libc-0.2) - ("rust-locale-config" ,rust-locale-config-0.3) - ("rust-markup5ever" ,rust-markup5ever-0.10) - ("rust-nalgebra" ,rust-nalgebra-0.21) - ("rust-num-traits" ,rust-num-traits-0.2) - ("rust-once-cell" ,rust-once-cell-1) - ("rust-pkg-config" ,rust-pkg-config-0.3) - ("rust-pango" ,rust-pango-0.8) - ("rust-pango-sys" ,rust-pango-sys-0.9) - ("rust-pangocairo" ,rust-pangocairo-0.9) - ("rust-rayon" ,rust-rayon-1) - ("rust-rctree" ,rust-rctree-0.3) - ("rust-rgb" ,rust-rgb-0.8) - ("rust-regex" ,rust-regex-1) - ("rust-selectors" ,rust-selectors-0.22) - ("rust-string-cache" ,rust-string-cache-0.8) - ("rust-tinyvec" ,rust-tinyvec-0.3) - ("rust-url" ,rust-url-2) - ("rust-xml5ever" ,rust-xml5ever-0.16)) #:cargo-development-inputs (("rust-assert-cmd" ,rust-assert-cmd-1) ("rust-cairo-rs" ,rust-cairo-rs-0.8) @@ -3621,7 +3584,43 @@ (define-public librsvg libcroco libgsf libxml2 - pango)) + pango + rust-bitflags-1 + rust-cairo-rs-0.8 + rust-cairo-sys-rs-0.9 + rust-cast-0.2 + rust-cssparser-0.27 + rust-data-url-0.1 + rust-encoding-0.2 + rust-float-cmp-0.8 + rust-gdk-pixbuf-0.8 + rust-gdk-pixbuf-sys-0.9 + rust-gio-0.8 + rust-gio-sys-0.9 + rust-glib-0.9 + rust-glib-sys-0.9 + rust-gobject-sys-0.9 + rust-itertools-0.9 + rust-language-tags-0.2 + rust-libc-0.2 + rust-locale-config-0.3 + rust-markup5ever-0.10 + rust-nalgebra-0.21 + rust-num-traits-0.2 + rust-once-cell-1 + rust-pkg-config-0.3 + rust-pango-0.8 + rust-pango-sys-0.9 + rust-pangocairo-0.9 + rust-rayon-1 + rust-rctree-0.3 + rust-rgb-0.8 + rust-regex-1 + rust-selectors-0.22 + rust-string-cache-0.8 + rust-tinyvec-0.3 + rust-url-2 + rust-xml5ever-0.16)) (propagated-inputs (list cairo gdk-pixbuf glib)) (synopsis "SVG rendering library") diff --git a/guix/build-system/cargo.scm b/guix/build-system/cargo.scm index 60c35eed07..b2d97beb2f 100644 --- a/guix/build-system/cargo.scm +++ b/guix/build-system/cargo.scm @@ -125,17 +125,21 @@ (define builder #:target #f #:guile-for-build guile)) =20 +(define (cargo-input? input) + (match input + ((label (? package? p)) + (eq? cargo-build-system (package-build-system p))) + (_ #f))) + (define (package-cargo-inputs p) - (apply - (lambda* (#:key (cargo-inputs '()) #:allow-other-keys) - cargo-inputs) - (package-arguments p))) + (match (member #:cargo-inputs (package-arguments p)) + (#f (filter cargo-input? (package-inputs p))) + ((_ inputs . _) inputs))) =20 (define (package-cargo-development-inputs p) - (apply - (lambda* (#:key (cargo-development-inputs '()) #:allow-other-keys) - cargo-development-inputs) - (package-arguments p))) + (match (member #:cargo-development-inputs (package-arguments p)) + (#f (filter cargo-input? (package-native-inputs p))) + ((_ inputs . _) inputs))) =20 (define (crate-closure inputs) "Return the closure of INPUTS when considering the 'cargo-inputs' and @@ -235,8 +239,8 @@ (define (expand-crate-sources cargo-inputs cargo-develo= pment-inputs) (define* (lower name #:key source inputs native-inputs outputs system target (rust (default-rust)) - (cargo-inputs '()) - (cargo-development-inputs '()) + (cargo-inputs (filter cargo-input? inputs)) + (cargo-development-inputs (filter cargo-input? native-inpu= ts)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -260,7 +264,9 @@ (define private-keywords (build-inputs `(("cargo" ,rust "cargo") ("rustc" ,rust) ,@(expand-crate-sources cargo-inputs cargo-develo= pment-inputs) - ,@native-inputs)) + ,@(if (eq? native-inputs cargo-development-inputs) + '() + native-inputs))) (outputs outputs) (build cargo-build) (arguments (strip-keyword-arguments private-keywords arguments)))= )) diff --git a/guix/packages.scm b/guix/packages.scm index b3c5a00011..275cc3675c 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -660,7 +660,8 @@ (define (deprecated-package old-name p) (name old-name) (properties `((superseded . ,p))))) =20 -(define (package-field-location package field) +(define* (package-field-location package field + #:key (value-location? #t)) "Return the source code location of the definition of FIELD for PACKAGE,= or #f if it could not be determined." (match (package-location package) @@ -678,7 +679,10 @@ (define (package-field-location package field) (let ((field (assoc field inits))) (match field ((_ value) - (let ((loc (and=3D> (source-properties value) + (let ((loc (and=3D> (source-properties + (if value-location? + value + field)) source-properties->location))) (and loc ;; Preserve the original file name, which m= ay be a diff --git a/guix/scripts/style.scm b/guix/scripts/style.scm index 86a46f693c..dccc20d880 100644 --- a/guix/scripts/style.scm +++ b/guix/scripts/style.scm @@ -29,6 +29,7 @@ =20 (define-module (guix scripts style) #:autoload (gnu packages) (specification->package fold-packages) + #:autoload (guix build-system cargo) (cargo-build-system) #:use-module (guix scripts) #:use-module ((guix scripts build) #:select (%standard-build-options)) #:use-module (guix combinators) @@ -212,6 +213,21 @@ (define (object->string* obj indent) (pretty-print-with-comments port obj #:indent indent)))) =20 +(define (object-list->string lst indent) + (call-with-output-string + (lambda (port) + (let loop ((lst lst)) + (match lst + ((obj) + (pretty-print-with-comments port obj + #:indent indent)) + ((obj rest ...) + (pretty-print-with-comments port obj + #:indent indent) + (newline port) + (display (make-string indent #\space) port) + (loop rest))))))) + =0C ;;; ;;; Simplifying input expressions. @@ -441,6 +457,49 @@ (define matches? (list package-inputs package-native-inputs package-propagated-inputs))) =20 +=0C +;;; +;;; Crates, Cargo, Rust, and all that. +;;; + +(define* (rewrite-cargo-inputs package + #:key (policy 'silent) + (edit-expression edit-expression)) + (when (eq? (package-build-system package) cargo-build-system) + (match (package-field-location package 'arguments + #:value-location? #f) + (#f #f) + (location + (let* ((indent (location-column location))) + (edit-expression + (pk 'loc (location->source-properties location)) + (lambda (str) + (define arguments + (call-with-input-string (pk 'str str) read-with-comments)) + + (match arguments + (('arguments ('quasiquote lst)) + (let ((inputs (match (member #:cargo-inputs lst) + (#f '()) + ((_ inputs . _) inputs))) + (native (match (member #:cargo-development-inputs lst) + (#f '()) + ((_ inputs . _) inputs))) + (rest (strip-keyword-arguments + '(#:cargo-inputs #:cargo-development-inputs) + lst))) + (object-list->string + `(,@(if (null? rest) + '() + `((arguments ,(list 'quasiquote rest)))) + ,@(if (null? native) + '() + `((native-inputs ,(list 'quasiquote native)))) + ,@(if (null? inputs) + '() + `((inputs ,(list 'quasiquote inputs))))) + indent))))))))))) + (define (package-location) id 1mugRf-00018A-Mi for submit@debbugs.gnu.org; Tue, 07 Dec 2021 14:48:12 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52964) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mugRd-00017w-Ey for 51845@debbugs.gnu.org; Tue, 07 Dec 2021 14:48:10 -0500 Received: from [2001:470:142:3::e] (port=55596 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mugRX-0004v9-TH; Tue, 07 Dec 2021 14:48:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=tUapdr+uTly3gtKwOnqqjY9RRRiFftpfcB9gVY94RBI=; b=KzjiLtgvXUssdD0gB0M8 dg3vQOWZp58NgXlpeW9eYR5WYCoUFE9fsuC2KDNutieTtz5u+CMUIbjNrvp8nmEyhAqG7pyM1j632 xfna0ksj8wgsJpV7WXFLXFSOEzKWFlpGj5CR70E/0iIzsdzyYpzTFG8Ug5zXwlx2Z5RTMk3KHKTkb F6poi7DHY7g8UUMcoXlcL10Rp5C7CGmH8L4w5bDS1tFPrYZKh3s2JjzGGYZWuyHpVf7SOocXzZx4U 3+QdiFFM6VXeLC348ZRTM7RAfTAdW3A99Ol9DB8Cl9/SnVBlB1JIFy8jsOseDJH/JY0hsncmfl+mx M4qYVPcgmYZ2rw==; Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=37112 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mugRX-0004qL-MX; Tue, 07 Dec 2021 14:48:04 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Efraim Flashner Subject: Re: Using =?utf-8?Q?=E2=80=98native-inputs=E2=80=99?= and =?utf-8?B?4oCYaW5wdXRz4oCZ?= for Cargo packages? References: <87zgpend04.fsf@gnu.org> <87wnkhlmfb.fsf@gnu.org> <405F2D9A-C0E6-42EC-9F81-F52F305B723C@flashner.co.il> <878rwxl6no.fsf_-_@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 17 Frimaire an 230 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 07 Dec 2021 20:48:00 +0100 In-Reply-To: (Efraim Flashner's message of "Tue, 7 Dec 2021 12:11:04 +0200") Message-ID: <87a6hci4cv.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 51845 Cc: 51845@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Howdy! Efraim Flashner skribis: > On Mon, Dec 06, 2021 at 11:17:47PM +0100, Ludovic Court=C3=A8s wrote: [...] >> With the minimal changes to (guix build-system cargo) below, one can use >> either the current style or pass =E2=80=9Cdevelopment inputs=E2=80=9D as= =E2=80=98native-inputs=E2=80=99 >> and other dependencies as =E2=80=98inputs=E2=80=99. Source transitivity= is preserved >> but you can write packages the normal way. >>=20 >> I modified some of the dependencies of librsvg to use >> native-inputs/inputs and you can see when applying this part of the >> patch that the librsvg derivation is unchanged. Good thing is that >> =E2=80=98guix graph=E2=80=99 and =E2=80=98guix refresh -l=E2=80=99 work = for these packages. >>=20 >> Is this a direction we want to take? > > I like the way it works out, and has Guix do the magic to give us the > crates in the graph. On the other hand I tried changing the cargo-inputs > from librsvg to regular inputs, and after 2.5 minutes of trying to run > `guix show librsvg` I still wasn't seeing the dependencies and my RAM > usage was still increasing. Also gnu/packages/gnome.scm didn't fail to > compile, so there was no notice of the loop. Notice that the dependency cycle, as discussed on IRC, breaks things like =E2=80=98guix show=E2=80=99 (?) and =E2=80=98guix graph=E2=80=99, but = doesn=E2=80=99t break actual package builds because it=E2=80=99s a cycle that vanishes once packages a= re lowered to bags and derivations. Regardless, it would be nice not to have cycles in the first place. [...] > So to summarize, between your diff to treat inputs built using > cargo-build-system as cargo-inputs and my changes to save previous > crates for the next input we reach a place where we can start to change > the crates over to use inputs and native-inputs instead of cargo-inputs > and cargo-development-inputs without needing to flip everything at once. What are the =E2=80=9Cchanges to save previous crates for the next input=E2= =80=9D? > So I'd go with it's good, but I'm not sure it directly works to fix the > problem we're having with librsvg. No no, it=E2=80=99s completely unrelated to the librsvg issue, which is why= I changed subject lines. :-) I think it=E2=80=99d be nice to have anyway. >> +(define (cargo-input? input) >> + (match input >> + ((label (? package? p)) >> + (eq? cargo-build-system (package-build-system p))) >> + (_ #f))) >> + > > I would've sorted based on the name starting with 'rust-'. OK. [...] >> (define (package-cargo-inputs p) >> - (apply >> - (lambda* (#:key (cargo-inputs '()) #:allow-other-keys) >> - cargo-inputs) >> - (package-arguments p))) >> + (match (member #:cargo-inputs (package-arguments p)) >> + (#f (filter cargo-input? (package-inputs p))) >> + ((_ inputs . _) inputs))) >>=20=20 >> (define (package-cargo-development-inputs p) >> - (apply >> - (lambda* (#:key (cargo-development-inputs '()) #:allow-other-keys) >> - cargo-development-inputs) >> - (package-arguments p))) >> + (match (member #:cargo-development-inputs (package-arguments p)) >> + (#f (filter cargo-input? (package-native-inputs p))) >> + ((_ inputs . _) inputs))) > > I see we don't get rid of #:cargo-inputs or #:cargo-development-inputs. > So even if applying the style change to all the crates causes circular > dependency problems we can fall back to the current method. I ran into > problems once I hit all the rust-bindgen crates. Right. Support for #:cargo-development-inputs and #:cargo-inputs is here so we could have a smooth =E2=80=9Cupgrade=E2=80=9D without breaking c= ompatibility. Anyway, I think the priority is to get =E2=80=98core-updates-frozen=E2=80= =99, which probably involves either pinning librsvg dependencies or using the bundled libraries as you showed at the beginning of this thread. We can resume work on prettified Rust packages after that; it=E2=80=99ll be useful to be able to use =E2=80=98guix refresh -l=E2=80=99. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 08 09:24:18 2021 Received: (at 51845) by debbugs.gnu.org; 8 Dec 2021 14:24:18 +0000 Received: from localhost ([127.0.0.1]:39830 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1muxrl-0006m8-I3 for submit@debbugs.gnu.org; Wed, 08 Dec 2021 09:24:18 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34772) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1muxrj-0006lp-HR for 51845@debbugs.gnu.org; Wed, 08 Dec 2021 09:24:16 -0500 Received: from [2001:470:142:3::e] (port=60062 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muxre-0001j2-AX; Wed, 08 Dec 2021 09:24:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=ab5ek+CaK2iysNwgrajJFCVVhEfjsGR9ibhHNjCZDzU=; b=SZ35+j+64ZdozurwUoRK nPhTkqVeAC2QuIFDaYWrfPVoKGoDzghT2CWmyjBrRqK1Jdm9Xc+X9aZn8+YFvHrqEbNNZaS07qZkz jdLPiL9IaatIw08eFgm1ic9aACBU6IHTQBOGmhu2ObQ0e/CfLnB4ZLvmPdC8Bx67dGQw8RIa2HcSO zPHFCzQ3vWGaJ54X86OL+NAcQj+uFR74kW/tLiJDWAct3vUjj8sqcQvQUibb+Vn5LMtkBh0b26ed2 1gSbJXmbQuaY67DAlQ0Mq6FwSViPvCZh01kRL5LX0TCK4qLyHSkWqBCgHNLHiyqsHoMVWywDqIuVR iuIfzMnyIy+A5w==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:51137 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muxre-0008Il-7c; Wed, 08 Dec 2021 09:24:10 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: guix-devel@gnu.org Subject: Re: [CORE-UPDATES] librsvg and rust References: X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 18 Frimaire an 230 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Wed, 08 Dec 2021 15:24:07 +0100 In-Reply-To: (Efraim Flashner's message of "Wed, 8 Dec 2021 11:16:13 +0200") Message-ID: <87tufjgooo.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 51845 Cc: 51845@debbugs.gnu.org, Liliana Marie Prikler X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello! For the record, this is a followup to Efraim=E2=80=99s proposal in . Efraim Flashner skribis: > Option 1: > Track down the ~220 crates which form the dependency graph (of crates) > for librsvg and pin them until the next core-updates cycle. Continue > like with other packages and add newer versions (like cmake or meson) as > packages need them.=C2=B9 The advantage of this approach is that we could do it incrementally: we could merge =E2=80=98core-updates-frozen=E2=80=99 today and just add pinned= variants of these 200+ crates as needed as time passes. The downside is that it=E2=80= =99s a lot of crates to take care of, and we might still accidentally overlook seemingly innocuous crate upgrades that end up causing major rebuilds. > Option 2: > Use the bundled crates and treat it as just part of the librsvg source > code.=C2=B2 > > Option 2b: > Use the bundled crates for now to finish with core-updates-frozen and > revisit this immediately on core-updates (not frozen). This option will involved a rebuild on x86_64, but the advantage is that we=E2=80=99ll be safe going forward: we won=E2=80=99t accidentally cause wo= rld rebuilds just because an obscure crate somewhere has been upgraded. [...] > I'm currently leaning option 2b, it'll get us past this hurdle for > core-updates-frozen and let us make changes to the crates as we work to > integrate them more fully into Guix. Same here; it=E2=80=99s not ideal, but it seems like the most reasonable short-term option. If there are no objections, I=E2=80=99d suggest that you go ahead with this plan. Thanks for keeping the ball rolling! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 08 09:36:51 2021 Received: (at 51845) by debbugs.gnu.org; 8 Dec 2021 14:36:51 +0000 Received: from localhost ([127.0.0.1]:39847 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1muy3v-0000oo-FW for submit@debbugs.gnu.org; Wed, 08 Dec 2021 09:36:51 -0500 Received: from sender4-of-o54.zoho.com ([136.143.188.54]:21498) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1muy3t-0000of-CH for 51845@debbugs.gnu.org; Wed, 08 Dec 2021 09:36:49 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1638974201; cv=none; d=zohomail.com; s=zohoarc; b=PNTrXwEbVYlte3SOswtFGofH2OA/T/Cr7XNda022m/O2zQxPWR1lf3jKo5JMHYbaiCze1PzmJtF394V3K8YuzRNbH+RPLfqItWJb+wes/XWUZHZLXPgTAChGKZObxlkPUMv4ZlSeqVWi3jG6JwWfmVCJptPm/4LLZgtK/op01v4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1638974201; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=93qiNMJDlkd486y7l26tkhZ3o/ro9VATeuRaAt6L8e4=; b=HnfakM4R4OgtoYI7XuyZblCeyd3+smVXn5naw9wE3gWUPOBS85NvCqJ0X9/omriBzz2RgnJGYD1/iUmOqXP0KU8n+/bHPSIvo452/6N1kqulzNy579x/ZaE+S2FFqVMUBrHZ/98sRCBe92PoDZyXsJQtbVasYLYKwZO6A5ry6P0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1638974201; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:To:Cc:Subject:Date:In-reply-to:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=93qiNMJDlkd486y7l26tkhZ3o/ro9VATeuRaAt6L8e4=; b=Chnmbs/8hHKYmVPACZMliYBZ6L8hzuoDqhX7NFLbSWrxo/kMxsfZA+Ksr8FRc5yK tKHFhoPAzf3lCSlydZdOdWnT2zGGqnIkX9ihvrtvAJWZ39PRkcFUYInAv2TVcuKyhW+ Yx6qW+H/v+8PpAVK9nUKw0OWz1Kq+UtunaOKmskM= Received: from localhost (p54ad4d4e.dip0.t-ipconnect.de [84.173.77.78]) by mx.zohomail.com with SMTPS id 1638974198753494.37980367521254; Wed, 8 Dec 2021 06:36:38 -0800 (PST) References: <87tufjgooo.fsf@gnu.org> User-agent: mu4e 1.6.6; emacs 27.2 From: Ricardo Wurmus To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [CORE-UPDATES] librsvg and rust Date: Wed, 08 Dec 2021 14:36:11 +0000 In-reply-to: <87tufjgooo.fsf@gnu.org> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Message-ID: <87r1antb7w.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 51845 Cc: guix-devel@gnu.org, 51845@debbugs.gnu.org, Liliana Marie Prikler X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Ludovic Court=C3=A8s writes: > Hello! > > For the record, this is a followup to Efraim=E2=80=99s proposal in > . > > Efraim Flashner skribis: > >> Option 1: >> Track down the ~220 crates which form the dependency graph (of crates) >> for librsvg and pin them until the next core-updates cycle. Continue >> like with other packages and add newer versions (like cmake or meson) as >> packages need them.=C2=B9 > > The advantage of this approach is that we could do it incrementally: we > could merge =E2=80=98core-updates-frozen=E2=80=99 today and just add pinn= ed variants of > these 200+ crates as needed as time passes. The downside is that it=E2= =80=99s a > lot of crates to take care of, and we might still accidentally overlook > seemingly innocuous crate upgrades that end up causing major rebuilds. > >> Option 2: >> Use the bundled crates and treat it as just part of the librsvg source >> code.=C2=B2 >> >> Option 2b: >> Use the bundled crates for now to finish with core-updates-frozen and >> revisit this immediately on core-updates (not frozen). > > This option will involved a rebuild on x86_64, but the advantage is that > we=E2=80=99ll be safe going forward: we won=E2=80=99t accidentally cause = world rebuilds > just because an obscure crate somewhere has been upgraded. > > [...] > >> I'm currently leaning option 2b, it'll get us past this hurdle for >> core-updates-frozen and let us make changes to the crates as we work to >> integrate them more fully into Guix. > > Same here; it=E2=80=99s not ideal, but it seems like the most reasonable > short-term option. > > If there are no objections, I=E2=80=99d suggest that you go ahead with th= is > plan. I agree that 2b is the most sensible option in our current situation. --=20 Ricardo From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 08 15:01:49 2021 Received: (at 51845) by debbugs.gnu.org; 8 Dec 2021 20:01:49 +0000 Received: from localhost ([127.0.0.1]:41481 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mv38P-00059i-4I for submit@debbugs.gnu.org; Wed, 08 Dec 2021 15:01:49 -0500 Received: from mail-4318.protonmail.ch ([185.70.43.18]:24941) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mv38L-000595-No for 51845@debbugs.gnu.org; Wed, 08 Dec 2021 15:01:48 -0500 Date: Wed, 08 Dec 2021 20:01:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail2; t=1638993698; bh=E+46atd7YBLYvIOT89KxWHkyMzfKpZnstnKlY8/PCw0=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:From:To:Cc; b=u5I0Uu+2+nt/AadKJuNB8izUjuWcFB2Z/vYfWA7NALIwH13LvlUUnVEP9H6R4Lk3a 7xqYkuUEIpAMQDvxPBgEKBsze2vxmAWSGvsmZBbfsLC6XVvHPx3erCYjLvb/n5EKbh bmA+0g8uog2ecjn/OmLGUcSbDF/J19scev1We+M8eqlXRzCusi/OPYK4GY3gAUq3dV pIFcY9MSmPMsUaWjgDQ2Rz5Y5nnV4uKW3KQwIitjjesVzJeegA6yQpxPZjVZ/D28vD GADJ1/yJD5miBYy0Eg3241E/zIIcROp4bVF5+uw/t2LxfDFoXc5/skax2SfIkEuA3Z gOUS4N0DaZUew== To: guix-devel@gnu.org From: Kaelyn Subject: Re: [CORE-UPDATES] librsvg and rust Message-ID: In-Reply-To: <87r1antb7w.fsf@elephly.net> References: <87tufjgooo.fsf@gnu.org> <87r1antb7w.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 51845 Cc: 51845@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Kaelyn Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Wednesday, December 8th, 2021 at 6:36 AM, Ricardo Wurmus wrote: > Ludovic Court=C3=A8s ludo@gnu.org writes: > > > Hello! > > > > For the record, this is a followup to Efraim=E2=80=99s proposal in > > > > https://issues.guix.gnu.org/51845. > > > > Efraim Flashner efraim@flashner.co.il skribis: > > > > > Option 1: > > > > > > Track down the ~220 crates which form the dependency graph (of crates= ) > > > > > > for librsvg and pin them until the next core-updates cycle. Continue > > > > > > like with other packages and add newer versions (like cmake or meson)= as > > > > > > packages need them.=C2=B9 > > > > The advantage of this approach is that we could do it incrementally: we > > > > could merge =E2=80=98core-updates-frozen=E2=80=99 today and just add pi= nned variants of > > > > these 200+ crates as needed as time passes. The downside is that it= =E2=80=99s a > > > > lot of crates to take care of, and we might still accidentally overlook > > > > seemingly innocuous crate upgrades that end up causing major rebuilds. > > > > > Option 2: > > > > > > Use the bundled crates and treat it as just part of the librsvg sourc= e > > > > > > code.=C2=B2 > > > > > > Option 2b: > > > > > > Use the bundled crates for now to finish with core-updates-frozen and > > > > > > revisit this immediately on core-updates (not frozen). > > > > This option will involved a rebuild on x86_64, but the advantage is tha= t > > > > we=E2=80=99ll be safe going forward: we won=E2=80=99t accidentally caus= e world rebuilds > > > > just because an obscure crate somewhere has been upgraded. > > > > [...] > > > > > I'm currently leaning option 2b, it'll get us past this hurdle for > > > > > > core-updates-frozen and let us make changes to the crates as we work = to > > > > > > integrate them more fully into Guix. > > > > Same here; it=E2=80=99s not ideal, but it seems like the most reasonabl= e > > > > short-term option. > > > > If there are no objections, I=E2=80=99d suggest that you go ahead with = this > > > > plan. > > I agree that 2b is the most sensible option in our current situation. As a developer and new-ish Guix user (and not someone familiar with rust), = I am also in favor of 2b. Dealing with 200+ dependencies takes time, and co= re-updates-frozen has been on the cusp of merging for some time now. I'd like to see c-u-f merged back into master sooner, as master lacks suppo= rt for newer hardware while also getting regular package updates that are o= nly periodically merged to core-updates-frozen. Even before the c-u-f sprin= t last month where I switched all of my systems to c-u-f, I had one system = that was first a frankensteined master before finally managing to switch it= to c-u-f, to pick up a newer mesa that wasn't unusably buggy on a Radeon R= X 6700 XT. Cheers, Kaelyn P.S. Regarding switching my systems, the only issue I've run into that hasn= 't been fixed is that tigervnc only recently added support for building aga= inst xorg-server 21.1.1, and the current tigervnc release (1.12.0) was rele= ased before that support landed. (I have a standalone package definition fo= r building a recent git commit.) > > ------------------------------------------------------------------------ > > Ricardo From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 12 08:21:05 2021 Received: (at 51845-done) by debbugs.gnu.org; 12 Dec 2021 13:21:05 +0000 Received: from localhost ([127.0.0.1]:50932 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mwOmn-000468-7e for submit@debbugs.gnu.org; Sun, 12 Dec 2021 08:21:05 -0500 Received: from flashner.co.il ([178.62.234.194]:54016) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mwOmm-00045L-AL for 51845-done@debbugs.gnu.org; Sun, 12 Dec 2021 08:21:04 -0500 Received: from localhost (unknown [94.230.83.253]) by flashner.co.il (Postfix) with ESMTPSA id 0D3DD40277; Sun, 12 Dec 2021 13:20:57 +0000 (UTC) Date: Sun, 12 Dec 2021 15:20:25 +0200 From: Efraim Flashner To: Ricardo Wurmus Subject: Re: [bug#51845] [CORE-UPDATES] librsvg and rust Message-ID: Mail-Followup-To: Ricardo Wurmus , Ludovic =?utf-8?Q?Court=C3=A8s?= , guix-devel@gnu.org, 51845-done@debbugs.gnu.org, Liliana Marie Prikler References: <87tufjgooo.fsf@gnu.org> <87r1antb7w.fsf@elephly.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="TtW3LJTJLY6xF5YL" Content-Disposition: inline In-Reply-To: <87r1antb7w.fsf@elephly.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-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 51845-done Cc: guix-devel@gnu.org, Ludovic =?utf-8?Q?Court=C3=A8s?= , 51845-done@debbugs.gnu.org, Liliana Marie Prikler X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --TtW3LJTJLY6xF5YL Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 08, 2021 at 02:36:11PM +0000, Ricardo Wurmus wrote: >=20 > Ludovic Court=C3=A8s writes: >=20 > > Hello! > > > > For the record, this is a followup to Efraim=E2=80=99s proposal in > > . > > > > Efraim Flashner skribis: > > > >> Option 1: > >> Track down the ~220 crates which form the dependency graph (of crates) > >> for librsvg and pin them until the next core-updates cycle. Continue > >> like with other packages and add newer versions (like cmake or meson) = as > >> packages need them.=C2=B9 > > > > The advantage of this approach is that we could do it incrementally: we > > could merge =E2=80=98core-updates-frozen=E2=80=99 today and just add pi= nned variants of > > these 200+ crates as needed as time passes. The downside is that it=E2= =80=99s a > > lot of crates to take care of, and we might still accidentally overlook > > seemingly innocuous crate upgrades that end up causing major rebuilds. > > > >> Option 2: > >> Use the bundled crates and treat it as just part of the librsvg source > >> code.=C2=B2 > >> > >> Option 2b: > >> Use the bundled crates for now to finish with core-updates-frozen and > >> revisit this immediately on core-updates (not frozen). > > > > This option will involved a rebuild on x86_64, but the advantage is that > > we=E2=80=99ll be safe going forward: we won=E2=80=99t accidentally caus= e world rebuilds > > just because an obscure crate somewhere has been upgraded. > > > > [...] > > > >> I'm currently leaning option 2b, it'll get us past this hurdle for > >> core-updates-frozen and let us make changes to the crates as we work to > >> integrate them more fully into Guix. > > > > Same here; it=E2=80=99s not ideal, but it seems like the most reasonable > > short-term option. > > > > If there are no objections, I=E2=80=99d suggest that you go ahead with = this > > plan. >=20 > I agree that 2b is the most sensible option in our current situation. Patches pushed to core-updates-frozen. I added a TODO to fix the situation. Thanks for the input everyone. --=20 Efraim Flashner =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 --TtW3LJTJLY6xF5YL Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmG19xkACgkQQarn3Mo9 g1F0chAAqda7uUzc2xvk9q9xPOzlmkzfF6ENpH2bhJu2rkppBmgCVsVPoBSyTxQv LEJ8WCpMjo9h8V50+VYT/XeA1MdpnGGZwZjIV8rX4of8otupp1qBGiK3MlLORSam MgfF5NPkhI7Z8m8644JllD8Mb0V9i4gIjIa424ZnFNo5WoRw52RgKbQkzr9uuZPK t68uS5w9CVrEQnhVL78/x5KQAK0oCRE2bVTv9ETNtpD06iqkKvvsu/Jq4VaN/PWP q2Rqe17wlQFk6TXCR0fAjZqZMDkLKkoycTOrzXGJ16eoCG8DcIb0GlF67fQRpO1+ JzAZwcMkQ18peuG/MUDs0zmEHDfTtbASDILBnMQmwDcPZZyysWVOltXxyrVrvZh9 c1TtdeYT2XiYtV1oK6Rm93jiigVbZG4lHzPak5C1/f0v3Y+GTMx8vQWfUfzNSQzV yuSrfEpbG9Qf2YnxunNDAVNQQ3P4H8jsDsq0VwNqzlEILXrSaumtTNMjFkzWDkr1 seC0PZjdlUDKD0RMXfbuM15Gc/xweonxM/+BHQjJTsrVl7uqnRRw9xxfwv0meZDJ 7fmx09YQVYnfL2TI6XKLYhlu8NpbBMOuNgtYCDBm96/CPq9ycbl5Ly7BpQP3/cek lYnoGTwmXxSNiq7ts7da4MJaBHV4nc9li+RMHItR0NEwq6g/03E= =dLbl -----END PGP SIGNATURE----- --TtW3LJTJLY6xF5YL-- From unknown Tue Aug 19 07:25:59 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 10 Jan 2022 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator