Subject: Re: bug#62064: Why is only rust-1.60 exported when 1.65 is defined?

From: "(" <[email-masked]>
Date: Mon, 13 Mar 2023 21:11:26 +0000

Hi,

On Wed Mar 8, 2023 at 4:09 PM GMT, Jonas Møller via Bug reports for GNU Guix wrote:
> And then proceeds to define-public rust as rust-1.60, and I was wondering if there's any particular reason why a year-old version is used rather than the 1.65 version. This seems like a mistake, given that the comment claims that the "latest included Rust" should be made public.

There's another important reason:

  rust != rust-1.60

The packages are not one and the same, despite the former being derived from the
latter.  The RUST-1.X packages are not full Rust packages; they are cut down
intentionally (no tests, no non-essential tools) to reduce bootstrapping time,
which means we need to essentially revert those changes in the public RUST package
to get something that we can actually expose to users.

That's why the RUST variable isn't defined like this:

  (define-public rust rust-1.60)

It's defined like this:

  (define-public rust
    (package
      (inherit rust-1.60)
      ;; --8<-- a VERY extensive set of overrides to readd removed stuff --8<--
      …))

So to add a RUST-LATEST, we'd need to have another one of these monstrosities
(seriously, it's evil <https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/rust.scm#n663>)
but because it's mostly source code patches, we couldn't just make some kind of
MAKE-PUBLIC-RUST procedure, as a SUBSTITUTE* that works for 1.60 may not work
for 1.65...

    -- (