haskell / haskell/cabal

Only store compressed index, don't store 01-index.tar

Open
#2,707 29 comments 3 reactions 0 assignees View on GitHub
cabal-install: hackage-security type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

EDIT: Update 6 years later. Since version 2.0 cabal uses the new hackage-security protocol and stores the new 01-index but it does still store both the compressed and uncompressed version. As October 2023, the numbers are:

```
❯ ls -lh ~/.cabal/packages/hackage.haskell.org/01-index.tar*
-rw-r--r-- 1 andrea andrea 835M Oct 6 14:53 /home/andrea/.cabal/packages/hackage.haskell.org/01-index.tar
-rw-r--r-- 1 andrea andrea 112M Oct 6 14:14 /home/andrea/.cabal/packages/hackage.haskell.org/01-index.tar.gz
-rw-r--r-- 1 andrea andrea 5.0M Oct 6 14:14 /home/andrea/.cabal/packages/hackage.haskell.org/01-index.tar.idx
```

Original post follows:

My `packages/hackage.haskell.org/00-index.tar` consumes 200 MB and I wonder whether it is necessary to store it uncompressed. Cabal already stores `00-index.tar.gz`, too, which occupies only 10 MB. Is there a need to store the uncompressed archive on disk?

Contributor guide

Open the contributing guide

Research direction

Start by tracing Cabal's handling of the Hackage index under ~/.cabal/packages/hackage.haskell.org/, including 01-index.tar, 01-index.tar.gz, and 01-index.tar.idx. Check the related index-storage tests, if present, and verify that package-index operations still work while the uncompressed archive is no longer retained.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
build-system, cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.