alire icon indicating copy to clipboard operation
alire copied to clipboard

Enhancement: command to clear local cache

Open hexpunk opened this issue 1 year ago • 2 comments

Over time, as dependencies are add/updated/removed and projects come and go, a fair amount of builds will collect in the ~/.local/share/alire/builds and ~/.local/share/alire/releases directories. It sure would be nice to have an official alr command to clear those instead of having to manually clear them out.

hexpunk avatar Apr 28 '24 00:04 hexpunk

The problem is even worse when cross-compiling, since the crate builds in ~/.local/share/alire/builds are awfully persistent, and it is easy to find yourself with a prior build for the wrong target and no way that I can find to coerce alr 2 to start over. I liked it better when alr 1 put subordinate library crate builds in the superordinate project directory.

See my Makefile workaround at https://github.com/pmunts/alire-goodies/blob/master/Makefile

This is related to, and a superset of, what I asked for in discussion #1307. With my Makefile workaround, make reallyclean does what I wanted in discussion #1307, and make distclean the same, plus what you (hexpunk) are requesting.

.Net Core and NuGet have a similar problem that I run into occasionally, but not often enough to incorporate in make files. I use a shell script I wrote called cleanupfiles that eradicates such flotsam.

pmunts avatar May 11 '24 18:05 pmunts

This feature is in the roadmap, yes.

it is easy to find yourself with a prior build for the wrong target

This shouldn't be happening because the compiler should be being taken into account as one of the variables for the unique build. Do you have a recipe to reproduce?

You can force the old behavior with alr settings --global --set dependencies.shared false.

mosteo avatar May 15 '24 12:05 mosteo