fury-old
fury-old copied to clipboard
make it easier to manage shared cached files and support cleaning one project
Fury's central data directory will end up storing large numbers of files. We can currently delete all of these, but there's no way to delete just the files being used by the current project (and not files used by other projects).
We can make use of hard links to help by storing each file once "centrally" and storing hard links to that file in a peer directory. We can also stop using the the .fury cache directory and store its contents centrally.
I'm not sure I understand your idea completely.
A means to delete cached contents (such as repositories, source copies, layer imports) that belong to the current layer would be quite useful indeed. Sometimes the state of these contents (mostly repositories) breaks for some reason, which problem I usually solve by purging the cache directory. It would be nice if there were an easy way to identify and keep those caches that don't belong to the current layer.
However, I also think that temporary files belonging to the current build (such as class files, Bloop caches and BSP logs) can be kept inside the working directory, just as they are now. These files are much more short-lived than e.g. cached repositories of layer files. In addition, these files belong exclusively to the current build definition, whereas cached repositories may be shared between multiple ones.
Sorry, I didn't fully explain the solution, as I was planning to experiment with a couple of possibilities... but hard links provide a convenient way to have multiple references to identical content, while only storing it once. But they do only work between directories in the same filesystem, and there's no guarantee that the working directory will be on the same filesystem as the central files.
I haven't had any problems with repo caches getting out-of-sync, but it seems like deleting the .fury directory from the working directory sometimes works to fix build problems (which is actually quite a serious problem...)