Distinguish package index location from packages
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
**Describe the feature request**
At the moment, it is possible to configure where `cabal` puts its store of packages/index files for Hackage/other providers. It would be nice, however, if these indexes could be stored in a separate location from the packages themselves.
**Additional context**
The package index files for Hackage are starting to reach the 1GB mark. In a scenario where we have many many users of `cabal` floating around, this adds up rapidly if everyone has the same copy of the package index. This, for instance, is the case for Universities, which may have approaching 1TB of Hackage indices spread across all their students! In practice, the `cabal update` command, does not need to be run by every student, though each student may have their own unique package requirements; as such, it would be nice if they could have packages cached in their `~/.cabal/packages` folder, but we can keep the package index itself in some *shared* read-only directory which staff can refresh regularly -- with no risk of race-conditions from concurrent `cabal update`s performed by different users, or providing global write access to a folder.
If I understand correctly, the ability to set the directory path to store package indexes separate from the packages would resolve this problem. By default, these two paths could be set to be the same thing, of course.
Contributor guide
Assessment
This issue has not been assessed yet.