From: Sam James <sam@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] [PATCH 4/5] cargo.eclass: Support separating crate names/versions via slash
Date: Fri, 16 Jun 2023 19:06:45 +0100 [thread overview]
Message-ID: <874jn7cmcv.fsf@gentoo.org> (raw)
In-Reply-To: <700dda53aa77b7a27e800df55d19d86ad1902bef.camel@gentoo.org>
[-- Attachment #1: Type: text/plain, Size: 1029 bytes --]
Michał Górny <mgorny@gentoo.org> writes:
> On Fri, 2023-06-16 at 17:48 +0300, Denis Lisov wrote:
>> Hello Michał,
>>
>> On Fri, Jun 16, 2023 at 3:09 PM Michał Górny <mgorny@gentoo.org> wrote:
>> > Support specifying crate names and versions separated by forward slashes
>> > rather than hyphens. Since slashes are not valid in crate names, this
>> > makes splitting the tokens trivial and free of regular expressions.
>> > Effectively, the slash variant is roughly 180% faster:
>>
>> As a developer using Rust I want to note that Cargo has a concept of
>> "package ID specification"[1] that usually uses pkgname@version
>> syntax, but AFAIK there's no prior art for using pkgname/version in
>> the ecosystem. Could it make sense to use pkgname@version for
>> consistency?
>>
>
> I suppose so. The only reason I've used slash is because that could be
> used directly in URL.
I think we should do it (@ delimiter) - it looks more natural in a Rust/cargo context.
Thanks for the suggestion!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 377 bytes --]
next prev parent reply other threads:[~2023-06-16 18:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-16 12:01 [gentoo-dev] [PATCH 0/5] cargo.eclass: optimizations Michał Górny
2023-06-16 12:01 ` [gentoo-dev] [PATCH 1/5] eclass/tests: Add a minimal benchmark for cargo.eclass Michał Górny
2023-06-16 12:01 ` [gentoo-dev] [PATCH 2/5] cargo.eclass: Add variable alternative to $(cargo_crate_uris) Michał Górny
2023-06-16 12:01 ` [gentoo-dev] [PATCH 3/5] cargo.eclass: Optimize GIT_CRATES check Michał Górny
2023-06-16 12:01 ` [gentoo-dev] [PATCH 4/5] cargo.eclass: Support separating crate names/versions via slash Michał Górny
2023-06-16 14:48 ` Denis Lisov
2023-06-16 15:52 ` Michał Górny
2023-06-16 18:06 ` Sam James [this message]
2023-06-16 12:01 ` [gentoo-dev] [PATCH 5/5] cargo.eclass: Mark GIT_CRATES as pre-inherit Michał Górny
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=874jn7cmcv.fsf@gentoo.org \
--to=sam@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