GNU bug report logs - #54509
rust-cargo: Update to 0.60.0 to support Edition2021 projects

Previous Next

Package: guix-patches;

Reported by: Paul Alesius <paul <at> unnservice.com>

Date: Mon, 21 Mar 2022 17:48:02 UTC

Severity: normal

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 54509 in the body.
You can then email your comments to 54509 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#54509; Package guix-patches. (Mon, 21 Mar 2022 17:48:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Paul Alesius <paul <at> unnservice.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 21 Mar 2022 17:48:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Paul Alesius <paul <at> unnservice.com>
To: guix-patches <at> gnu.org
Subject: rust-cargo: Update to 0.60.0 to support Edition2021 projects
Date: Mon, 21 Mar 2022 18:46:41 +0100
[Message part 1 (text/plain, inline)]
The current rust-cargo version is 0.53.0, this supports rust
edition2018 projects.

To install the latest cargo from crates.io using the existing version
(cargo install cargo), it will fail because the latest version is an
"edition2021" rust-cargo project.

-- log
Caused by:
  failed to parse manifest at `/xyz/cargo-0.59.0/Cargo.toml`
Caused by:
  feature `edition2021` is required
--

This patch updates rust-cargo and its dependencies to support the the
latest rust edition2021, and edition2021 cargo projects.

With regards,
- Paul
[rust-cargo-0.60.0.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#54509; Package guix-patches. (Mon, 21 Mar 2022 18:47:02 GMT) Full text and rfc822 format available.

Message #8 received at 54509 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Paul Alesius <paul <at> unnservice.com>, 54509 <at> debbugs.gnu.org
Subject: Re: [bug#54509] rust-cargo: Update to 0.60.0 to support Edition2021
 projects
Date: Mon, 21 Mar 2022 19:46:01 +0100
[Message part 1 (text/plain, inline)]
Paul Alesius schreef op ma 21-03-2022 om 18:46 [+0100]:
> +(define-public rust-rustfix-0.6
> +  (package
> +    (name "rust-rustfix")

rustfix is already packaged in Guix.

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#54509; Package guix-patches. (Mon, 21 Mar 2022 21:01:02 GMT) Full text and rfc822 format available.

Message #11 received at 54509 <at> debbugs.gnu.org (full text, mbox):

From: Paul Alesius <paul <at> unnservice.com>
To: Maxime Devos <maximedevos <at> telenet.be>, 54509 <at> debbugs.gnu.org
Subject: Re: [bug#54509] rust-cargo: Update to 0.60.0 to support Edition2021
 projects
Date: Mon, 21 Mar 2022 21:59:30 +0100
[Message part 1 (text/plain, inline)]
Updated patch.

On Mon, 21 Mar 2022 at 19:46, Maxime Devos <maximedevos <at> telenet.be> wrote:
>
> Paul Alesius schreef op ma 21-03-2022 om 18:46 [+0100]:
> > +(define-public rust-rustfix-0.6
> > +  (package
> > +    (name "rust-rustfix")
>
> rustfix is already packaged in Guix.
>
> Greetings,
> Maxime.
[rust-cargo-0.60.0.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#54509; Package guix-patches. (Wed, 29 Jun 2022 23:02:02 GMT) Full text and rfc822 format available.

Message #14 received at 54509 <at> debbugs.gnu.org (full text, mbox):

From: Mekeor Melire <mekeor <at> posteo.de>
To: 54509 <at> debbugs.gnu.org
Subject: bump: make rust-cargo understand rust-edition2021 which rustc
 already does
Date: Wed, 29 Jun 2022 22:57:23 +0000
the rust-compiler which is packaged for guix supports edition2021. but
the cargo version packaged for guix does not. that's a pity! because it
makes the cargo version packaged for guix pretty unusable as most
projects already use edition2021. can we please merge this patch so that
cargo is usable for recent rust-projects?




Information forwarded to guix-patches <at> gnu.org:
bug#54509; Package guix-patches. (Thu, 30 Jun 2022 08:11:02 GMT) Full text and rfc822 format available.

Message #17 received at 54509 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Mekeor Melire <mekeor <at> posteo.de>, 54509 <at> debbugs.gnu.org
Subject: Re: [bug#54509] bump: make rust-cargo understand rust-edition2021
 which rustc already does
Date: Thu, 30 Jun 2022 10:10:05 +0200
[Message part 1 (text/plain, inline)]
Mekeor Melire schreef op wo 29-06-2022 om 22:57 [+0000]:
> the rust-compiler which is packaged for guix supports edition2021
> but the cargo version packaged for guix does not

Pretty sure that it does, IIRC under antioxidant-build-system I've seen
some things being compiled with the 2021 edition of rust, presumably
they also compiled under cargo-build-system.

Also, rust-cargo does not have the cargo binary (but a cargo library!),
you may be looking for the 'cargo' output of the 'rust' package
instead.

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#54509; Package guix-patches. (Fri, 01 Jul 2022 23:20:02 GMT) Full text and rfc822 format available.

Message #20 received at 54509 <at> debbugs.gnu.org (full text, mbox):

From: Mekeor Melire <mekeor <at> posteo.de>
To: Maxime Devos <maximedevos <at> telenet.be>
Cc: 54509 <at> debbugs.gnu.org
Subject: Re: [bug#54509] bump: make rust-cargo understand rust-edition2021
 which rustc already does
Date: Fri, 01 Jul 2022 21:48:43 +0000
2022-06-30 / 10:10 / maximedevos <at> telenet.be:

> Mekeor Melire schreef op wo 29-06-2022 om 22:57 [+0000]:

> > the rust-compiler which is packaged for guix supports edition2021
> > but the cargo version packaged for guix does not
>
> Pretty sure that it does, IIRC under antioxidant-build-system I've seen
> some things being compiled with the 2021 edition of rust, presumably
> they also compiled under cargo-build-system.

i tested this again. i'll describe the issue with some instructions:

    create a cargo project:

        $ cargo new foo
        $ cd foo

    use edition 2021 instead of 2018:

        $ sed -i 's/2018/2021/' Cargo.toml

    attempt to build and run. you'll observe an error:

        $ cargo run

        > error: failed to parse manifest at `/home/user/foo/Cargo.toml`
        > Caused by:
        >   feature `edition2021` is required
        >   consider adding `cargo-features = ["edition2021"]` to the manifest

    specify the 2021-edition as a cargo-feature, as suggested by cargo.
    and try building and running again. it'll work fine:

        $ (echo 'cargo-features = ["edition2021"]' && cat Cargo.toml) | \
          sponge Cargo.toml
        $ cargo run

        > [...]
        > Hello world!

    but now, let's add a package as dependency - a package which uses
    edition2021. and then, try to build and run:

        $ echo 'axum = "0.5.4"' >> Cargo.toml
        $ cargo run

        > error: failed to download `axum-core v0.2.6`
        > Caused by:
        >   unable to get packages from source
        > Caused by:
        >   failed to parse manifest at
        >   `/home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/axum-core-0.2.6/Cargo.toml`
        > Caused by:
        >   feature `edition2021` is required
        >   consider adding `cargo-features = ["edition2021"]` to the manifest

TLDR: you can't build projects which depend on packages which depend on
edition2021.

> Also, rust-cargo does not have the cargo binary (but a cargo library!),
> you may be looking for the 'cargo' output of the 'rust' package
> instead.
>
> Greetings,
> Maxime.




Information forwarded to guix-patches <at> gnu.org:
bug#54509; Package guix-patches. (Sat, 02 Jul 2022 11:28:01 GMT) Full text and rfc822 format available.

Message #23 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: guix-patches <at> gnu.org, Mekeor Melire <mekeor <at> posteo.de>,
 Maxime Devos <maximedevos <at> telenet.be>
Cc: 54509 <at> debbugs.gnu.org
Subject: Re: [bug#54509] bump: make rust-cargo understand rust-edition2021 which rustc already does
Date: Sat, 02 Jul 2022 11:27:09 +0000
Hi, 

λ cargo new foo
     Created binary (application) `foo` package
λ cd foo
λ cargo run
λ sed -i 's/2018/2021/' Cargo.toml
λ cargo run
   Compiling foo v0.1.0 (/home/nckx/c/foo)
    Finished dev [unoptimized + debuginfo] target(s) in 1.11s
     Running `target/debug/foo`
Hello, world!
λ echo 'axum = "0.5.4"' >> Cargo.toml
λ cargo run
[...]
Downloaded httpdate v1.0.2
   Compiling foo v0.1.0 (/home/nckx/c/foo)
    Finished dev [unoptimized + debuginfo] target(s) in 54.46s
     Running `target/debug/foo`
Hello, world!

Did you read the entirety of Maxime's reply?  How are you controlling your environment?

Kind regards,

T G-R

Sent on the go.  Excuse or enjoy my brevity.




Information forwarded to guix-patches <at> gnu.org:
bug#54509; Package guix-patches. (Sat, 02 Jul 2022 11:28:01 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#54509; Package guix-patches. (Sat, 02 Jul 2022 11:36:02 GMT) Full text and rfc822 format available.

Message #29 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: guix-patches <at> gnu.org, Mekeor Melire <mekeor <at> posteo.de>,
 Maxime Devos <maximedevos <at> telenet.be>
Cc: 54509 <at> debbugs.gnu.org
Subject: Re: [bug#54509] bump: make rust-cargo understand rust-edition2021 which rustc already does
Date: Sat, 02 Jul 2022 11:35:05 +0000
Could you be using a recent rust with an older rust:cargo installed in an 'underlying' profile (e.g., your system profile), for example?

Kind regards,

T G-R

Sent on the go.  Excuse or enjoy my brevity.




Information forwarded to guix-patches <at> gnu.org:
bug#54509; Package guix-patches. (Sat, 02 Jul 2022 11:36:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#54509; Package guix-patches. (Wed, 06 Jul 2022 14:14:01 GMT) Full text and rfc822 format available.

Message #35 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Mekeor Melire <mekeor <at> posteo.de>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: 54509 <at> debbugs.gnu.org, Maxime Devos <maximedevos <at> telenet.be>,
 guix-patches <at> gnu.org
Subject: Re: [bug#54509] bump: make rust-cargo understand rust-edition2021
 which rustc already does
Date: Wed, 06 Jul 2022 14:06:52 +0000
thank you both. and sorry for falsly bumping the ticket!

i think i was missing the rust:cargo package/output. i solved my issue
with the following steps, but i'm not sure which steps were essential:

$ rm -rf ~/.cargo
$ guix package -r rust rust-cargo
$ unset RUSTC_BOOTSTRAP
$ guix package -i rust:out rust:cargo

kind regards
mekeor



2022-07-02 / 11:35 / me <at> tobias.gr:

> Could you be using a recent rust with an older rust:cargo installed in
> an 'underlying' profile (e.g., your system profile), for example?
>
> Kind regards,
> T G-R




Information forwarded to guix-patches <at> gnu.org:
bug#54509; Package guix-patches. (Wed, 06 Jul 2022 14:14:02 GMT) Full text and rfc822 format available.

Reply sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
You have taken responsibility. (Thu, 09 Feb 2023 13:20:01 GMT) Full text and rfc822 format available.

Notification sent to Paul Alesius <paul <at> unnservice.com>:
bug acknowledged by developer. (Thu, 09 Feb 2023 13:20:01 GMT) Full text and rfc822 format available.

Message #43 received at 54509-done <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Paul Alesius <paul <at> unnservice.com>
Cc: 54509-done <at> debbugs.gnu.org, Maxime Devos <maximedevos <at> telenet.be>
Subject: Re: bug#54509: rust-cargo: Update to 0.60.0 to support Edition2021
 projects
Date: Thu, 09 Feb 2023 08:18:52 -0500
Hello,

I've split this in one commit per package where feasible, and updated
rust-cargo-c to 0.9.8+cargo-0.60.

Closing!

-- 
Thanks,
Maxim




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 10 Mar 2023 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 38 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.