diff mbox series

[bug#54439] Rust: Add Rust 1.59, set default to 1.59.

Message ID CAL8jUGUYE0skaxR2q5e=ayeC_7qyOfGsNhH=CoYrb2hSb9E7wg@mail.gmail.com
State Accepted
Headers show
Series [bug#54439] Rust: Add Rust 1.59, set default to 1.59. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/applying patch success View Laminar job
cbaines/git branch success View Git branch
cbaines/issue success View issue
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Paul Alesius March 18, 2022, 12:21 a.m. UTC
---
 gnu/packages/rust.scm | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

Comments

M March 18, 2022, 8:23 a.m. UTC | #1
Paul Alesius schreef op vr 18-03-2022 om 01:21 [+0100]:
> +         ((#:tests? _ #f)
> +          #t)

This is incorrect when cross-compiling, use
(->bool (not (%current-target-system)) instead.

Or simpler:

(substitute-keyword-arguments
  (strip-keyword-arguments '(#:tests?) (package-arguments base-rust)))

Also, I'm wondering, should #:tests? #t be removed from 1.57?
From rust.scm:

       ;; Only the final Rust is tested, not the intermediate bootstrap
ones,
       ;; for performance and simplicity.
       #:tests? #f
M March 18, 2022, 8:25 a.m. UTC | #2
Paul Alesius schreef op vr 18-03-2022 om 01:21 [+0100]:
> +(define rust-1.59
> +  (rust-bootstrapped-package
> +   rust-1.58 "1.59.0" "1yc5bwcbmbwyvpfq7zvra78l0r8y3lbv60kbr62fzz2vx2pfxj57"))

I'm wondering, does rust@1.59 need to be built against rust@1.58, or
could it be built against an earlier version rust@1.57?  I would prefer
the latter to avoid increasing the bootstrapping chain further.

Greetings,
Maxime.
M March 18, 2022, 8:25 a.m. UTC | #3
Paul Alesius schreef op vr 18-03-2022 om 01:21 [+0100]:
> +             ;; Remove as it doesn't exist in this distribution
> +             (delete 'skip-shebang-tests))))))))

I believe the conventional terminology is ‘this version’ or ‘this
release’, not ‘this distribution’.
M March 18, 2022, 8:26 a.m. UTC | #4
Paul Alesius schreef op vr 18-03-2022 om 01:21 [+0100]:
> -(define-public rust rust-1.57)
> +(define-public rust rust-1.59)

Due to the large number of dependents this probably needs to be done on
core-updates (unverified)
Paul Alesius March 18, 2022, 8:55 a.m. UTC | #5
Thank you for the input.

I was unable to build the latest version (1.59) without also building
the intermediate versions (1.58), hence why the package declarations
for 1.57 and 1.58 remained intact with testing as I was verifying that
they build.

You're right, the bootstrapping releases should be trimmed down. I am
very new to Guile so if anyone wants to modify the patch while I learn
the build system to create a new patch, that would be fine with me.

/With regards
- Paul

On Fri, 18 Mar 2022 at 09:23, Maxime Devos <maximedevos@telenet.be> wrote:
>
> Paul Alesius schreef op vr 18-03-2022 om 01:21 [+0100]:
> > +         ((#:tests? _ #f)
> > +          #t)
>
> This is incorrect when cross-compiling, use
> (->bool (not (%current-target-system)) instead.
>
> Or simpler:
>
> (substitute-keyword-arguments
>   (strip-keyword-arguments '(#:tests?) (package-arguments base-rust)))
>
> Also, I'm wondering, should #:tests? #t be removed from 1.57?
> From rust.scm:
>
>        ;; Only the final Rust is tested, not the intermediate bootstrap
> ones,
>        ;; for performance and simplicity.
>        #:tests? #f
>
M March 20, 2022, 1:58 p.m. UTC | #6
Paul Alesius schreef op vr 18-03-2022 om 01:21 [+0100]:
> +             ;; Remove as it doesn't exist in this distribution
> +             (delete 'skip-shebang-tests))))))))

Is this necessary?  This was not done in
<https://issues.guix.gnu.org/54475#0>.

Greetings,
Maxime.
Paul Alesius March 20, 2022, 3:36 p.m. UTC | #7
Nope, (delete 'skip-shebang-tests) didn't seem necessary, it must have been
something with my environment before.

The patch in <https://issues.guix.gnu.org/54475#0> builds and tests for me
too, seemingly without testing the bootstrapping rustc.

With regards,
- Paul

On Sun, 20 Mar 2022 at 14:58, Maxime Devos <maximedevos@telenet.be> wrote:
>
> Paul Alesius schreef op vr 18-03-2022 om 01:21 [+0100]:
> > +             ;; Remove as it doesn't exist in this distribution
> > +             (delete 'skip-shebang-tests))))))))
>
> Is this necessary?  This was not done in
> <https://issues.guix.gnu.org/54475#0>.
>
> Greetings,
> Maxime.
vasilii.smirnov--- via Guix-patches" via March 21, 2022, 3:31 a.m. UTC | #8
Is it safe to update mrustc at the same time as the rust version bump? So we can bootstrap from rust 1.54 to 1.59. Sorry, I don't have the time and hardware to help out more.
vasilii.smirnov--- via Guix-patches" via April 11, 2022, 8:04 p.m. UTC | #9
Reminder that Rust 1.60 was released recently.
vasilii.smirnov--- via Guix-patches" via May 20, 2022, 2:39 a.m. UTC | #10
Rust 1.61.0 is out
kiasoc5 June 30, 2022, 6:57 p.m. UTC | #11
Rust 1.62.0 released today
Tobias Geerinckx-Rice June 30, 2022, 8:17 p.m. UTC | #12
Hi kiasoc5,

kiasoc5 wrote on 11 Apr 22:04 +0200
> Reminder that Rust 1.60 was released recently.

kiasoc5 wrote on 20 May 04:39 +0200
> Rust 1.61.0 is out

kiasoc5 wrote 60 minutes ago
> Rust 1.62.0 released today

If you'd opened or contributed to this issue, would you be motivated by 
such replies?  I wouldn't...

There must be a more effective way to help move things forward.

Regardless, Rust release announcements don't need to be cross-posted to 
the Guix bug trackers and all bug-guix@ subscribers.

Kind regards,

T G-R

Sent from a Web browser.  Excuse or enjoy my brevity.
kiasoc5 July 1, 2022, 1:11 a.m. UTC | #13
I'm sorry, I won't cross-post future updates. I can try the bump
myself, it's just that I feel like this is too much of a challenge for
me.

On Thu, Jun 30 2022, 10:17:03 PM +0200
Tobias Geerinckx-Rice <me@tobias.gr> wrote:

> Hi kiasoc5,
> 
> kiasoc5 wrote on 11 Apr 22:04 +0200
> > Reminder that Rust 1.60 was released recently.  
> 
> kiasoc5 wrote on 20 May 04:39 +0200
> > Rust 1.61.0 is out  
> 
> kiasoc5 wrote 60 minutes ago
> > Rust 1.62.0 released today  
> 
> If you'd opened or contributed to this issue, would you be motivated
> by such replies?  I wouldn't...
> 
> There must be a more effective way to help move things forward.
>
> Regardless, Rust release announcements don't need to be cross-posted
> to the Guix bug trackers and all bug-guix@ subscribers.
> 
> Kind regards,
> 
> T G-R
> 
> Sent from a Web browser.  Excuse or enjoy my brevity.
\( July 1, 2022, 9:39 a.m. UTC | #14
On Fri Jul 1, 2022 at 2:11 AM BST, kiasoc5 via Guix-patches via wrote:
> I feel like this is too much of a challenge for me.
I updated Rust to 1.57 when I was new to Guix, it wasn't very hard at
all. The main problem was that the build took aaaaaaages. See commit
89afe76a164c53aef66e6f819137bd0c65089fe8.

    -- (
Jim Newsome Aug. 4, 2022, 1:47 a.m. UTC | #15
Hi, I'm new to this project and this code-review workflow, so please bear with me :).

It looks like there have been a few attempts here at updating Rust, including [Paul's], [Felipe's], and [my own].

[Paul's]: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=54439#5
[Felipe's]: https://issues.guix.gnu.org/54475#0
[my own]: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56684

There's some discussion in this thread about using an updated mrustc and using that to cut out some earlier steps of the bootstrap chain. I propose leaving that out for the moment. It seems both nontrivial and orthogonal, so IMO would make more sense as its own thread / patch-set, which could be reviewed and merged independently, before or after this one.

I think there's some confusion about where and how tests are enabled/disabled. IIUC in the current baseline, they are disabled in `rust-1.55`, which is the first version built with an earlier "official" rust:

```
       ;; Only the final Rust is tested, not the intermediate bootstrap ones,
       ;; for performance and simplicity.
       #:tests? #f
```

and subsequent versions inherit that via the `rust-bootstrapped-package` function.

The latest and public version (currently `rust-1.57`) re-enables most of the tests and fixes up some things so that the tests pass.

So I think the approach here when adding versions is to change the current latest (1.57) to the simpler form that keeps tests disabled, add any additional necessary steps, and have the test-reenabling code again in the latest version.

2 patches included:

* First is a pure refactor to decouple  "rust-1.57" from "rust" to help avoid confusion in the future.
* Second adds 1.58, 1.59, and 1.60, and makes rust-1.60 the new rust.

In the latter patch I also tried building each version with a Rust 2 versions back instead of just 1 version back, to see if any can be left out. Unfortunately they couldn't. I'm including some of the errors in the comments for reference.

-Jim
Marius Bakke Aug. 4, 2022, 11:03 a.m. UTC | #16
Jim Newsome <jim@jimnewsome.net> skriver:

> Hi, I'm new to this project and this code-review workflow, so please bear with me :).

Welcome!  You are doing great.  :-)

> It looks like there have been a few attempts here at updating Rust, including [Paul's], [Felipe's], and [my own].
>
> [Paul's]: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=54439#5
> [Felipe's]: https://issues.guix.gnu.org/54475#0
> [my own]: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56684

Indeed.  :-/

> There's some discussion in this thread about using an updated mrustc and using that to cut out some earlier steps of the bootstrap chain. I propose leaving that out for the moment. It seems both nontrivial and orthogonal, so IMO would make more sense as its own thread / patch-set, which could be reviewed and merged independently, before or after this one.

This has recently been done on the 'staging' branch courtesy of Efraim.

> I think there's some confusion about where and how tests are enabled/disabled. IIUC in the current baseline, they are disabled in `rust-1.55`, which is the first version built with an earlier "official" rust:
>
> ```
>        ;; Only the final Rust is tested, not the intermediate bootstrap ones,
>        ;; for performance and simplicity.
>        #:tests? #f
> ```
>
> and subsequent versions inherit that via the `rust-bootstrapped-package` function.
>
> The latest and public version (currently `rust-1.57`) re-enables most of the tests and fixes up some things so that the tests pass.
>
> So I think the approach here when adding versions is to change the current latest (1.57) to the simpler form that keeps tests disabled, add any additional necessary steps, and have the test-reenabling code again in the latest version.

That is my understanding too.

> 2 patches included:
>
> * First is a pure refactor to decouple  "rust-1.57" from "rust" to help avoid confusion in the future.
> * Second adds 1.58, 1.59, and 1.60, and makes rust-1.60 the new rust.
>
> In the latter patch I also tried building each version with a Rust 2 versions back instead of just 1 version back, to see if any can be left out. Unfortunately they couldn't. I'm including some of the errors in the comments for reference.

LGTM, I've pushed both patches to the 'staging' branch since Rust was
already patched there and it has not started evaluating yet.

Note: I also added a copyright line for you, hope that was okay.

Closing the issue, but feel free to continue the discussion.
Jim Newsome Aug. 4, 2022, 3:08 p.m. UTC | #17
On 8/4/22 06:03, Marius Bakke wrote:
> LGTM, I've pushed both patches to the 'staging' branch since Rust was
> already patched there and it has not started evaluating yet.
> 
> Note: I also added a copyright line for you, hope that was okay.

Great! Thanks, and let me know if any additional follow-up is needed!
diff mbox series

Patch

diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 26d6df7a94..3c5e913b97 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -784,11 +784,32 @@  (define rust-1.57
                             `("procps" ,procps)
                             (package-native-inputs base-rust))))))

+
+(define rust-1.58
+  (let ((base-rust
+         (rust-bootstrapped-package
+          rust-1.57 "1.58.0"
+          "0w6pdh87bd87xann6czz95z5bzlw58kbgii2jdmrjbiw5yik3m8a")))
+    (package
+      (inherit base-rust)
+      (arguments
+       (substitute-keyword-arguments (package-arguments base-rust)
+         ((#:tests? _ #f)
+          #t)
+         ((#:phases phases)
+          `(modify-phases ,phases
+             ;; Remove as it doesn't exist in this distribution
+             (delete 'skip-shebang-tests))))))))
+
+(define rust-1.59
+  (rust-bootstrapped-package
+   rust-1.58 "1.59.0" "1yc5bwcbmbwyvpfq7zvra78l0r8y3lbv60kbr62fzz2vx2pfxj57"))
+
 ;;; Note: Only the latest versions of Rust are supported and tested.  The
 ;;; 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.59)

 (define-public rust-src
   (hidden-package