guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#58614] [PATCH 000/187] Remove unused crates


From: Julien Lepiller
Subject: [bug#58614] [PATCH 000/187] Remove unused crates
Date: Sun, 23 Oct 2022 15:00:47 +0200
User-agent: K-9 Mail for Android

Thanks for the explanation! So, no issue from my side, I think it's a good plan :)

Le 23 octobre 2022 10:58:57 GMT+02:00, Efraim Flashner <efraim@flashner.co.il> a écrit :
On Sat, Oct 22, 2022 at 11:26:21PM +0200, Julien Lepiller wrote:
I propably didn't ask my question properly. How were those crates selected for removal?

From your answer, it seems that being a leaf package was the only criteria. But there are useful leaf packages.

So, are there other criteria, or did you manually review them to ensure the packages are no longer useful? Or are crates generally not useful if nothing depends on them, in which case, what is a crate?

They are all leaf packages.

I made sure to only grab packages which were in the crates-* modules, so
none of the rust-apps or sequoia or syndication or gnome or others.

I took another look through the packages, rust-swc-1 is a typescript
transpiler, rust-news-flash-1 is used by a 'NewsFlash feed reader',
rust-libpijul-0.12 for pijul VCS repositories.

rust-swc-1 was added October 2020
rust-news-flash-1 was added November 2021
rust-libpijul-0.12 was added June 2020

rust-swc-1 doesn't currently build, but can probably be fixed and moved
to rust-apps.
rust-news-flash-1 is up-to-date with upstream but doesn't currently
build
rust-libpijul-0.12 doesn't produce a shared or static library and I
don't think there's been more work to continue past where it is.

so for now let's keep those 3 and move rust-swc-1 to rust-apps (and
rename to rust-swc).

As far as 'what is a crate', in general it is a source tarball which can
be built on its own or used (in source form) to build another package.
In order to track dependencies we've been using #:cargo-inputs and
#:cargo-development-inputs as a rough translation from inputs and
native-inputs. I hope by removing enough leaf crates we can untangle
some of the dependency circles, disable some tests on some crates to
clear other dependency circles, and try to bring the explosion of crates
under control, so we mostly have "useful crates" and not "historical
crates".

Le 22 octobre 2022 21:35:22 GMT+02:00, Efraim Flashner <efraim@flashner.co.il> a écrit :
On Sat, Oct 22, 2022 at 07:49:34AM +0200, Julien Lepiller wrote:
I'm wondering why we want to do that? Are those outdated maybe? At this rate we'll remove all crates :)

Would it be that bad? :)

The cargo ecosystem relies pretty heavily on semver and due to the
upgrade cycle we don't always remove old crates when nothing else
depends on them. I'd guess that some of them might be part of an
upstream-all-dependencies move (which I've done before) and most of them
are probably just outdated.

Le 21 octobre 2022 18:21:47 GMT+02:00, Christopher Baines <mail@cbaines.net> a écrit :

Efraim Flashner <efraim@flashner.co.il> writes:

This is round 1 of removing unreferenced crates. All of the crates
removed _should_ have no dependencies inside Guix proper. I used the
command listed below and then manually searched for the lines ending
with ':1' and made sure the package definition was the only reference to
that package.

grep define-public gnu/packages/crates-*scm | \
awk '{print $NF}' | xargs -I{} sh -c 'echo {} && git grep -c {}'

I then removed all the packages and rebuilt all the modules which used
the cargo-build-system somewhere inside them and rebuilt all the
modules.

git grep -c cargo-build-system | cut -f1 -d':' | grep \\.scm$ | \
sed -e 's/scm/go/' | xargs -n1 rm

Efraim Flashner (187):
<snip>

gnu/packages/crates-graphics.scm | 187 --
gnu/packages/crates-gtk.scm | 59 -
gnu/packages/crates-io.scm | 4645 ------------------------------
3 files changed, 4891 deletions(-)


base-commit: 3bb145b6e2a8c84e7739ead9ae76dc4d42bb9850

This looks good to me: https://qa.guix.gnu.org/issue/58614

Thanks,

Chris

--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

reply via email to

[Prev in Thread] Current Thread [Next in Thread]