I have a similar number of files in my
~/.julia directory, so I’ll assume it’s a pretty similar situation. I deleted
clones which got rid of some 6,000 files. What remains is broken down like this:
So artifacts are the major culprit, followed by packages and registries. There’s not much we can do about artifacts: these contain libraries which need to be individual files arranged in a certain way in order to work. Packages and registries we could potentially do something about.
For packages, we’d need to teach Julia how to load code from a tarball, but that might break things since some packages are probably designed to load data and such from the source tree as well. It would probably be easier and more reliable to just make packages appear to be in a read-only file system that’s actually backed by tarballs.
Registries are the easiest since their pure data: we could teach Pkg to load registry info directly from a tarball and that would “just work”.
Since the biggest source of file count is not fixable, however, it does suggest that figuring out a way to not store the
~/.julia directory on a file system that has trouble with lots of files would be the most effective way to address your particular issue.