public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Eli Schwartz <eschwartz@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] [PATCH] cargo.eclass: Add cargo_target_dir helper function
Date: Sat, 6 Jul 2024 23:36:31 -0400	[thread overview]
Message-ID: <bc51f3a6-ebe8-41d1-952c-9c9450ff544b@gentoo.org> (raw)
In-Reply-To: <d550a5f7-3b4b-45c1-8303-b5568563dc34@gentoo.org>


[-- Attachment #1.1: Type: text/plain, Size: 1463 bytes --]

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:
> 
> https://docs.rs/clap_complete/latest/clap_complete/generator/fn.generate_to.html
> 
> 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.


-- 
Eli Schwartz


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

      reply	other threads:[~2024-07-07  3:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-13 15:03 [gentoo-dev] [PATCH] cargo.eclass: Add cargo_target_dir helper function James Le Cuirot
2024-06-13 21:32 ` Lucio Sauer
2024-06-14 13:54   ` James Le Cuirot
2024-06-15 20:02     ` Lucio Sauer
2024-06-15 13:59 ` [gentoo-dev] [PATCH v2] " James Le Cuirot
2024-06-15 18:14 ` [gentoo-dev] [PATCH] " Florian Schmaus
2024-06-15 21:56   ` Ionen Wolkens
2024-06-15 22:22     ` James Le Cuirot
2024-07-06  9:04       ` Florian Schmaus
2024-07-07  3:36         ` Eli Schwartz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bc51f3a6-ebe8-41d1-952c-9c9450ff544b@gentoo.org \
    --to=eschwartz@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox