haskell / haskell/cabal

Switch to gzip for bindist compression?

Open
#9,553 0 comments 2 reactions 0 assignees View on GitHub
type: RFC
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

## Background

**Currently bindists are compressed with xz** everywhere except on Windows, where zip is used.

See the list here: https://downloads.haskell.org/cabal/cabal-install-3.10.2.0/

## Problems

1. **xz is not available by default on some systems, such as Ubuntu**. See for example: https://gitlab.haskell.org/haskell/cabal/-/jobs/1739317#L29, where I use a vanilla Ubuntu 20.04 image. This is the main reason I am opening this ticket: I don't want to have to do extra preparation to every operating system in order to test the cabal bindist.

2. **xz makes a large time-versus-compression tradeoff** that I'm not sure is appropriate for a general-purpose installation tarball. It compresses more, but takes a lot of CPU time to do so. Ben once made a comparison for GHC (admittedly a very different circumstance than cabal) here: https://bgamari.github.io/posts/2016-02-04-compression-comparison.html .

## Related work

Rust uses gzip for everything apart from Windows and Mac: https://forge.rust-lang.org/infra/other-installation-methods.html#standalone-installers

GHC offers quite a few different options. I have suggested to also shave down GHC's bindists to just .tar.gz as well, which was met with initial agreement by maintainers. But it hasn't happened yet. I thought cabal might be an easier place to start...

## Impact

**This question is mainly aimed at users and distributors**. If there is any chance that switching from xz to gz could cause a regression, then I would like to proceed very carefully.

Contributor guide

Open the contributing guide

Research direction

Review the bindist artifact list for cabal-install-3.10.2.0 and the linked Ubuntu 20.04 CI job to establish the current platform-specific outputs and failure mode. Then trace the release configuration that produces those artifacts and document the user and distributor compatibility checks needed for a decision; done means an approved compression change or a recorded reason to retain xz.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.