From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 01 19:19:33 2022 Received: (at 54509) by debbugs.gnu.org; 1 Jul 2022 23:19:33 +0000 Received: from localhost ([127.0.0.1]:39342 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o7PvB-00028K-Dt for submit@debbugs.gnu.org; Fri, 01 Jul 2022 19:19:33 -0400 Received: from mout01.posteo.de ([185.67.36.65]:38173) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o7Pv8-000285-9r for 54509@debbugs.gnu.org; Fri, 01 Jul 2022 19:19:32 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 1EC09240026 for <54509@debbugs.gnu.org>; Sat, 2 Jul 2022 01:19:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1656717564; bh=qwYDDr3JTGMmH29YRpjV+yqxNUanucgX8PLGVx91ucs=; h=From:To:Cc:Subject:Date:From; b=Ju7OelmVODrtRDj59ESfAMANKmoqG9733OZXe3iCgclwA0rslx34QVJUozCqgMQT3 g9jMyywDwW4iR5nqYOHdlyEEaZQJUd3deLKfl2/BXaUtmXqEHpRYJX0b53DX9ml2bQ oCNW8Bb0KCHJBw7NJGktRoy2Q+SUmOD55Ush3uf5qWByvSxxujYogUy9/LJzmj46/R 86zqrL7NnPLsA/Y9kN2kRC25/aUm6J1vq4ph9HnMT7UnrLLlXNuVfu6/wmBAIvPjSO /194cJt3Sb0GKLTe3kfE6StLzZqAHvOp+49pB2e+7C2x6mXW3h6J9BSPwoMgvb78AU 6umKo7H3scJig== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4LZWP653fBz9rxG; Sat, 2 Jul 2022 01:19:22 +0200 (CEST) References: <87bkub5b4l.fsf@posteo.de> From: Mekeor Melire To: Maxime Devos Subject: Re: [bug#54509] bump: make rust-cargo understand rust-edition2021 which rustc already does Date: Fri, 01 Jul 2022 21:48:43 +0000 In-reply-to: Message-ID: <87sfnk4e3j.fsf@posteo.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54509 Cc: 54509@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 (---) 2022-06-30 / 10:10 / maximedevos@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.