From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id EF5611581C1 for ; Sun, 7 Jul 2024 03:36:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5DC5D2BC05E; Sun, 7 Jul 2024 03:36:36 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B92B52BC01F for ; Sun, 7 Jul 2024 03:36:35 +0000 (UTC) Message-ID: Date: Sat, 6 Jul 2024 23:36:31 -0400 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [gentoo-dev] [PATCH] cargo.eclass: Add cargo_target_dir helper function To: gentoo-dev@lists.gentoo.org References: <20240613150530.24679-1-chewi@gentoo.org> <3596ff34-6a36-41e3-944d-ea11c1bfe737@gentoo.org> Content-Language: en-US From: Eli Schwartz Autocrypt: addr=eschwartz@gentoo.org; keydata= xjMEZmeRNBYJKwYBBAHaRw8BAQdAYNZ7pUDWhx1i2f3p6L2ZLu4FcY18UoeGC04Gq/khqwfN I0VsaSBTY2h3YXJ0eiA8ZXNjaHdhcnR6QGdlbnRvby5vcmc+wpYEExYKAD4WIQTvUdMIsc4j CIi+DYTqQj6ToWND8QUCZoRL+gIbAwUJBKKGAAULCQgHAwUVCgkICwUWAgMBAAIeBQIXgAAK CRDqQj6ToWND8aB5AP9r4kB691nNtNwKkdRiOdl7/k6WYzokvHvDamXxRJ0I+gEAjZqR5V8y mfR3fy2Z+r2Joeqdt3CIv5IwPs64spBvigLOOARmZ5E0EgorBgEEAZdVAQUBAQdATT46Z06b 1X9xjXFCYFxmq/Tj3tSEKZInDWTpoHQp4l8DAQgHwn4EGBYKACYWIQTvUdMIsc4jCIi+DYTq Qj6ToWND8QUCZmeRNAIbDAUJBKKGAAAKCRDqQj6ToWND8a2RAP40KPfbfoiZAJW5boFmFJ3G TUBDJRh9CWHyaPqq2PN+0wD/R07oLzfnJUN209mzi9TuTuHjeZybysyqXSw4MAxkMAY= In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------8syxMlu5Yx150ntCHKL0YTdM" X-Archives-Salt: d94101c7-5cf3-4b4b-8e72-fa4995bff794 X-Archives-Hash: f4821a7f62febee97f391fbbc9057f73 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------8syxMlu5Yx150ntCHKL0YTdM Content-Type: multipart/mixed; boundary="------------yNmsimlAKUnxlbAOYzvgdhC0"; protected-headers="v1" From: Eli Schwartz To: gentoo-dev@lists.gentoo.org Message-ID: Subject: Re: [gentoo-dev] [PATCH] cargo.eclass: Add cargo_target_dir helper function References: <20240613150530.24679-1-chewi@gentoo.org> <3596ff34-6a36-41e3-944d-ea11c1bfe737@gentoo.org> In-Reply-To: --------------yNmsimlAKUnxlbAOYzvgdhC0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 7/6/24 5:04 AM, Florian Schmaus wrote: > FYI, it turns out that at least clap-rs has support to generate the > completion files as part of the build process: >=20 > https://docs.rs/clap_complete/latest/clap_complete/generator/fn.generat= e_to.html >=20 > Maybe we could encourage projects to simply adjust their build.rs to > generate the completion files. This would avoid inconsistent (Gentoo) > package contents when cross compiling. Cargo is NOT a real build system, as partially evidenced by the fact that it does not possess an install system either. build.rs is an extremely crude hack around this and doesn't work well for that use case. The main consequence is that you have to manually find a checksummed build artifact, since that's all build.rs can create. It reduces the temptation of projects to support this at all, in favor of just providing an argument to generate it which they figure is the only thing people can practically use. So, you can try to convince upstreams to care, but I am cynical. ripgrep, which I suspect due to recent conversations is the reason you're mentioning this, *used* to do exactly what you suggest. Recent versions have moved on to rolling their own argument parser and manpage generator, which they then use to produce prebuilt binary packages via, well, running the compiled binary with --generate. I get the feeling they aren't worried about cross compiling. --=20 Eli Schwartz --------------yNmsimlAKUnxlbAOYzvgdhC0-- --------------8syxMlu5Yx150ntCHKL0YTdM Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature.asc" -----BEGIN PGP SIGNATURE----- wnsEABYIACMWIQTnFNnmK0TPZHnXm3qEp9ErcA0vVwUCZooNPwUDAAAAAAAKCRCEp9ErcA0vV+Wk AQCIXjVyWvF2fSqMbkP6fsbGb20baHgEmscs/9hG0uRNxQD/b85918diD4cgEyDjMBuhWHZRfm8c mbq7UbibIFyezA4= =iIPK -----END PGP SIGNATURE----- --------------8syxMlu5Yx150ntCHKL0YTdM--