From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id GFM6KPd26GSlJwEASxT56A (envelope-from ) for ; Fri, 25 Aug 2023 11:40:07 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id UN8vKPd26GRkRAEA9RJhRA (envelope-from ) for ; Fri, 25 Aug 2023 11:40:07 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6B45235115 for ; Fri, 25 Aug 2023 11:40:07 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=163.com header.s=s110527 header.b="TJ/y8+DS"; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=163.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1692956407; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=1OjQRpnal27u+fPvrs1OkWJd7TVy63PEL1GAzBFTrHE=; b=EaxyxWTjjRMmYjrxoL3rUs0Hsl0DNH0Cc2wY7Qp4g7iQOsI0OHOZEeACl2yJu5H3Rro7GJ VDOjjb43Kz4CRhuJcqLZ/YaOr0UQ2Y0uHgaxQMnINJFl70pQOs6NRCNk9D3EWHkefept1T Ba36GIUj5ZR7WAWEpbjF0waBwwiwLzfu0RIsqcXyRC1bVdbyyA32if6rteIJ97kZJAuAmb nDchCLRW4+fV/OVtThSZsfYlbfuLX5rghPEH9zXTwNEYTjMpzoGV9JlNPxkynGo1caystD uYKQnsKyufCFh/tVBrpfNNqRQ1YOGBFZ4K1Tt/1dOHBgaeAUxtc+y4lOwMaEBg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=163.com header.s=s110527 header.b="TJ/y8+DS"; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=163.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1692956407; a=rsa-sha256; cv=none; b=gdxNclhwjuL0TZLtjudYy6RiVG9BrfF6gpaCExi6Nnt6WQIZMQDo8YE11NT5AahZjkqlGM ldBTpg9D4AM5gbiImjsSnP1nKePKG6Qey54+owJTb7EAQBuDwFNuOe6cL66VbMvo/0+DUU TXiIlWwiQNB/aAGYqTa4X+3UYaJ4vLcwiwzF/4lzM53A6U2b+45GYjE+yf0wUITAnfPBy1 SCrgc2PZrmkGGeK6yvhykCFgzl+5Tt7hg6+j131GQLiKGybFZulx6F6VqwPhcw6UeWIRs1 Wv8PSrFXNpH8vyrJgAhdizFZq0qyQwi8NTS3mvzERF17opShyYJpBCyUhlYn3Q== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qZTI4-0005VG-7B; Fri, 25 Aug 2023 05:39:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qZTI2-0005TE-EU for guix-devel@gnu.org; Fri, 25 Aug 2023 05:39:38 -0400 Received: from m12.mail.163.com ([220.181.12.199]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qZTHy-0004aI-SZ for guix-devel@gnu.org; Fri, 25 Aug 2023 05:39:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version: Content-Type; bh=1OjQRpnal27u+fPvrs1OkWJd7TVy63PEL1GAzBFTrHE=; b=TJ/y8+DS3X+lOMaswxQwbmeUSQqQXI8dLKjW45h/EyhsZ2nyOVLrqKKETo9vDf gzzI4LcSaQS6lvEsWpw3zWVpo4lTtjuEVh0pE7oZo27qms119mmWb2jPHpOUk0nD +iTSkm0Qg8xNZTpaoTFNxKFmN7ScECJoHLohLNReXchGk= Received: from asus-laptop (unknown [218.18.128.155]) by zwqz-smtp-mta-g5-0 (Coremail) with SMTP id _____wDXLiLGduhks0I4AQ--.23911S2; Fri, 25 Aug 2023 17:39:18 +0800 (CST) References: <77a0c1d6-1a3d-473b-b86d-1ff17cefe9de@moller.systems> User-agent: mu4e 1.10.5; emacs 30.0.50 From: Zhu Zihao To: Jonas =?utf-8?Q?M=C3=B8ller?= Cc: guix-devel@gnu.org Subject: Re: Why does Guix duplicate dependency versions from Cargo.toml? Date: Fri, 25 Aug 2023 17:13:24 +0800 In-reply-to: <77a0c1d6-1a3d-473b-b86d-1ff17cefe9de@moller.systems> Message-ID: <86ttsn7970.fsf@163.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-CM-TRANSID: _____wDXLiLGduhks0I4AQ--.23911S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7tF1UAFy8CFykWF13uF47CFg_yoW8KrWrpr WUKrnxtrZ7tFy0kF1kC3WUWaya9rZ5t3y3G347Jr4UAa15WF9xtFZxtF45AFW7JryxW34Y qr12va1fAF90yaDanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jUwIDUUUUU= X-Originating-IP: [218.18.128.155] X-CM-SenderInfo: pdoosuxxwbztlvw6il2tof0z/xtbBZAfWr2I0UxgPIQAAsp Received-SPF: pass client-ip=220.181.12.199; envelope-from=all_but_last@163.com; helo=m12.mail.163.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_BL=0.001, RCVD_IN_MSPIKE_L4=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx2.migadu.com X-Migadu-Spam-Score: -6.59 X-Spam-Score: -6.59 X-Migadu-Queue-Id: 6B45235115 X-TUID: bKzV1peS7G2h --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Jonas M=C3=B8ller writes: > Hi Guix! Why does cargo-build-system need #:cargo-inputs specified in the= package definition? This seems like a big > mistake for a couple of reasons. Just like the nice people in mail list explained, when building a package, Guix builders are not allowed to connect to network, so the crates should be prefetched. and AFIAK, Maxime Devos is working on new build system called "Antioxidant", which can build rust application without cargo (Yes, invoke rustc directly!), The new build system will cache the rlib intermediate result of crate and share between different builds.=20 > 1 It is completely redundant, it should match what is in Cargo.toml. I kn= ow `guix import crate` exists to automate > this process, but I don't understand the rationale for duplicating > this information. Not only Guix do this, Debian also package Rust crates [1].=20 > 2 It is bad practice for Guix to override Cargo.lock if it exists, this m= eans that Guix is building a different binary to the > one the developers of the packaged Rust application are seeing on their = end, this is a much bigger problem.=20=20 OK, IMO almost all software packaged by Linux distro are "different" from upstream at binary level. A notable example is, software developer may prefeer to add bundled 3rd party dependencies to ease the build of package. But distro maintainers want to ensure every software use the library provided by distro[2]. And there maybe distro specific patches (Redhat backports security fixes to the old version of package for their RHEL) > This can and will cause spurious build failures, or bugs that are unknow= n to the developers of the Rust programs that > Guix packages. The Rust crate in Guix is used to package rust application, if user have problem with the rust application on Guix (e.g. ripgrep, fd, xxd, bat ...) They should report to Guix first, so it's Guix developer's responsibility to smooth out those differences.=20 If user want to develop a Rust crate/application, they can still use "cargo" command and fetch crates from crates.io registry. =20 [1]: https://packages.debian.org/sid/librust-bytecount-dev [2]: https://wiki.gentoo.org/wiki/Why_not_bundle_dependencies =2D-=20 Retrieve my PGP public key: gpg --recv-keys B3EBC086AB0EBC0F45E0B4D433DB374BCEE4D9DC Zihao --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIsEARYIADMWIQT4UAIrVkIEZilSHr2K2nJqP6LM8gUCZOh2sxUcYWxsX2J1dF9s YXN0QDE2My5jb20ACgkQitpyaj+izPJyVQD/U93g2NC8DFHm1NomzuGxf9E/Pxkr ED1nbmlFigMkYs4BAJpYjcBWJ9GV74+A6hzKO7OireuHpTf38R2KA4Muk0wF =1Csa -----END PGP SIGNATURE----- --=-=-=--