Message ID | 0dacb7cb72945f7f6886602c47111661b746cbcc.1658440640.git.jnewsome@torproject.org |
---|---|
State | New |
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id D9B8527BBEB; Thu, 21 Jul 2022 23:21:13 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 31B0127BBEA for <patchwork@mira.cbaines.net>; Thu, 21 Jul 2022 23:21:12 +0100 (BST) Received: from localhost ([::1]:48176 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org>) id 1oEeXf-0000vW-Be for patchwork@mira.cbaines.net; Thu, 21 Jul 2022 18:21:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35756) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1oEeLu-0007bf-5O for guix-patches@gnu.org; Thu, 21 Jul 2022 18:09:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49620) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1oEeLt-00021f-TP for guix-patches@gnu.org; Thu, 21 Jul 2022 18:09:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1oEeLt-000587-P3 for guix-patches@gnu.org; Thu, 21 Jul 2022 18:09:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56684] [PATCH 1/3] Bump rust 1.57 -> 1.58 Resent-From: Jim Newsome <jim@jimnewsome.net> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 21 Jul 2022 22:09:01 +0000 Resent-Message-ID: <handler.56684.B.165844130719657@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56684 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56684@debbugs.gnu.org Cc: Jim Newsome <jnewsome@torproject.org> X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.165844130719657 (code B ref -1); Thu, 21 Jul 2022 22:09:01 +0000 Received: (at submit) by debbugs.gnu.org; 21 Jul 2022 22:08:27 +0000 Received: from localhost ([127.0.0.1]:39363 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1oEeLL-00056y-Aj for submit@debbugs.gnu.org; Thu, 21 Jul 2022 18:08:27 -0400 Received: from lists.gnu.org ([209.51.188.17]:33712) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <jim@jimnewsome.net>) id 1oEeFI-0004xh-C4 for submit@debbugs.gnu.org; Thu, 21 Jul 2022 18:02:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34318) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <jim@jimnewsome.net>) id 1oEeFH-00065Y-Ra for guix-patches@gnu.org; Thu, 21 Jul 2022 18:02:12 -0400 Received: from new4-smtp.messagingengine.com ([66.111.4.230]:36837) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <jim@jimnewsome.net>) id 1oEeFF-0001E2-JX for guix-patches@gnu.org; Thu, 21 Jul 2022 18:02:11 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id A3405581298; Thu, 21 Jul 2022 18:02:07 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 21 Jul 2022 18:02:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jimnewsome.net; h=cc:cc:content-transfer-encoding:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to; s=fm1; t=1658440927; x=1658444527; bh=dRFV1bz11Q 8/Xwli9Ccbw9p7T3VmYM9L8qh5ak7KWds=; b=HthtUZuE4lbS0NYnxupNoPIdqg /1WX4hobAfhKo8DRy1N0jwVM0Hjy4ztxA6UqaBdN2ZkhZhXPRiPaZTASJl86qy+r V5Hs9Wbb1omfNHxJ+qjHVmO8kGBWIJjqZBF6rDHNiGY6goXxU0+78j4lEmxpPYBe HPV6mIohTZ7vlqfp4ChTI2VMCAQEmBaXtN1UpkPR7eM02+zyNl/A9U0WCb5cKmDD pzuHhTQsz8oY8zNej0uAVekEtGNbYQwwHM9zBSpSwPCG2zjfIVz8zKwOhKbLgCkF 7HF6g0/ldvoTx5osw74VsbJQpeFiWehnQLu7qc4LiDwFexWwNx4mxj18r32w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=ib1a94636.fm3; t=1658440927; x=1658444527; bh=dRFV1bz11Q8/Xwli9Ccbw9p7T3VmYM9L 8qh5ak7KWds=; b=b1ZWKdidIz71jFNRJS5w3Pm+306IUvJAdSUFurPlB8Lr5u6Z lJ8bRy8bn9c+On7vWmV3K+TCQGDdwo7aw4Ul5tmXtAxEq5jDI6hSqAaiwWm8dFdB aCNW5XIjgmWEC0ghW8NuBlInSso0bxJYS83YtDt1aesCdnvvC2VorAhI/eoJSeOD RnCJ4dfP5wqhYw+6jEoDG3/ZWDBy8GDxYHLAFAHPiO3ENOEZsVznzHqDMeAwZv/H 0K/Ys1lW5DQW74aFWFAyTMCuWYr9xlB/3oyYef6uLdayV50kBHaFQ6LSN8bBql+J ZZCSp4Fghjzn+eOTan94uyb78UbbNzydl1S5uw== X-ME-Sender: <xms:38zZYnu6ot2RhiwATbT7sHEkIzeTFVd0Lm7FeyuofTU0CvE7BA1N1g> <xme:38zZYocELm0me5LH6FSl4_utMkhfNTFWY82I1XShM3jlSsmoAm9ykprsMI-Ls68y8 bbSlvEApCxBvQMHI3s> X-ME-Received: <xmr:38zZYqyPfQrFBFtvx2oGJ7Nojsgybr4WZQ575utqSyt2QDFSnHIaTUqoYBUWBpeO8j1YUlvZs2XWuF3aVvCnDjY7e5iB9bCfE52s3Ov5R_tveJB6Vwcv9FBZeEzLPr1jGw> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvddtuddgtdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffoggfgsedtkeertd ertddtnecuhfhrohhmpeflihhmucfpvgifshhomhgvuceojhhimhesjhhimhhnvgifshho mhgvrdhnvghtqeenucggtffrrghtthgvrhhnpedvteffueffieegieduheekheekhfffud eihfdtvdfgtdfghfeuffevleetiedukeenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpehjihhmsehjihhmnhgvfihsohhmvgdrnhgvth X-ME-Proxy: <xmx:38zZYmMg_iUXMF3_VEUjPSksZYN6RKOyTYvd7AR7bI5NNJAEeeXVXg> <xmx:38zZYn-A1G86h5dhfJsXq5ZScc3AzUHLYwvrlX0McVvucD0Ss4xyZg> <xmx:38zZYmVs56C-i0_jb3lT3kZnSlURbAvOktSzOOCT7CoDxpVLcMmzbQ> <xmx:38zZYkF2lBYkCk69Bg82TS2zuE86l13y4GoKvZ9eIUPcgtecDPAyAA> Feedback-ID: ib1a94636:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 21 Jul 2022 18:02:07 -0400 (EDT) From: Jim Newsome <jim@jimnewsome.net> Date: Thu, 21 Jul 2022 17:01:40 -0500 Message-Id: <0dacb7cb72945f7f6886602c47111661b746cbcc.1658440640.git.jnewsome@torproject.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=66.111.4.230; envelope-from=jim@jimnewsome.net; helo=new4-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 21 Jul 2022 18:08:25 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Thu, 21 Jul 2022 18:20:56 -0400 X-BeenThere: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-getmail-retrieved-from-mailbox: Patches |
Series |
[bug#56684,1/3] Bump rust 1.57 -> 1.58
|
|
Commit Message
Jim Newsome
July 21, 2022, 10:01 p.m. UTC
From: Jim Newsome <jnewsome@torproject.org>
---
gnu/packages/rust.scm | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
base-commit: 5dfc6ab1ab292b87ceea144aa661d0e64c834031
Comments
Sorry, forgot to change the initial subject line to [PATCH core-updates]. Happy to follow on to bump further; the latest release is 1.62.1: https://github.com/rust-lang/rust/releases 1.60 was the minimum I needed for my own project and since this is my first try contributing to guix I figured I'd try getting that in before bumping further. Each bump takes a while since I need to build one minor version at a time.
merge 54439 56684 thanks You aren't bumping the version but adding a new version of the Rust package, the old one is still there. Also, conventionally it is named updating in Guix, and a commit message is missing. For examples see the git history. Are all the intermediate steps needed, or could you reduce the number of new intermediate packages? E.g., you could try going directly from 1.57 to 1.60 without intermediate steps. If that's possible, it would be less inefficient to compile. Also, there are already patches for updating rust, see <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=54439>. Please look for already existing patches before posting duplicates, to avoid double work, etc. Greetings, Maxime.
On 7/21/22 19:08, Maxime Devos wrote: > You aren't bumping the version but adding a new version of the Rust > package, the old one is still there. Also, conventionally it is named > updating in Guix, and a commit message is missing. For examples see the > git history. Thanks, got it. > Are all the intermediate steps needed, or could you reduce the number of > new intermediate packages? > > E.g., you could try going directly from 1.57 to 1.60 without > intermediate steps. If that's possible, it would be less inefficient to > compile. Good question. I assumed that each version was only compilable from the previous version based on that being how the java compiler works, and looking at the chain that's already here. From a quick look I don't see any documented policy to that effect, though, so maybe it's worth a try. > Also, there are already patches for updating rust, see > <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=54439>. Please look for > already existing patches before posting duplicates, to avoid double > work, etc. Oops! It looks like that is both a bit further along and more ambitious than my version. It's also been lingering for a while, while guix's version of Rust falls further behind, making me wonder if it's worth trying to move things up with something closer to my naive approach in the meantime. Still, I'll take a closer look at that and see if there's anything I can do to help that one along. Thank you for the quick feedback! -Jim
On 7/21/22 19:08, Maxime Devos wrote: > E.g., you could try going directly from 1.57 to 1.60 without > intermediate steps. If that's possible, it would be less inefficient to > compile. I dug into this a bit. The Rust bootstrapping docs say to use x.py to download the stage0 compiler. https://rustc-dev-guide.rust-lang.org/building/bootstrapping.html x.py is a thin wrapper around bootstrap.py: https://github.com/rust-lang/rust/blob/master/x.py bootstrap.py decides what compiler to use as stage0 from stage0.json: https://github.com/rust-lang/rust/blob/master/src/bootstrap/bootstrap.py 1.62.1 was compiled with 1.61.0: https://github.com/rust-lang/rust/blob/1.62.1/src/stage0.json#L6 1.61.0 was compiled with 1.60.0: https://github.com/rust-lang/rust/blob/1.61.0/src/stage0.json#L6 1.60.0 was compiled with 1.59.0: https://github.com/rust-lang/rust/blob/1.60.0/src/stage0.json#L6 1.59.0 was compiled with 1.58.0: https://github.com/rust-lang/rust/blob/1.59.0/src/stage0.json#L6 1.58.0 was compiled with 1.57.0: https://github.com/rust-lang/rust/blob/1.58.0/src/stage0.json#L6 So it looks like each release was compiled with a compiler from one feature-release back. In my patchset, I took the highest patch-version at each feature-version, since I don't think it makes sense to include outdated patch-levels, and it should be safe. Trying to compile a release with an older compiler than it was originally compiled with seems unlikely to go well. It's not explicitly stated that it *won't* work, but it seems unlikely that it would, and would take a lot of time to verify by trial and error.
On 22-07-2022 03:33, Jim Newsome wrote: > Trying to compile a release with an older compiler than it was > originally compiled with seems unlikely to go well. It usually works fine for GCC. For Rust, it's a bit less likely given the rate at which APIs etc are added, but it's possible that once in a while a version can be skipped. Yes, the upstream docs say that X+1 is compiled with X, but this is Guix not upstream and upstream doesn't seem to care about bootstrapping much, I do not recommend just following the method from the docs as a rule or even a recommendation. (Basically the is-ought problem in another context.) > It's not explicitly stated that it *won't* work, but it seems unlikely > that it would, and would take a lot of time to verify by trial and error. ? All you need to do is, say, remove 1.58 and bootstrap 1.59 directly from 1.57 and see if that compiles and then also give current version in guix -> 1.59 a try, etc, if not try 1.57 -> 1.59.. I don't see much trial and error here, there are only a few possible combinations. Yes, it will take some time to compile (rust is big), but this only needs to be done once (or zero, the previous patch submitter tried out some combinations, those don't have to be done again) and all the potential compilation time savings will be shared to everyone, and while it is compiling you can still do other things. If it's too much for your computer if that's what you mean, I suppose it would be possible to set up a branch that tries out various combinations at ci.guix.gnu.org (it has lots of x86-64 machines). > Oops! It looks like that is both a bit further along and more > ambitious than my version. It's also been lingering for a while, while > guix's version of Rust falls further behind, making me wonder if it's > worth trying to move things up with something closer to my naive > approach in the meantime. If you mean ignoring the already existing patch and making a new one that does less, this does not incline me to review your patch and probably would be frustrating to the original patch submitter, causing your patch to linger too. What I meant is: if possible, go for the _original_ patch, improve it with parts of _your_ patch (taking the best of both) and submit that as a v2 or such, otherwise just go for the original patch and review or test it (e.g., verify it compiles reproducibly and share the hash (with "guix hash /gnu/store/the-store-item", not the hash in /gnu/store/HASH-...)). Summarised: double-work tends to cause more lingering, not less. Greetings, Maxime.
I tried and failed to bootstrap from 1.59 and 1.60 to 1.62.1 directly, the focus should be on getting Rust 1.61 to build. It's unlikely that skipping versions for bootstrapping will ever work, since the latest compiler uses nightly features which might not be present in lower versions [1]. But it's good to know that it's ok to skip versions if it does work. 1. https://rustc-dev-guide.rust-lang.org/building/bootstrapping.html
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index 67dc5cdaf3..dd0f15a95c 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -644,10 +644,14 @@ (define rust-1.56 rust-1.55 "1.56.1" "04cmqx7nn63hzz7z27b2b0dj2qx18rck9ifvip43s6dampx8v2f3")) (define rust-1.57 + (rust-bootstrapped-package + rust-1.56 "1.57.0" "06jw8ka2p3kls8p0gd4p0chhhb1ia1mlvj96zn78n7qvp71zjiim")) + +(define rust-1.58 (let ((base-rust (rust-bootstrapped-package - rust-1.56 "1.57.0" - "06jw8ka2p3kls8p0gd4p0chhhb1ia1mlvj96zn78n7qvp71zjiim"))) + rust-1.57 "1.58.1" + "1iq7kj16qfpkx8gvw50d8rf7glbm6s0pj2y1qkrz7mi56vfsyfd8"))) (package (inherit base-rust) (outputs (cons "rustfmt" (package-outputs base-rust))) @@ -790,7 +794,7 @@ (define rust-1.57 ;;; intermediate rusts are built for bootstrapping purposes and should not ;;; be relied upon. This is to ease maintenance and reduce the time ;;; required to build the full Rust bootstrap chain. -(define-public rust rust-1.57) +(define-public rust rust-1.58) (define-public rust-src (hidden-package