The variable needs to be set before inherit in order for
${CARGO_CRATE_URIS} to be set correctly. Currently all ebuilds using
GIT_CRATES except for one define it pre-inherit anyway, and this makes
it consistent with CRATES.
Signed-off-by: Michał Górny
---
eclass/cargo.eclass | 1 +
1 file chang
Support specifying crate names and versions separated by `@` character
rather than `-`. Since `@` are not valid in crate names, this
makes splitting the tokens trivial and free of regular expressions.
Effectively, the `@` variant is roughly 180% faster:
```
* CRATES with '@' separator
real 952
Optimize the GIT_CRATES check to call `declare -p` only if the variable
is actually set. In the vast majority of ebuilds using cargo.eclass,
it's not set, so the subshell-first approach is slowing things down.
With this change, the speed improves by another ~20%:
```
real 363 it/s
user 365 it/s
Add a helper function that sets ${CARGO_CRATE_URIS} variable to make
it possible to set SRC_URI without subshells. This gives a slight
speedup (~20%):
```
real 300 it/s
user 324 it/s
```
Signed-off-by: Michał Górny
---
eclass/cargo.eclass | 48 +
e
The initial results on my machine are:
```
real 252 it/s
user 289 it/s
```
Signed-off-by: Michał Górny
---
eclass/tests/cargo-bench.sh | 107
1 file changed, 107 insertions(+)
create mode 100755 eclass/tests/cargo-bench.sh
diff --git a/eclass/tests/cargo
Hi,
Changes from v1: `@` is used to separate crate names and versions
rather than `/`. Thanks to Denis Lisov for the suggestion.
--
Best regards,
Michał Górny
Michał Górny (5):
eclass/tests: Add a minimal benchmark for cargo.eclass
cargo.eclass: Add variable alternative to $(cargo_crate_u
Michał Górny 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 wrote:
>> > Support specifying crate names and versions separated by forward slashes
>> > rather than hyphens. Since slashes are not valid in crate
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 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
Hello Michał,
On Fri, Jun 16, 2023 at 3:09 PM Michał Górny 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 variable needs to be set before inherit in order for
${CARGO_CRATE_URIS} to be set correctly. Currently all ebuilds using
GIT_CRATES except for one define it pre-inherit anyway, and this makes
it consistent with CRATES.
Signed-off-by: Michał Górny
---
eclass/cargo.eclass | 1 +
1 file chang
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:
```
* CRATES with slashes
real
Optimize the GIT_CRATES check to call `declare -p` only if the variable
is actually set. In the vast majority of ebuilds using cargo.eclass,
it's not set, so the subshell-first approach is slowing things down.
With this change, the speed improves by another ~20%:
```
real 363 it/s
user 365 it/s
Add a helper function that sets ${CARGO_CRATE_URIS} variable to make
it possible to set SRC_URI without subshells. This gives a slight
speedup (~20%):
```
real 300 it/s
user 324 it/s
```
Signed-off-by: Michał Górny
---
eclass/cargo.eclass | 48 +
e
The initial results on my machine are:
```
real 252 it/s
user 289 it/s
```
Signed-off-by: Michał Górny
---
eclass/tests/cargo-bench.sh | 107
1 file changed, 107 insertions(+)
create mode 100755 eclass/tests/cargo-bench.sh
diff --git a/eclass/tests/cargo
Hi,
cargo.eclass is one of the slowest eclasses in ::gentoo, and does some
pretty heavy processing in global scope. Here's a series of patches
to optimize its behavior.
Unfortunately, the optimizations cannot be done without changing
the API. However, the series preserves backwards compatibilit
Neither the eclass nor any of the ebuilds inheriting common-lisp-3 needs
eutils features.
Signed-off-by: Ulrich Müller
---
eclass/common-lisp-3.eclass | 2 --
1 file changed, 2 deletions(-)
diff --git a/eclass/common-lisp-3.eclass b/eclass/common-lisp-3.eclass
index 6c87ef3db842..cd654f37b904 1
None of the ebuilds inheriting rpm in EAPI 7 needs any of the remaining
eutils features.
Signed-off-by: Ulrich Müller
---
eclass/rpm.eclass | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/eclass/rpm.eclass b/eclass/rpm.eclass
index d03493466e1e..d8bb0ad2814d 100644
--- a/ec
Signed-off-by: Ulrich Müller
---
eclass/rpm.eclass | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/eclass/rpm.eclass b/eclass/rpm.eclass
index c97e23144c2b..d03493466e1e 100644
--- a/eclass/rpm.eclass
+++ b/eclass/rpm.eclass
@@ -1,14 +1,14 @@
-# Copyright 1999-2021
18 matches
Mail list logo